Changeset 228 for branches/samba-3.2.x/source/utils
- Timestamp:
- May 26, 2009, 9:44:50 AM (16 years ago)
- 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 1066 1066 TALLOC_CTX *frame = talloc_stackframe(); 1067 1067 1068 zero_ addr(&opt_dest_ip);1068 zero_sockaddr(&opt_dest_ip); 1069 1069 1070 1070 load_case_tables(); -
branches/samba-3.2.x/source/utils/net_dns.c
r136 r228 146 146 147 147 { 148 struct iface_struct nics[MAX_INTERFACES];149 148 int i, n; 150 149 struct sockaddr_storage *list = NULL; 151 150 int count = 0; 152 151 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(); 156 156 157 157 if (n <= 0) { … … 164 164 165 165 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)) { 167 173 continue; 168 174 } 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)); 179 177 } 180 178 *pp_ss = list; -
branches/samba-3.2.x/source/utils/net_rap.c
r137 r228 513 513 "net rap printq [misc. options] [targets]\n"\ 514 514 "\tor\n"\ 515 "net rap printq list[<queue_name>] [misc. options] [targets]\n"\515 "net rap printq info [<queue_name>] [misc. options] [targets]\n"\ 516 516 "\tlists the specified queue and jobs on the target server.\n"\ 517 517 "\tIf the queue name is not specified, all queues are listed.\n\n"); … … 857 857 "\n\t Enumerate users in a group\n"\ 858 858 "\nnet rap groupmember DELETE <group> <user> [misc. options] "\ 859 "[targets]\n\t Delete s epcified user from specified group\n"\859 "[targets]\n\t Delete specified user from specified group\n"\ 860 860 "\nnet rap groupmember ADD <group> <user> [misc. options] [targets]"\ 861 861 "\n\t Add specified user to specified group\n"); -
branches/samba-3.2.x/source/utils/net_rpc.c
r138 r228 805 805 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 806 806 POLICY_HND connect_pol, domain_pol, user_pol; 807 uchar pwbuf[516];808 807 const char *user; 809 808 const char *new_password; 810 809 char *prompt = NULL; 811 810 union samr_UserInfo info; 811 struct samr_CryptPassword crypt_pwd; 812 812 813 813 if (argc < 1) { … … 879 879 /* Set password on account */ 880 880 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); 887 887 888 888 result = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx, … … 4188 4188 } 4189 4189 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 4201 4190 static void add_sid_to_token(NT_USER_TOKEN *token, DOM_SID *sid) 4202 4191 { … … 5213 5202 struct initshutdown_String_sub s; 5214 5203 5215 if (opt_comment ) {5204 if (opt_comment && strlen(opt_comment)) { 5216 5205 msg = opt_comment; 5217 5206 } … … 5267 5256 WERROR werr; 5268 5257 5269 if (opt_comment ) {5258 if (opt_comment && strlen(opt_comment)) { 5270 5259 msg = opt_comment; 5271 5260 } … … 5430 5419 struct lsa_BinaryString parameters; 5431 5420 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; 5435 5422 5436 5423 ZERO_STRUCT(notime); … … 5446 5433 memset(hours.bits, 0xFF, units_per_week); 5447 5434 5435 init_samr_CryptPassword(argv[1], 5436 &cli->user_session_key, 5437 &crypt_pwd); 5438 5448 5439 init_samr_user_info23(&info.info23, 5449 5440 notime, notime, notime, … … 5451 5442 NULL, NULL, NULL, NULL, NULL, 5452 5443 NULL, NULL, NULL, NULL, ¶meters, 5453 0, 0, ACB_DOMTRUST, SAMR_FIELD_ACCT_FLAGS, 5444 0, 0, ACB_DOMTRUST, 5445 SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_PASSWORD, 5454 5446 hours, 5455 5447 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); 5460 5449 5461 5450 result = rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx, -
branches/samba-3.2.x/source/utils/net_rpc_join.c
r133 r228 147 147 148 148 char *clear_trust_password = NULL; 149 uchar pwbuf[516];149 struct samr_CryptPassword crypt_pwd; 150 150 uchar md4_trust_password[16]; 151 151 union samr_UserInfo set_info; … … 334 334 } 335 335 336 encode_pw_buffer(pwbuf, clear_trust_password, STR_UNICODE);337 338 336 /* Set password on machine account */ 339 337 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); 344 344 345 345 CHECK_RPC_ERR(rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx, -
branches/samba-3.2.x/source/utils/net_rpc_samsync.c
r141 r228 66 66 { 67 67 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)); 71 71 /* Decode hashes from password hash (if they are not NULL) */ 72 72 73 73 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); 76 75 } else { 77 76 pdb_sethexpwd(hex_lm_passwd, NULL, 0); … … 79 78 80 79 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); 83 81 } else { 84 82 pdb_sethexpwd(hex_nt_passwd, NULL, 0); … … 392 390 samsync_fix_delta_array(mem_ctx, 393 391 &session_key, 394 false,395 392 database_id, 396 393 delta_enum_array); … … 467 464 const char *old_string, *new_string; 468 465 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)); 471 469 472 470 /* Username, fullname, home dir, dir drive, logon script, acct … … 632 630 in that case 633 631 */ 632 if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) { 633 pdb_set_lanman_passwd(account, r->lmpassword.hash, PDB_CHANGED); 634 } 635 634 636 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); 642 638 } 643 639 … … 1258 1254 samsync_fix_delta_array(mem_ctx, 1259 1255 &session_key, 1260 true,1261 1256 database_id, 1262 1257 delta_enum_array); … … 1756 1751 fstring hex_nt_passwd, hex_lm_passwd; 1757 1752 fstring description, profilepath, fullname, sambaSID; 1758 uchar lm_passwd[16], nt_passwd[16];1759 1753 char *flags, *user_rdn; 1760 1754 const char *ou; 1761 1755 const char* nopasswd = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 1762 staticuchar zero_buf[16];1756 uchar zero_buf[16]; 1763 1757 uint32 rid = 0, group_rid = 0, gidNumber = 0; 1764 1758 time_t unix_time; 1765 1759 int i; 1760 1761 memset(zero_buf, '\0', sizeof(zero_buf)); 1766 1762 1767 1763 /* Get the username */ … … 1809 1805 /* Get lm and nt password data */ 1810 1806 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); 1813 1808 } else { 1814 1809 pdb_sethexpwd(hex_lm_passwd, NULL, 0); 1815 1810 } 1816 1811 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); 1819 1813 } else { 1820 1814 pdb_sethexpwd(hex_nt_passwd, NULL, 0); … … 2174 2168 samsync_fix_delta_array(mem_ctx, 2175 2169 &session_key, 2176 true,2177 2170 database_id, 2178 2171 delta_enum_array); -
branches/samba-3.2.x/source/utils/ntlm_auth.c
r133 r228 381 381 382 382 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 } 386 397 request.data.auth_crap.nt_resp_len = nt_response->length; 387 398 } 388 399 389 400 result = winbindd_request_response(WINBINDD_PAM_AUTH_CRAP, &request, &response); 401 SAFE_FREE(request.extra_data.data); 390 402 391 403 /* Display response */ -
branches/samba-3.2.x/source/utils/smbcacls.c
r141 r228 24 24 #include "includes.h" 25 25 26 static int test_args = False;26 static int test_args; 27 27 28 28 #define CREATE_ACCESS_READ READ_CONTROL_ACCESS … … 30 30 /* numeric is set when the user wants numeric SIDs and ACEs rather 31 31 than going via LSA calls to resolve them */ 32 static int numeric = False;32 static int numeric; 33 33 34 34 enum acl_mode {SMB_ACL_SET, SMB_ACL_DELETE, SMB_ACL_MODIFY, SMB_ACL_ADD }; … … 182 182 } 183 183 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 } 187 190 } 188 191 … … 199 202 } 200 203 204 static 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 } 201 263 202 264 /* print an ACE on a FILE, using either numeric or ascii representation */ … … 213 275 214 276 if (numeric) { 215 fprintf(f, "%d/ %d/0x%08x",277 fprintf(f, "%d/0x%x/0x%08x", 216 278 ace->type, ace->flags, ace->access_mask); 217 279 return; … … 228 290 } 229 291 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); 233 293 234 294 /* Standard permissions */ … … 266 326 } 267 327 328 static 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 } 268 359 269 360 /* parse an ACE in the same format as print_ace() */ … … 338 429 /* Only numeric form accepted for flags at present */ 339 430 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", 343 433 orig_str, tok); 344 434 SAFE_FREE(str); 345 435 TALLOC_FREE(frame); 346 436 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 } 347 463 } 348 464 … … 509 625 510 626 fprintf(f, "REVISION:%d\n", sd->revision); 627 fprintf(f, "CONTROL:0x%x\n", sd->type); 511 628 512 629 /* Print owner and group sid */ … … 629 746 630 747 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" */ 635 755 636 756 static int ace_compare(SEC_ACE *ace1, SEC_ACE *ace2) 637 757 { 638 if (sec_ace_equal(ace1, ace2)) 758 if (sec_ace_equal(ace1, ace2)) 639 759 return 0; 640 760 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) 642 772 return ace2->type - ace1->type; 643 773 644 if (sid_compare(&ace1->trustee, &ace2->trustee)) 774 if (sid_compare(&ace1->trustee, &ace2->trustee)) 645 775 return sid_compare(&ace1->trustee, &ace2->trustee); 646 776 647 if (ace1->flags != ace2->flags) 777 if (ace1->flags != ace2->flags) 648 778 return ace1->flags - ace2->flags; 649 779 650 if (ace1->access_mask != ace2->access_mask) 780 if (ace1->access_mask != ace2->access_mask) 651 781 return ace1->access_mask - ace2->access_mask; 652 782 653 if (ace1->size != ace2->size) 783 if (ace1->size != ace2->size) 654 784 return ace1->size - ace2->size; 655 785 … … 680 810 set the ACLs on a file given an ascii description 681 811 *******************************************************/ 812 682 813 static int cacl_set(struct cli_state *cli, char *filename, 683 814 char *the_acl, enum acl_mode mode) … … 733 864 734 865 if (!found) { 735 printf("ACL for ACE:"); 866 printf("ACL for ACE:"); 736 867 print_ace(cli, stdout, &sd->dacl->aces[i]); 737 868 printf(" not found\n"); … … 765 896 } 766 897 767 if (sd->group_sid) { 898 if (sd->group_sid) { 768 899 old->group_sid = sd->group_sid; 769 900 } … … 828 959 uint32_t flags = 0; 829 960 830 zero_ addr(&ss);961 zero_sockaddr(&ss); 831 962 832 963 if (get_cmdline_auth_info_use_kerberos()) { … … 898 1029 { "chown", 'C', POPT_ARG_STRING, NULL, 'C', "Change ownership of a file", "USERNAME" }, 899 1030 { "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"}, 902 1033 POPT_COMMON_SAMBA 903 1034 POPT_COMMON_CONNECTION -
branches/samba-3.2.x/source/utils/smbcquotas.c
r136 r228 374 374 uint32_t flags = 0; 375 375 376 zero_ addr(&ss);376 zero_sockaddr(&ss); 377 377 378 378 if (get_cmdline_auth_info_use_machine_account() && -
branches/samba-3.2.x/source/utils/smbfilter.c
r137 r228 213 213 /* start listening on port 445 locally */ 214 214 215 zero_ addr(&my_ss);215 zero_sockaddr(&my_ss); 216 216 s = open_socket_in(SOCK_STREAM, 445, 0, &my_ss, True); 217 217 -
branches/samba-3.2.x/source/utils/smbtree.c
r136 r228 31 31 /* Holds a list of workgroups or servers */ 32 32 33 struct name_list {34 struct name_list *prev, *next;33 struct smb_name_list { 34 struct smb_name_list *prev, *next; 35 35 char *name, *comment; 36 36 uint32 server_type; 37 37 }; 38 38 39 static struct name_list *workgroups, *servers, *shares;40 41 static void free_name_list(struct name_list *list)39 static struct smb_name_list *workgroups, *servers, *shares; 40 41 static void free_name_list(struct smb_name_list *list) 42 42 { 43 43 while(list) … … 48 48 const char *comment, void *state) 49 49 { 50 struct name_list **name_list = (structname_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); 54 54 55 55 if (!new_name) … … 222 222 static bool print_tree(struct user_auth_info *user_info) 223 223 { 224 struct name_list *wg, *sv, *sh;224 struct smb_name_list *wg, *sv, *sh; 225 225 226 226 /* List workgroups */
Note:
See TracChangeset
for help on using the changeset viewer.