Ignore:
Timestamp:
May 26, 2009, 9:44:50 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.6

Location:
branches/samba-3.2.x/source/utils
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/utils/net.c

    r133 r228  
    10661066        TALLOC_CTX *frame = talloc_stackframe();
    10671067
    1068         zero_addr(&opt_dest_ip);
     1068        zero_sockaddr(&opt_dest_ip);
    10691069
    10701070        load_case_tables();
  • branches/samba-3.2.x/source/utils/net_dns.c

    r136 r228  
    146146
    147147{
    148         struct iface_struct nics[MAX_INTERFACES];
    149148        int i, n;
    150149        struct sockaddr_storage *list = NULL;
    151150        int count = 0;
    152151
    153         /* find the first non-loopback address from our list of interfaces */
    154 
    155         n = get_interfaces(nics, MAX_INTERFACES);
     152        /* Honor the configured list of interfaces to register */
     153
     154        load_interfaces();
     155        n = iface_count();
    156156
    157157        if (n <= 0) {
     
    164164
    165165        for ( i=0; i<n; i++ ) {
    166                 if (is_loopback_addr(&nics[i].ip)) {
     166                const struct sockaddr_storage *nic_sa_storage = NULL;
     167
     168                if ((nic_sa_storage = iface_n_sockaddr_storage(i)) == NULL)
     169                        continue;
     170
     171                /* Don't register loopback addresses */
     172                if (is_loopback_addr(nic_sa_storage)) {
    167173                        continue;
    168174                }
    169 #if defined(HAVE_IPV6)
    170                 if ((nics[i].ip.ss_family == AF_INET6)) {
    171                         memcpy(&list[count++], &nics[i].ip,
    172                                sizeof(struct sockaddr_storage));
    173                 } else
    174 #endif
    175                 if (nics[i].ip.ss_family == AF_INET) {
    176                         memcpy(&list[count++], &nics[i].ip,
    177                                sizeof(struct sockaddr_storage));
    178                 }
     175
     176                memcpy(&list[count++], nic_sa_storage, sizeof(struct sockaddr_storage));
    179177        }
    180178        *pp_ss = list;
  • branches/samba-3.2.x/source/utils/net_rap.c

    r137 r228  
    513513         "net rap printq [misc. options] [targets]\n"\
    514514         "\tor\n"\
    515          "net rap printq list [<queue_name>] [misc. options] [targets]\n"\
     515         "net rap printq info [<queue_name>] [misc. options] [targets]\n"\
    516516         "\tlists the specified queue and jobs on the target server.\n"\
    517517         "\tIf the queue name is not specified, all queues are listed.\n\n");
     
    857857         "\n\t Enumerate users in a group\n"\
    858858         "\nnet rap groupmember DELETE <group> <user> [misc. options] "\
    859          "[targets]\n\t Delete sepcified user from specified group\n"\
     859         "[targets]\n\t Delete specified user from specified group\n"\
    860860         "\nnet rap groupmember ADD <group> <user> [misc. options] [targets]"\
    861861         "\n\t Add specified user to specified group\n");
  • branches/samba-3.2.x/source/utils/net_rpc.c

    r138 r228  
    805805        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
    806806        POLICY_HND connect_pol, domain_pol, user_pol;
    807         uchar pwbuf[516];
    808807        const char *user;
    809808        const char *new_password;
    810809        char *prompt = NULL;
    811810        union samr_UserInfo info;
     811        struct samr_CryptPassword crypt_pwd;
    812812
    813813        if (argc < 1) {
     
    879879        /* Set password on account */
    880880
    881         encode_pw_buffer(pwbuf, new_password, STR_UNICODE);
    882 
    883         init_samr_user_info24(&info.info24, pwbuf, 24);
    884 
    885         SamOEMhashBlob(info.info24.password.data, 516,
    886                        &cli->user_session_key);
     881        init_samr_CryptPassword(new_password,
     882                                &cli->user_session_key,
     883                                &crypt_pwd);
     884
     885        init_samr_user_info24(&info.info24, &crypt_pwd,
     886                              PASS_DONT_CHANGE_AT_NEXT_LOGON);
    887887
    888888        result = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
     
    41884188}
    41894189
    4190 static bool is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
    4191 {
    4192         int i;
    4193 
    4194         for (i=0; i<token->num_sids; i++) {
    4195                 if (sid_compare(sid, &token->user_sids[i]) == 0)
    4196                         return True;
    4197         }
    4198         return False;
    4199 }
    4200 
    42014190static void add_sid_to_token(NT_USER_TOKEN *token, DOM_SID *sid)
    42024191{
     
    52135202        struct initshutdown_String_sub s;
    52145203
    5215         if (opt_comment) {
     5204        if (opt_comment && strlen(opt_comment)) {
    52165205                msg = opt_comment;
    52175206        }
     
    52675256        WERROR werr;
    52685257
    5269         if (opt_comment) {
     5258        if (opt_comment && strlen(opt_comment)) {
    52705259                msg = opt_comment;
    52715260        }
     
    54305419                struct lsa_BinaryString parameters;
    54315420                const int units_per_week = 168;
    5432                 uchar pwbuf[516];
    5433 
    5434                 encode_pw_buffer(pwbuf, argv[1], STR_UNICODE);
     5421                struct samr_CryptPassword crypt_pwd;
    54355422
    54365423                ZERO_STRUCT(notime);
     
    54465433                memset(hours.bits, 0xFF, units_per_week);
    54475434
     5435                init_samr_CryptPassword(argv[1],
     5436                                        &cli->user_session_key,
     5437                                        &crypt_pwd);
     5438
    54485439                init_samr_user_info23(&info.info23,
    54495440                                      notime, notime, notime,
     
    54515442                                      NULL, NULL, NULL, NULL, NULL,
    54525443                                      NULL, NULL, NULL, NULL, &parameters,
    5453                                       0, 0, ACB_DOMTRUST, SAMR_FIELD_ACCT_FLAGS,
     5444                                      0, 0, ACB_DOMTRUST,
     5445                                      SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_PASSWORD,
    54545446                                      hours,
    54555447                                      0, 0, 0, 0, 0, 0, 0,
    5456                                       pwbuf, 24);
    5457 
    5458                 SamOEMhashBlob(info.info23.password.data, 516,
    5459                                &cli->user_session_key);
     5448                                      &crypt_pwd);
    54605449
    54615450                result = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
  • branches/samba-3.2.x/source/utils/net_rpc_join.c

    r133 r228  
    147147
    148148        char *clear_trust_password = NULL;
    149         uchar pwbuf[516];
     149        struct samr_CryptPassword crypt_pwd;
    150150        uchar md4_trust_password[16];
    151151        union samr_UserInfo set_info;
     
    334334        }
    335335
    336         encode_pw_buffer(pwbuf, clear_trust_password, STR_UNICODE);
    337 
    338336        /* Set password on machine account */
    339337
    340         init_samr_user_info24(&set_info.info24, pwbuf, 24);
    341 
    342         SamOEMhashBlob(set_info.info24.password.data, 516,
    343                        &cli->user_session_key);
     338        init_samr_CryptPassword(clear_trust_password,
     339                                &cli->user_session_key,
     340                                &crypt_pwd);
     341
     342        init_samr_user_info24(&set_info.info24, &crypt_pwd,
     343                              PASS_DONT_CHANGE_AT_NEXT_LOGON);
    344344
    345345        CHECK_RPC_ERR(rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
  • branches/samba-3.2.x/source/utils/net_rpc_samsync.c

    r141 r228  
    6666{
    6767        fstring hex_nt_passwd, hex_lm_passwd;
    68         uchar lm_passwd[16], nt_passwd[16];
    69         static uchar zero_buf[16];
    70 
     68        uchar zero_buf[16];
     69
     70        memset(zero_buf, '\0', sizeof(zero_buf));
    7171        /* Decode hashes from password hash (if they are not NULL) */
    7272
    7373        if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
    74                 sam_pwd_hash(r->rid, r->lmpassword.hash, lm_passwd, 0);
    75                 pdb_sethexpwd(hex_lm_passwd, lm_passwd, r->acct_flags);
     74                pdb_sethexpwd(hex_lm_passwd, r->lmpassword.hash, r->acct_flags);
    7675        } else {
    7776                pdb_sethexpwd(hex_lm_passwd, NULL, 0);
     
    7978
    8079        if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
    81                 sam_pwd_hash(r->rid, r->ntpassword.hash, nt_passwd, 0);
    82                 pdb_sethexpwd(hex_nt_passwd, nt_passwd, r->acct_flags);
     80                pdb_sethexpwd(hex_nt_passwd, r->ntpassword.hash, r->acct_flags);
    8381        } else {
    8482                pdb_sethexpwd(hex_nt_passwd, NULL, 0);
     
    392390                samsync_fix_delta_array(mem_ctx,
    393391                                        &session_key,
    394                                         false,
    395392                                        database_id,
    396393                                        delta_enum_array);
     
    467464        const char *old_string, *new_string;
    468465        time_t unix_time, stored_time;
    469         uchar lm_passwd[16], nt_passwd[16];
    470         static uchar zero_buf[16];
     466        uchar zero_buf[16];
     467
     468        memset(zero_buf, '\0', sizeof(zero_buf));
    471469
    472470        /* Username, fullname, home dir, dir drive, logon script, acct
     
    632630           in that case
    633631        */
     632        if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
     633                pdb_set_lanman_passwd(account, r->lmpassword.hash, PDB_CHANGED);
     634        }
     635
    634636        if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
    635                 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0);
    636                 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
    637         }
    638 
    639         if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
    640                 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0);
    641                 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);
     637                pdb_set_nt_passwd(account, r->ntpassword.hash, PDB_CHANGED);
    642638        }
    643639
     
    12581254                samsync_fix_delta_array(mem_ctx,
    12591255                                        &session_key,
    1260                                         true,
    12611256                                        database_id,
    12621257                                        delta_enum_array);
     
    17561751        fstring hex_nt_passwd, hex_lm_passwd;
    17571752        fstring description, profilepath, fullname, sambaSID;
    1758         uchar lm_passwd[16], nt_passwd[16];
    17591753        char *flags, *user_rdn;
    17601754        const char *ou;
    17611755        const char* nopasswd = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    1762         static uchar zero_buf[16];
     1756        uchar zero_buf[16];
    17631757        uint32 rid = 0, group_rid = 0, gidNumber = 0;
    17641758        time_t unix_time;
    17651759        int i;
     1760
     1761        memset(zero_buf, '\0', sizeof(zero_buf));
    17661762
    17671763        /* Get the username */
     
    18091805        /* Get lm and nt password data */
    18101806        if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
    1811                 sam_pwd_hash(r->rid, r->lmpassword.hash, lm_passwd, 0);
    1812                 pdb_sethexpwd(hex_lm_passwd, lm_passwd, r->acct_flags);
     1807                pdb_sethexpwd(hex_lm_passwd, r->lmpassword.hash, r->acct_flags);
    18131808        } else {
    18141809                pdb_sethexpwd(hex_lm_passwd, NULL, 0);
    18151810        }
    18161811        if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
    1817                 sam_pwd_hash(r->rid, r->ntpassword.hash, nt_passwd, 0);
    1818                 pdb_sethexpwd(hex_nt_passwd, nt_passwd, r->acct_flags);
     1812                pdb_sethexpwd(hex_nt_passwd, r->ntpassword.hash, r->acct_flags);
    18191813        } else {
    18201814                pdb_sethexpwd(hex_nt_passwd, NULL, 0);
     
    21742168                samsync_fix_delta_array(mem_ctx,
    21752169                                        &session_key,
    2176                                         true,
    21772170                                        database_id,
    21782171                                        delta_enum_array);
  • branches/samba-3.2.x/source/utils/ntlm_auth.c

    r133 r228  
    381381
    382382        if (nt_response && nt_response->length) {
    383                 memcpy(request.data.auth_crap.nt_resp,
    384                        nt_response->data,
    385                        MIN(nt_response->length, sizeof(request.data.auth_crap.nt_resp)));
     383                if (nt_response->length > sizeof(request.data.auth_crap.nt_resp)) {
     384                        request.flags = request.flags | WBFLAG_BIG_NTLMV2_BLOB;
     385                        request.extra_len = nt_response->length;
     386                        request.extra_data.data = SMB_MALLOC_ARRAY(char, request.extra_len);
     387                        if (request.extra_data.data == NULL) {
     388                                return NT_STATUS_NO_MEMORY;
     389                        }
     390                        memcpy(request.extra_data.data, nt_response->data,
     391                               nt_response->length);
     392
     393                } else {
     394                        memcpy(request.data.auth_crap.nt_resp,
     395                               nt_response->data, nt_response->length);
     396                }
    386397                request.data.auth_crap.nt_resp_len = nt_response->length;
    387398        }
    388399       
    389400        result = winbindd_request_response(WINBINDD_PAM_AUTH_CRAP, &request, &response);
     401        SAFE_FREE(request.extra_data.data);
    390402
    391403        /* Display response */
  • branches/samba-3.2.x/source/utils/smbcacls.c

    r141 r228  
    2424#include "includes.h"
    2525
    26 static int test_args = False;
     26static int test_args;
    2727
    2828#define CREATE_ACCESS_READ READ_CONTROL_ACCESS
     
    3030/* numeric is set when the user wants numeric SIDs and ACEs rather
    3131   than going via LSA calls to resolve them */
    32 static int numeric = False;
     32static int numeric;
    3333
    3434enum acl_mode {SMB_ACL_SET, SMB_ACL_DELETE, SMB_ACL_MODIFY, SMB_ACL_ADD };
     
    182182        }
    183183
    184         slprintf(str, sizeof(fstring) - 1, "%s%s%s",
    185                  domain, lp_winbind_separator(), name);
    186        
     184        if (*domain) {
     185                slprintf(str, sizeof(fstring) - 1, "%s%s%s",
     186                        domain, lp_winbind_separator(), name);
     187        } else {
     188                fstrcpy(str, name);
     189        }
    187190}
    188191
     
    199202}
    200203
     204static void print_ace_flags(FILE *f, uint8_t flags)
     205{
     206        char *str = talloc_strdup(NULL, "");
     207
     208        if (!str) {
     209                goto out;
     210        }
     211
     212        if (flags & SEC_ACE_FLAG_OBJECT_INHERIT) {
     213                str = talloc_asprintf(str, "%s%s",
     214                                str, "OI|");
     215                if (!str) {
     216                        goto out;
     217                }
     218        }
     219        if (flags & SEC_ACE_FLAG_CONTAINER_INHERIT) {
     220                str = talloc_asprintf(str, "%s%s",
     221                                str, "CI|");
     222                if (!str) {
     223                        goto out;
     224                }
     225        }
     226        if (flags & SEC_ACE_FLAG_NO_PROPAGATE_INHERIT) {
     227                str = talloc_asprintf(str, "%s%s",
     228                                str, "NP|");
     229                if (!str) {
     230                        goto out;
     231                }
     232        }
     233        if (flags & SEC_ACE_FLAG_INHERIT_ONLY) {
     234                str = talloc_asprintf(str, "%s%s",
     235                                str, "IO|");
     236                if (!str) {
     237                        goto out;
     238                }
     239        }
     240        if (flags & SEC_ACE_FLAG_INHERITED_ACE) {
     241                str = talloc_asprintf(str, "%s%s",
     242                                str, "I|");
     243                if (!str) {
     244                        goto out;
     245                }
     246        }
     247        /* Ignore define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 )
     248           and SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 ) as they're
     249           audit ace flags. */
     250
     251        if (str[strlen(str)-1] == '|') {
     252                str[strlen(str)-1] = '\0';
     253                fprintf(f, "/%s/", str);
     254        } else {
     255                fprintf(f, "/0x%x/", flags);
     256        }
     257        TALLOC_FREE(str);
     258        return;
     259
     260  out:
     261        fprintf(f, "/0x%x/", flags);
     262}
    201263
    202264/* print an ACE on a FILE, using either numeric or ascii representation */
     
    213275
    214276        if (numeric) {
    215                 fprintf(f, "%d/%d/0x%08x",
     277                fprintf(f, "%d/0x%x/0x%08x",
    216278                        ace->type, ace->flags, ace->access_mask);
    217279                return;
     
    228290        }
    229291
    230         /* Not sure what flags can be set in a file ACL */
    231 
    232         fprintf(f, "/%d/", ace->flags);
     292        print_ace_flags(f, ace->flags);
    233293
    234294        /* Standard permissions */
     
    266326}
    267327
     328static bool parse_ace_flags(const char *str, unsigned int *pflags)
     329{
     330        const char *p = str;
     331        *pflags = 0;
     332
     333        while (*p) {
     334                if (strnequal(p, "OI", 2)) {
     335                        *pflags |= SEC_ACE_FLAG_OBJECT_INHERIT;
     336                        p += 2;
     337                } else if (strnequal(p, "CI", 2)) {
     338                        *pflags |= SEC_ACE_FLAG_CONTAINER_INHERIT;
     339                        p += 2;
     340                } else if (strnequal(p, "NP", 2)) {
     341                        *pflags |= SEC_ACE_FLAG_NO_PROPAGATE_INHERIT;
     342                        p += 2;
     343                } else if (strnequal(p, "IO", 2)) {
     344                        *pflags |= SEC_ACE_FLAG_INHERIT_ONLY;
     345                        p += 2;
     346                } else if (*p == 'I') {
     347                        *pflags |= SEC_ACE_FLAG_INHERITED_ACE;
     348                        p += 1;
     349                } else if (*p) {
     350                        return false;
     351                }
     352
     353                if (*p != '|' && *p != '\0') {
     354                        return false;
     355                }
     356        }
     357        return true;
     358}
    268359
    269360/* parse an ACE in the same format as print_ace() */
     
    338429        /* Only numeric form accepted for flags at present */
    339430
    340         if (!(next_token_talloc(frame, &cp, &tok, "/") &&
    341               sscanf(tok, "%i", &aflags))) {
    342                 printf("ACE '%s': bad integer flags entry at '%s'\n",
     431        if (!next_token_talloc(frame, &cp, &tok, "/")) {
     432                printf("ACE '%s': bad flags entry at '%s'\n",
    343433                        orig_str, tok);
    344434                SAFE_FREE(str);
    345435                TALLOC_FREE(frame);
    346436                return False;
     437        }
     438
     439        if (tok[0] < '0' || tok[0] > '9') {
     440                if (!parse_ace_flags(tok, &aflags)) {
     441                        printf("ACE '%s': bad named flags entry at '%s'\n",
     442                                orig_str, tok);
     443                        SAFE_FREE(str);
     444                        TALLOC_FREE(frame);
     445                        return False;
     446                }
     447        } else if (strnequal(tok, "0x", 2)) {
     448                if (!sscanf(tok, "%x", &aflags)) {
     449                        printf("ACE '%s': bad hex flags entry at '%s'\n",
     450                                orig_str, tok);
     451                        SAFE_FREE(str);
     452                        TALLOC_FREE(frame);
     453                        return False;
     454                }
     455        } else {
     456                if (!sscanf(tok, "%i", &aflags)) {
     457                        printf("ACE '%s': bad integer flags entry at '%s'\n",
     458                                orig_str, tok);
     459                        SAFE_FREE(str);
     460                        TALLOC_FREE(frame);
     461                        return False;
     462                }
    347463        }
    348464
     
    509625
    510626        fprintf(f, "REVISION:%d\n", sd->revision);
     627        fprintf(f, "CONTROL:0x%x\n", sd->type);
    511628
    512629        /* Print owner and group sid */
     
    629746
    630747
    631 /* The MSDN is contradictory over the ordering of ACE entries in an ACL.
    632    However NT4 gives a "The information may have been modified by a
    633    computer running Windows NT 5.0" if denied ACEs do not appear before
    634    allowed ACEs. */
     748/* The MSDN is contradictory over the ordering of ACE entries in an
     749   ACL.  However NT4 gives a "The information may have been modified
     750   by a computer running Windows NT 5.0" if denied ACEs do not appear
     751   before allowed ACEs. At
     752   http://technet.microsoft.com/en-us/library/cc781716.aspx the
     753   canonical order is specified as "Explicit Deny, Explicit Allow,
     754   Inherited ACEs unchanged" */
    635755
    636756static int ace_compare(SEC_ACE *ace1, SEC_ACE *ace2)
    637757{
    638         if (sec_ace_equal(ace1, ace2)) 
     758        if (sec_ace_equal(ace1, ace2))
    639759                return 0;
    640760
    641         if (ace1->type != ace2->type)
     761        if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
     762                        !(ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
     763                return 1;
     764        if (!(ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
     765                        (ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
     766                return -1;
     767        if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) &&
     768                        (ace2->flags & SEC_ACE_FLAG_INHERITED_ACE))
     769                return ace1 - ace2;
     770
     771        if (ace1->type != ace2->type)
    642772                return ace2->type - ace1->type;
    643773
    644         if (sid_compare(&ace1->trustee, &ace2->trustee)) 
     774        if (sid_compare(&ace1->trustee, &ace2->trustee))
    645775                return sid_compare(&ace1->trustee, &ace2->trustee);
    646776
    647         if (ace1->flags != ace2->flags) 
     777        if (ace1->flags != ace2->flags)
    648778                return ace1->flags - ace2->flags;
    649779
    650         if (ace1->access_mask != ace2->access_mask) 
     780        if (ace1->access_mask != ace2->access_mask)
    651781                return ace1->access_mask - ace2->access_mask;
    652782
    653         if (ace1->size != ace2->size) 
     783        if (ace1->size != ace2->size)
    654784                return ace1->size - ace2->size;
    655785
     
    680810set the ACLs on a file given an ascii description
    681811*******************************************************/
     812
    682813static int cacl_set(struct cli_state *cli, char *filename,
    683814                    char *the_acl, enum acl_mode mode)
     
    733864
    734865                        if (!found) {
    735                                 printf("ACL for ACE:"); 
     866                                printf("ACL for ACE:");
    736867                                print_ace(cli, stdout, &sd->dacl->aces[i]);
    737868                                printf(" not found\n");
     
    765896                }
    766897
    767                 if (sd->group_sid) { 
     898                if (sd->group_sid) {
    768899                        old->group_sid = sd->group_sid;
    769900                }
     
    828959        uint32_t flags = 0;
    829960
    830         zero_addr(&ss);
     961        zero_sockaddr(&ss);
    831962
    832963        if (get_cmdline_auth_info_use_kerberos()) {
     
    8981029                { "chown", 'C', POPT_ARG_STRING, NULL, 'C', "Change ownership of a file", "USERNAME" },
    8991030                { "chgrp", 'G', POPT_ARG_STRING, NULL, 'G', "Change group ownership of a file", "GROUPNAME" },
    900                 { "numeric", 0, POPT_ARG_NONE, &numeric, True, "Don't resolve sids or masks to names" },
    901                 { "test-args", 't', POPT_ARG_NONE, &test_args, True, "Test arguments"},
     1031                { "numeric", 0, POPT_ARG_NONE, &numeric, 1, "Don't resolve sids or masks to names" },
     1032                { "test-args", 't', POPT_ARG_NONE, &test_args, 1, "Test arguments"},
    9021033                POPT_COMMON_SAMBA
    9031034                POPT_COMMON_CONNECTION
  • branches/samba-3.2.x/source/utils/smbcquotas.c

    r136 r228  
    374374        uint32_t flags = 0;
    375375
    376         zero_addr(&ss);
     376        zero_sockaddr(&ss);
    377377
    378378        if (get_cmdline_auth_info_use_machine_account() &&
  • branches/samba-3.2.x/source/utils/smbfilter.c

    r137 r228  
    213213        /* start listening on port 445 locally */
    214214
    215         zero_addr(&my_ss);
     215        zero_sockaddr(&my_ss);
    216216        s = open_socket_in(SOCK_STREAM, 445, 0, &my_ss, True);
    217217       
  • branches/samba-3.2.x/source/utils/smbtree.c

    r136 r228  
    3131/* Holds a list of workgroups or servers */
    3232
    33 struct name_list {
    34         struct name_list *prev, *next;
     33struct smb_name_list {
     34        struct smb_name_list *prev, *next;
    3535        char *name, *comment;
    3636        uint32 server_type;
    3737};
    3838
    39 static struct name_list *workgroups, *servers, *shares;
    40 
    41 static void free_name_list(struct name_list *list)
     39static struct smb_name_list *workgroups, *servers, *shares;
     40
     41static void free_name_list(struct smb_name_list *list)
    4242{
    4343        while(list)
     
    4848                     const char *comment, void *state)
    4949{
    50         struct name_list **name_list = (struct name_list **)state;
    51         struct name_list *new_name;
    52 
    53         new_name = SMB_MALLOC_P(struct name_list);
     50        struct smb_name_list **name_list = (struct smb_name_list **)state;
     51        struct smb_name_list *new_name;
     52
     53        new_name = SMB_MALLOC_P(struct smb_name_list);
    5454
    5555        if (!new_name)
     
    222222static bool print_tree(struct user_auth_info *user_info)
    223223{
    224         struct name_list *wg, *sv, *sh;
     224        struct smb_name_list *wg, *sv, *sh;
    225225
    226226        /* List workgroups */
Note: See TracChangeset for help on using the changeset viewer.