Changeset 411 for branches/samba-3.3.x/source
- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- Location:
- branches/samba-3.3.x/source
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/VERSION
r370 r411 26 26 SAMBA_VERSION_MAJOR=3 27 27 SAMBA_VERSION_MINOR=3 28 SAMBA_VERSION_RELEASE=1 028 SAMBA_VERSION_RELEASE=11 29 29 30 30 ######################################################## -
branches/samba-3.3.x/source/include/proto.h
r384 r411 6074 6074 void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val); 6075 6075 int lp_min_receive_file_size(void); 6076 void widelinks_warning(int snum); 6076 6077 6077 6078 /* The following definitions come from param/params.c */ -
branches/samba-3.3.x/source/include/smb.h
r338 r411 1685 1685 KERNEL_OPLOCK_CAPABILITY, 1686 1686 DMAPI_ACCESS_CAPABILITY, 1687 LEASE_CAPABILITY 1687 LEASE_CAPABILITY, 1688 KILL_CAPABILITY 1688 1689 }; 1689 1690 -
branches/samba-3.3.x/source/lib/system.c
r309 r411 708 708 #if defined(HAVE_POSIX_CAPABILITIES) 709 709 710 /* This define hasn't made it into the glibc capabilities header yet. */ 711 #ifndef SECURE_NO_SETUID_FIXUP 712 #define SECURE_NO_SETUID_FIXUP 2 713 #endif 714 710 715 /************************************************************************** 711 716 Try and abstract process capabilities (for systems that have them). … … 738 743 #endif 739 744 745 #if defined(HAVE_PRCTL) && defined(PR_SET_SECUREBITS) && defined(SECURE_NO_SETUID_FIXUP) 746 /* New way of setting capabilities as "sticky". */ 747 748 /* 749 * Use PR_SET_SECUREBITS to prevent setresuid() 750 * atomically dropping effective capabilities on 751 * uid change. Only available in Linux kernels 752 * 2.6.26 and above. 753 * 754 * See here: 755 * http://www.kernel.org/doc/man-pages/online/pages/man7/capabilities.7.html 756 * for details. 757 * 758 * Specifically the CAP_KILL capability we need 759 * to allow Linux threads under different euids 760 * to send signals to each other. 761 */ 762 763 if (prctl(PR_SET_SECUREBITS, 1 << SECURE_NO_SETUID_FIXUP)) { 764 DEBUG(0,("set_process_capability: " 765 "prctl PR_SET_SECUREBITS failed with error %s\n", 766 strerror(errno) )); 767 return false; 768 } 769 #endif 770 740 771 cap = cap_get_proc(); 741 772 if (cap == NULL) { … … 766 797 #endif 767 798 break; 799 case KILL_CAPABILITY: 800 #ifdef CAP_KILL 801 cap_vals[num_cap_vals++] = CAP_KILL; 802 #endif 803 break; 768 804 } 769 805 … … 775 811 } 776 812 777 cap_set_flag(cap, CAP_EFFECTIVE, num_cap_vals, cap_vals, 778 enable ? CAP_SET : CAP_CLEAR); 813 /* 814 * Ensure the capability is effective. We assume that as a root 815 * process it's always permitted. 816 */ 817 818 if (cap_set_flag(cap, CAP_EFFECTIVE, num_cap_vals, cap_vals, 819 enable ? CAP_SET : CAP_CLEAR) == -1) { 820 DEBUG(0, ("set_process_capability: cap_set_flag effective " 821 "failed (%d): %s\n", 822 (int)capability, 823 strerror(errno))); 824 cap_free(cap); 825 return false; 826 } 779 827 780 828 /* We never want to pass capabilities down to our children, so make 781 829 * sure they are not inherited. 782 830 */ 783 cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals, cap_vals, CAP_CLEAR); 831 if (cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals, 832 cap_vals, CAP_CLEAR) == -1) { 833 DEBUG(0, ("set_process_capability: cap_set_flag inheritable " 834 "failed (%d): %s\n", 835 (int)capability, 836 strerror(errno))); 837 cap_free(cap); 838 return false; 839 } 784 840 785 841 if (cap_set_proc(cap) == -1) { 786 DEBUG(0, ("set_process_capability: cap_set_proc failed: %s\n", 842 DEBUG(0, ("set_process_capability: cap_set_flag (%d) failed: %s\n", 843 (int)capability, 787 844 strerror(errno))); 788 845 cap_free(cap); -
branches/samba-3.3.x/source/libsmb/clirap.c
r206 r411 271 271 SIVAL(p,0,func); /* api number */ 272 272 p += 2; 273 /* Next time through we need to use the continue api */ 274 func = RAP_NetServerEnum3; 275 276 if (last_entry) { 277 strlcpy(p,"WrLehDOz", sizeof(param)-PTR_DIFF(p,param)); 273 274 if (func == RAP_NetServerEnum3) { 275 strlcpy(p,"WrLehDzz", sizeof(param)-PTR_DIFF(p,param)); 278 276 } else { 279 277 strlcpy(p,"WrLehDz", sizeof(param)-PTR_DIFF(p,param)); … … 294 292 */ 295 293 len = push_ascii(p, 296 last_entry ? last_entry :workgroup,294 workgroup, 297 295 sizeof(param) - PTR_DIFF(p,param) - 1, 298 296 STR_TERMINATE|STR_UPPER); … … 303 301 } 304 302 p += len; 303 304 if (func == RAP_NetServerEnum3) { 305 len = push_ascii(p, 306 last_entry ? last_entry : "", 307 sizeof(param) - PTR_DIFF(p,param) - 1, 308 STR_TERMINATE); 309 310 if (len == (size_t)-1) { 311 SAFE_FREE(last_entry); 312 return false; 313 } 314 p += len; 315 } 316 317 /* Next time through we need to use the continue api */ 318 func = RAP_NetServerEnum3; 305 319 306 320 if (!cli_api(cli, … … 365 379 char *s1, *s2; 366 380 TALLOC_CTX *frame = talloc_stackframe(); 381 uint32_t entry_stype; 367 382 368 383 if (p + 26 > rdata_end) { … … 375 390 cmnt = comment_offset?(rdata+comment_offset):""; 376 391 377 if (comment_offset < 0 || comment_offset > (int)rdrcnt) {392 if (comment_offset < 0 || comment_offset >= (int)rdrcnt) { 378 393 TALLOC_FREE(frame); 379 394 continue; … … 388 403 } 389 404 390 stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;405 entry_stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY; 391 406 392 407 pull_string_talloc(frame,rdata,0, … … 400 415 } 401 416 402 fn(s1, stype, s2, state);417 fn(s1, entry_stype, s2, state); 403 418 TALLOC_FREE(frame); 404 419 } -
branches/samba-3.3.x/source/libsmb/libsmb_context.c
r342 r411 193 193 194 194 /* Things we have to clean up */ 195 free(smbc_getWorkgroup(context));196 195 smbc_setWorkgroup(context, NULL); 197 198 free(smbc_getNetbiosName(context));199 196 smbc_setNetbiosName(context, NULL); 200 201 free(smbc_getUser(context));202 197 smbc_setUser(context, NULL); 203 198 … … 424 419 { 425 420 int pid; 426 char *user = NULL;427 421 char *home = NULL; 428 422 … … 533 527 * FIXME: Is this the best way to get the user info? 534 528 */ 535 529 char *user = getenv("USER"); 536 530 /* walk around as "guest" if no username can be found */ 537 531 if (!user) { … … 547 541 548 542 smbc_setUser(context, user); 543 SAFE_FREE(user); 544 545 if (!smbc_getUser(context)) { 546 errno = ENOMEM; 547 return NULL; 548 } 549 549 } 550 550 … … 579 579 580 580 smbc_setNetbiosName(context, netbios_name); 581 SAFE_FREE(netbios_name); 582 583 if (!smbc_getNetbiosName(context)) { 584 errno = ENOMEM; 585 return NULL; 586 } 581 587 } 582 588 … … 600 606 601 607 smbc_setWorkgroup(context, workgroup); 608 SAFE_FREE(workgroup); 609 610 if (!smbc_getWorkgroup(context)) { 611 errno = ENOMEM; 612 return NULL; 613 } 602 614 } 603 615 -
branches/samba-3.3.x/source/libsmb/libsmb_dir.c
r370 r411 304 304 305 305 /* For each returned entry... */ 306 for (i = 0; i < total_entries; i++) {306 for (i = 0; i < info_ctr.ctr.ctr1->count; i++) { 307 307 308 308 /* pull out the share name */ -
branches/samba-3.3.x/source/libsmb/libsmb_path.c
r221 r411 309 309 return -1; 310 310 } 311 *pp_server[wl] = '\0';311 (*pp_server)[wl] = '\0'; 312 312 return 0; 313 313 } -
branches/samba-3.3.x/source/libsmb/libsmb_setget.c
r221 r411 40 40 smbc_setNetbiosName(SMBCCTX *c, char * netbios_name) 41 41 { 42 c->netbios_name = netbios_name; 42 SAFE_FREE(c->netbios_name); 43 if (netbios_name) { 44 c->netbios_name = SMB_STRDUP(netbios_name); 45 } 43 46 } 44 47 … … 54 57 smbc_setWorkgroup(SMBCCTX *c, char * workgroup) 55 58 { 56 c->workgroup = workgroup; 59 SAFE_FREE(c->workgroup); 60 if (workgroup) { 61 c->workgroup = SMB_STRDUP(workgroup); 62 } 57 63 } 58 64 … … 68 74 smbc_setUser(SMBCCTX *c, char * user) 69 75 { 70 c->user = user; 76 SAFE_FREE(c->user); 77 if (user) { 78 c->user = SMB_STRDUP(user); 79 } 71 80 } 72 81 -
branches/samba-3.3.x/source/nsswitch/pam_winbind.c
r370 r411 1037 1037 const char *search_location; 1038 1038 const char *comma; 1039 int len; 1039 1040 1040 1041 if (sid_list_buffer_size > 0) { … … 1092 1093 "to sid, please contact your administrator to see " 1093 1094 "if group %s is valid."), search_location, search_location); 1095 /* 1096 * The lookup of the last name failed.. 1097 * It results in require_member_of_sid ends with ',' 1098 * It is malformated parameter here, overwrite the last ','. 1099 */ 1100 len = strlen(sid_list_buffer); 1101 if (len) { 1102 if (sid_list_buffer[len - 1] == ',') { 1103 sid_list_buffer[len - 1] = '\0'; 1104 } 1105 } 1094 1106 } 1095 1107 -
branches/samba-3.3.x/source/param/loadparm.c
r407 r411 590 590 False, /* bOnlyUser */ 591 591 True, /* bMangledNames */ 592 #ifndef __OS2__593 /* Future default in newer Samba versions */594 True, /* bWidelinks */595 #else596 592 False, /* bWidelinks */ 597 #endif598 593 True, /* bSymlinks */ 599 594 False, /* bSyncAlways */ … … 5362 5357 FN_LOCAL_BOOL(lp_onlyuser, bOnlyUser) 5363 5358 FN_LOCAL_PARM_BOOL(lp_manglednames, bMangledNames) 5364 FN_LOCAL_BOOL(lp_widelinks, bWidelinks)5365 5359 FN_LOCAL_BOOL(lp_symlinks, bSymlinks) 5366 5360 FN_LOCAL_BOOL(lp_syncalways, bSyncAlways) … … 9610 9604 return Globals.szSocketAddress; 9611 9605 } 9606 9607 /******************************************************************* 9608 Safe wide links checks. 9609 This helper function always verify the validity of wide links, 9610 even after a configuration file reload. 9611 ********************************************************************/ 9612 9613 static bool lp_widelinks_internal(int snum) 9614 { 9615 return (bool)(LP_SNUM_OK(snum)? ServicePtrs[(snum)]->bWidelinks : 9616 sDefault.bWidelinks); 9617 } 9618 9619 void widelinks_warning(int snum) 9620 { 9621 if (lp_unix_extensions() && lp_widelinks_internal(snum)) { 9622 DEBUG(0,("Share '%s' has wide links and unix extensions enabled. " 9623 "These parameters are incompatible. " 9624 "Wide links will be disabled for this share.\n", 9625 lp_servicename(snum) )); 9626 } 9627 } 9628 9629 bool lp_widelinks(int snum) 9630 { 9631 /* wide links is always incompatible with unix extensions */ 9632 if (lp_unix_extensions()) { 9633 return false; 9634 } 9635 9636 return lp_widelinks_internal(snum); 9637 } -
branches/samba-3.3.x/source/passdb/login_cache.c
r206 r411 68 68 TDB_DATA databuf; 69 69 LOGIN_CACHE *entry; 70 uint32_t entry_timestamp = 0, bad_password_time = 0; 70 71 71 72 if (!login_cache_init()) … … 92 93 return NULL; 93 94 } 95 ZERO_STRUCTP(entry); 94 96 95 97 if (tdb_unpack (databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT, 96 &entry->entry_timestamp, &entry->acct_ctrl, 97 &entry->bad_password_count, 98 &entry->bad_password_time) == -1) { 98 &entry_timestamp, 99 &entry->acct_ctrl, 100 &entry->bad_password_count, 101 &bad_password_time) == -1) { 99 102 DEBUG(7, ("No cache entry found\n")); 100 103 SAFE_FREE(entry); … … 102 105 return NULL; 103 106 } 107 108 /* Deal with possible 64-bit time_t. */ 109 entry->entry_timestamp = (time_t)entry_timestamp; 110 entry->bad_password_time = (time_t)bad_password_time; 104 111 105 112 SAFE_FREE(databuf.dptr); … … 116 123 TDB_DATA databuf; 117 124 bool ret; 125 uint32_t entry_timestamp; 126 uint32_t bad_password_time = (uint32_t)entry.bad_password_time; 118 127 119 128 if (!login_cache_init()) … … 130 139 } 131 140 132 entry .entry_timestamp =time(NULL);141 entry_timestamp = (uint32_t)time(NULL); 133 142 134 143 databuf.dsize = 135 144 tdb_pack(NULL, 0, SAM_CACHE_FORMAT, 136 entry .entry_timestamp,145 entry_timestamp, 137 146 entry.acct_ctrl, 138 147 entry.bad_password_count, 139 entry.bad_password_time);148 bad_password_time); 140 149 databuf.dptr = SMB_MALLOC_ARRAY(uint8, databuf.dsize); 141 150 if (!databuf.dptr) { … … 145 154 146 155 if (tdb_pack(databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT, 147 entry .entry_timestamp,156 entry_timestamp, 148 157 entry.acct_ctrl, 149 158 entry.bad_password_count, 150 entry.bad_password_time)159 bad_password_time) 151 160 != databuf.dsize) { 152 161 SAFE_FREE(keystr); -
branches/samba-3.3.x/source/smbd/ipc.c
r224 r411 163 163 rparam, tot_param_sent, this_lparam, 164 164 rdata, tot_data_sent, this_ldata); 165 166 SSVAL(outbuf,smb_vwv0,lparam); 167 SSVAL(outbuf,smb_vwv1,ldata); 165 168 166 169 SSVAL(outbuf,smb_vwv3,this_lparam); -
branches/samba-3.3.x/source/smbd/lanman.c
r309 r411 1353 1353 1354 1354 1355 static boolsrv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2)1355 static int srv_comp(struct srv_info_struct *s1,struct srv_info_struct *s2) 1356 1356 { 1357 1357 return(strcmp(s1->name,s2->name)); … … 1457 1457 s->name, s->type, s->comment, s->domain)); 1458 1458 1459 if (data_len < =buf_len) {1459 if (data_len < buf_len) { 1460 1460 counted++; 1461 1461 fixed_len += f_len; … … 1821 1821 total++; 1822 1822 data_len += fill_share_info(conn,i,uLevel,0,&f_len,0,&s_len,0); 1823 if (data_len < =buf_len) {1823 if (data_len < buf_len) { 1824 1824 counted++; 1825 1825 fixed_len += f_len; -
branches/samba-3.3.x/source/smbd/mangle_hash.c
r370 r411 336 336 337 337 SMB_ASSERT(chartest != NULL); 338 memset(chartest, '\0', 256); 338 339 339 340 for( s = (const unsigned char *)basechars; *s; s++ ) { … … 412 413 TDB_DATA data_val; 413 414 char mangled_name_key[13]; 414 char *s1 ;415 char *s2 ;415 char *s1 = NULL; 416 char *s2 = NULL; 416 417 417 418 /* If the cache isn't initialized, give up. */ … … 452 453 } 453 454 /* Restore the change we made to the const string. */ 454 *s2 = '.'; 455 if (s2) { 456 *s2 = '.'; 457 } 455 458 } 456 459 -
branches/samba-3.3.x/source/smbd/server.c
r370 r411 1248 1248 gain_root_group_privilege(); 1249 1249 1250 /* 1251 * Ensure we have CAP_KILL capability set on Linux, 1252 * where we need this to communicate with threads. 1253 * This is inherited by new threads, but not by new 1254 * processes across exec(). 1255 */ 1256 set_effective_capability(KILL_CAPABILITY); 1257 1250 1258 fault_setup((void (*)(void *))exit_server_fault); 1251 1259 dump_core_setup("smbd"); -
branches/samba-3.3.x/source/smbd/service.c
r338 r411 725 725 int ret; 726 726 char addr[INET6_ADDRSTRLEN]; 727 bool on_err_call_dis_hook = false;728 727 NTSTATUS status; 729 728 … … 926 925 } 927 926 928 /*929 * If widelinks are disallowed we need to canonicalise the connect930 * path here to ensure we don't have any symlinks in the931 * connectpath. We will be checking all paths on this connection are932 * below this directory. We must do this after the VFS init as we933 * depend on the realpath() pointer in the vfs table. JRA.934 */935 if (!lp_widelinks(snum)) {936 if (!canonicalize_connect_path(conn)) {937 DEBUG(0, ("canonicalize_connect_path failed "938 "for service %s, path %s\n",939 lp_servicename(snum),940 conn->connectpath));941 conn_free(conn);942 *pstatus = NT_STATUS_BAD_NETWORK_NAME;943 return NULL;944 }945 }946 947 927 if ((!conn->printer) && (!conn->ipc)) { 948 928 conn->notify_ctx = notify_init(conn, server_id_self(), … … 952 932 } 953 933 954 /* ROOT Activities: */ 934 /* ROOT Activities: */ 935 /* explicitly check widelinks here so that we can correctly warn 936 * in the logs. */ 937 widelinks_warning(snum); 938 955 939 /* 956 940 * Enforce the max connections parameter. … … 977 961 return NULL; 978 962 } 963 964 /* Invoke VFS make connection hook - must be the first 965 VFS operation we do. */ 966 967 if (SMB_VFS_CONNECT(conn, lp_servicename(snum), 968 conn->server_info->unix_name) < 0) { 969 DEBUG(0,("make_connection: VFS make connection failed!\n")); 970 yield_connection(conn, lp_servicename(snum)); 971 conn_free(conn); 972 *pstatus = NT_STATUS_UNSUCCESSFUL; 973 return NULL; 974 } 975 976 /* 977 * Fix compatibility issue pointed out by Volker. 978 * We pass the conn->connectpath to the preexec 979 * scripts as a parameter, so attempt to canonicalize 980 * it here before calling the preexec scripts. 981 * We ignore errors here, as it is possible that 982 * the conn->connectpath doesn't exist yet and 983 * the preexec scripts will create them. 984 */ 985 986 (void)canonicalize_connect_path(conn); 979 987 980 988 /* Preexecs are done here as they might make the dir we are to ChDir … … 996 1004 DEBUG(1,("root preexec gave %d - failing " 997 1005 "connection\n", ret)); 1006 SMB_VFS_DISCONNECT(conn); 998 1007 yield_connection(conn, lp_servicename(snum)); 999 1008 conn_free(conn); … … 1007 1016 /* No point continuing if they fail the basic checks */ 1008 1017 DEBUG(0,("Can't become connected user!\n")); 1018 SMB_VFS_DISCONNECT(conn); 1009 1019 yield_connection(conn, lp_servicename(snum)); 1010 1020 conn_free(conn); … … 1039 1049 } 1040 1050 1051 /* 1052 * If widelinks are disallowed we need to canonicalise the connect 1053 * path here to ensure we don't have any symlinks in the 1054 * connectpath. We will be checking all paths on this connection are 1055 * below this directory. We must do this after the VFS init as we 1056 * depend on the realpath() pointer in the vfs table. JRA. 1057 */ 1058 if (!lp_widelinks(snum)) { 1059 if (!canonicalize_connect_path(conn)) { 1060 DEBUG(0, ("canonicalize_connect_path failed " 1061 "for service %s, path %s\n", 1062 lp_servicename(snum), 1063 conn->connectpath)); 1064 *pstatus = NT_STATUS_BAD_NETWORK_NAME; 1065 goto err_root_exit; 1066 } 1067 } 1068 1041 1069 #ifdef WITH_FAKE_KASERVER 1042 1070 if (lp_afs_share(snum)) { … … 1054 1082 } 1055 1083 1056 /* Invoke VFS make connection hook - do this before the VFS_STAT call1057 to allow any filesystems needing user credentials to initialize1058 themselves. */1059 1060 if (SMB_VFS_CONNECT(conn, lp_servicename(snum),1061 conn->server_info->unix_name) < 0) {1062 DEBUG(0,("make_connection: VFS make connection failed!\n"));1063 *pstatus = NT_STATUS_UNSUCCESSFUL;1064 goto err_root_exit;1065 }1066 1067 /* Any error exit after here needs to call the disconnect hook. */1068 on_err_call_dis_hook = true;1069 1084 1070 1085 /* win2000 does not check the permissions on the directory … … 1139 1154 1140 1155 change_to_root_user(); 1141 if (on_err_call_dis_hook) { 1142 /* Call VFS disconnect hook */ 1143 SMB_VFS_DISCONNECT(conn); 1144 } 1156 /* Call VFS disconnect hook */ 1157 SMB_VFS_DISCONNECT(conn); 1145 1158 yield_connection(conn, lp_servicename(snum)); 1146 1159 conn_free(conn); -
branches/samba-3.3.x/source/smbd/trans2.c
r370 r411 5249 5249 char *link_target = NULL; 5250 5250 const char *newname = fname; 5251 NTSTATUS status = NT_STATUS_OK;5252 5251 TALLOC_CTX *ctx = talloc_tos(); 5253 5252 … … 5268 5267 if (!link_target) { 5269 5268 return NT_STATUS_INVALID_PARAMETER; 5270 }5271 5272 /* !widelinks forces the target path to be within the share. */5273 /* This means we can interpret the target as a pathname. */5274 if (!lp_widelinks(SNUM(conn))) {5275 char *rel_name = NULL;5276 char *last_dirp = NULL;5277 5278 if (*link_target == '/') {5279 /* No absolute paths allowed. */5280 return NT_STATUS_ACCESS_DENIED;5281 }5282 rel_name = talloc_strdup(ctx,newname);5283 if (!rel_name) {5284 return NT_STATUS_NO_MEMORY;5285 }5286 last_dirp = strrchr_m(rel_name, '/');5287 if (last_dirp) {5288 last_dirp[1] = '\0';5289 } else {5290 rel_name = talloc_strdup(ctx,"./");5291 if (!rel_name) {5292 return NT_STATUS_NO_MEMORY;5293 }5294 }5295 rel_name = talloc_asprintf_append(rel_name,5296 "%s",5297 link_target);5298 if (!rel_name) {5299 return NT_STATUS_NO_MEMORY;5300 }5301 5302 status = check_name(conn, rel_name);5303 if (!NT_STATUS_IS_OK(status)) {5304 return status;5305 }5306 5269 } 5307 5270 -
branches/samba-3.3.x/source/smbd/vfs.c
r206 r411 940 940 /* Check for widelinks allowed. */ 941 941 if (!lp_widelinks(SNUM(conn)) && (strncmp(conn->connectpath, resolved_name, con_path_len) != 0)) { 942 DEBUG(2, ("reduce_name: Bad access attempt: %s is a symlink outside the share path ", fname));942 DEBUG(2, ("reduce_name: Bad access attempt: %s is a symlink outside the share path\n", fname)); 943 943 if (free_resolved_name) { 944 944 SAFE_FREE(resolved_name); -
branches/samba-3.3.x/source/utils/net_rpc.c
r370 r411 588 588 int net_rpc_getsid(struct net_context *c, int argc, const char **argv) 589 589 { 590 int conn_flags = NET_FLAGS_PDC; 591 592 if (!c->opt_user_specified) { 593 conn_flags |= NET_FLAGS_ANONYMOUS; 594 } 595 590 596 if (c->display_usage) { 591 597 d_printf("Usage:\n" … … 596 602 597 603 return run_rpc_command(c, NULL, &ndr_table_samr.syntax_id, 598 NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,604 conn_flags, 599 605 rpc_getsid_internals, 600 606 argc, argv); -
branches/samba-3.3.x/source/web/cgi.c
r206 r411 659 659 if (inetd_server) { 660 660 char addr[INET6_ADDRSTRLEN]; 661 return get_peer_addr(1,addr,sizeof(addr)); 661 get_peer_addr(1,addr,sizeof(addr)); 662 return talloc_strdup(talloc_tos(), addr); 662 663 } 663 664 return getenv("REMOTE_ADDR"); -
branches/samba-3.3.x/source/winbindd/winbindd_cm.c
r342 r411 1619 1619 1620 1620 /* Internal connections never use the network. */ 1621 if (domain->internal ) {1621 if (domain->internal || !winbindd_can_contact_domain(domain)) { 1622 1622 domain->initialized = True; 1623 1623 return NT_STATUS_OK; … … 1747 1747 domain->initialized = True; 1748 1748 1749 if ( !winbindd_can_contact_domain( domain) )1750 domain->internal = True;1751 1752 1749 break; 1753 1750 } -
branches/samba-3.3.x/source/winbindd/winbindd_domain.c
r206 r411 25 25 #undef DBGC_CLASS 26 26 #define DBGC_CLASS DBGC_WINBIND 27 28 static const struct winbindd_child_dispatch_table domain_dispatch_table[];29 30 void setup_domain_child(struct winbindd_domain *domain,31 struct winbindd_child *child)32 {33 setup_child(child, domain_dispatch_table,34 "log.wb", domain->name);35 36 child->domain = domain;37 }38 27 39 28 static const struct winbindd_child_dispatch_table domain_dispatch_table[] = { … … 118 107 } 119 108 }; 109 110 void setup_domain_child(struct winbindd_domain *domain, 111 struct winbindd_child *child) 112 { 113 setup_child(child, domain_dispatch_table, 114 "log.wb", domain->name); 115 116 child->domain = domain; 117 } -
branches/samba-3.3.x/source/winbindd/winbindd_idmap.c
r206 r411 39 39 #define DBGC_CLASS DBGC_WINBIND 40 40 41 static const struct winbindd_child_dispatch_table idmap_dispatch_table[];42 43 41 static struct winbindd_child static_idmap_child; 44 45 void init_idmap_child(void)46 {47 setup_child(&static_idmap_child,48 idmap_dispatch_table,49 "log.winbindd", "idmap");50 }51 42 52 43 struct winbindd_child *idmap_child(void) … … 565 556 } 566 557 }; 558 559 void init_idmap_child(void) 560 { 561 setup_child(&static_idmap_child, 562 idmap_dispatch_table, 563 "log.winbindd", "idmap"); 564 } -
branches/samba-3.3.x/source/winbindd/winbindd_locator.c
r206 r411 28 28 29 29 30 static const struct winbindd_child_dispatch_table locator_dispatch_table[];31 32 30 static struct winbindd_child static_locator_child; 33 34 void init_locator_child(void)35 {36 setup_child(&static_locator_child,37 locator_dispatch_table,38 "log.winbindd", "locator");39 }40 31 41 32 struct winbindd_child *locator_child(void) … … 165 156 } 166 157 }; 158 159 void init_locator_child(void) 160 { 161 setup_child(&static_locator_child, 162 locator_dispatch_table, 163 "log.winbindd", "locator"); 164 }
Note:
See TracChangeset
for help on using the changeset viewer.