Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/utils/smbcquotas.c

    r740 r988  
    5959                cli_ipc = connect_one("IPC$");
    6060                ret = cli_rpc_pipe_open_noauth(cli_ipc,
    61                                                &ndr_table_lsarpc.syntax_id,
     61                                               &ndr_table_lsarpc,
    6262                                               &global_pipe_hnd);
    6363                if (!NT_STATUS_IS_OK(ret)) {
     
    188188        switch (todo) {
    189189                case PARSE_LIM:
    190                         if (sscanf(p,"%"PRIu64"/%"PRIu64,&pqt->softlim,&pqt->hardlim)!=2) {
     190                        if (sscanf(p,"%"SCNu64"/%"SCNu64,&pqt->softlim,
     191                            &pqt->hardlim) != 2)
     192                        {
    191193                                return -1;
    192194                        }
     
    235237        const char *result;
    236238
    237         if (!_numeric&&special&&(val == SMB_NTQUOTAS_NO_LIMIT)) {
     239        if (!_numeric && special && val == 0) {
    238240                return "NO LIMIT";
    239241        }
     
    331333static int do_quota(struct cli_state *cli,
    332334                enum SMB_QUOTA_TYPE qtype,
    333                 uint16 cmd,
     335                uint16_t cmd,
    334336                const char *username_str,
    335337                SMB_NTQUOTA_STRUCT *pqt)
    336338{
    337         uint32 fs_attrs = 0;
     339        uint32_t fs_attrs = 0;
    338340        uint16_t quota_fnum = 0;
    339341        SMB_NTQUOTA_LIST *qtl = NULL;
     
    505507{
    506508        struct cli_state *c;
    507         struct sockaddr_storage ss;
    508509        NTSTATUS nt_status;
    509510        uint32_t flags = 0;
    510 
    511         zero_sockaddr(&ss);
    512511
    513512        if (get_cmdline_auth_info_use_machine_account(smbcquotas_auth_info) &&
     
    524523        set_cmdline_auth_info_getpass(smbcquotas_auth_info);
    525524
    526         nt_status = cli_full_connection(&c, global_myname(), server,
    527                                             &ss, 0,
     525        nt_status = cli_full_connection(&c, lp_netbios_name(), server,
     526                                            NULL, 0,
    528527                                            share, "?????",
    529528                                            get_cmdline_auth_info_username(smbcquotas_auth_info),
     
    555554  main program
    556555****************************************************************************/
    557  int main(int argc, const char *argv[])
    558 {
     556int main(int argc, char *argv[])
     557{
     558        const char **argv_const = discard_const_p(const char *, argv);
    559559        char *share;
    560560        int opt;
     
    584584                { "numeric", 'n', POPT_ARG_NONE, NULL, 'n', "Don't resolve sids or limits to names" },
    585585                { "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "be verbose" },
    586                 { "test-args", 't', POPT_ARG_NONE, NULL, 'r', "Test arguments"},
     586                { "test-args", 't', POPT_ARG_NONE, NULL, 't', "Test arguments"},
    587587                POPT_COMMON_SAMBA
    588588                POPT_COMMON_CREDENTIALS
     
    590590        };
    591591
    592         load_case_tables();
     592        smb_init_locale();
    593593
    594594        ZERO_STRUCT(qt);
     
    600600        setlinebuf(stdout);
    601601
    602         fault_setup(NULL);
    603 
    604         lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
     602        fault_setup();
     603
     604        lp_load_global(get_dyn_CONFIGFILE());
    605605        load_interfaces();
    606606
     
    611611        popt_common_set_auth_info(smbcquotas_auth_info);
    612612
    613         pc = poptGetContext("smbcquotas", argc, argv, long_options, 0);
     613        pc = poptGetContext("smbcquotas", argc, argv_const, long_options, 0);
    614614
    615615        poptSetOtherOptionHelp(pc, "//server1/share1");
     
    692692        }
    693693
     694        poptFreeContext(pc);
     695        popt_burn_cmdline_password(argc, argv);
     696
    694697        string_replace(path, '/', '\\');
    695698
Note: See TracChangeset for help on using the changeset viewer.