Changeset 309 for branches/samba-3.3.x/source
- Timestamp:
- Aug 4, 2009, 8:51:22 AM (16 years ago)
- Location:
- branches/samba-3.3.x/source
- Files:
-
- 1 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/VERSION
r285 r309 26 26 SAMBA_VERSION_MAJOR=3 27 27 SAMBA_VERSION_MINOR=3 28 SAMBA_VERSION_RELEASE= 628 SAMBA_VERSION_RELEASE=7 29 29 30 30 ######################################################## … … 85 85 # # 86 86 ######################################################## 87 SAMBA_VERSION_VENDOR_SUFFIX= 87 SAMBA_VERSION_VENDOR_SUFFIX="eCS 1.1.beta2" 88 88 SAMBA_VERSION_VENDOR_PATCH= 89 89 -
branches/samba-3.3.x/source/configure
r274 r309 77575 77575 77576 77576 77577 if test x"$enable_dnssd" = =x"yes"; then77577 if test x"$enable_dnssd" = x"yes"; then 77578 77578 have_dnssd_support=yes 77579 77579 -
branches/samba-3.3.x/source/configure.in
r274 r309 6182 6182 6183 6183 AC_SUBST(DNSSD_LIBS) 6184 if test x"$enable_dnssd" = =x"yes"; then6184 if test x"$enable_dnssd" = x"yes"; then 6185 6185 have_dnssd_support=yes 6186 6186 -
branches/samba-3.3.x/source/include/version.h
r285 r309 2 2 #define SAMBA_VERSION_MAJOR 3 3 3 #define SAMBA_VERSION_MINOR 3 4 #define SAMBA_VERSION_RELEASE 6 5 #define SAMBA_VERSION_OFFICIAL_STRING "3.3.6" 4 #define SAMBA_VERSION_RELEASE 7 5 #define SAMBA_VERSION_OFFICIAL_STRING "3.3.7" 6 #define SAMBA_VERSION_VENDOR_SUFFIX "eCS 1.1.beta2" 6 7 #define SAMBA_VERSION_STRING samba_version_string() -
branches/samba-3.3.x/source/lib/netapi/joindomain.c
r206 r309 208 208 u->in.domain_name = domain; 209 209 u->in.unjoin_flags = r->in.unjoin_flags; 210 u->in.delete_machine_account = false; 210 211 u->in.modify_config = true; 211 212 u->in.debug = true; -
branches/samba-3.3.x/source/lib/netapi/user.c
r224 r309 1772 1772 switch (r->in.level) { 1773 1773 case 0: 1774 user_mask = SAMR_USER_ACCESS_SET_ATTRIBUTES; 1775 break; 1774 1776 case 1003: 1775 1777 user_mask = SAMR_USER_ACCESS_SET_PASSWORD; -
branches/samba-3.3.x/source/lib/system.c
r248 r309 117 117 A read wrapper that will deal with EINTR. 118 118 ********************************************************************/ 119 119 120 ssize_t sys_read(int fd, void *buf, size_t count) 120 121 { 121 122 ssize_t ret; 123 122 124 do { 123 125 ret = read(fd, buf, count); … … 129 131 A write wrapper that will deal with EINTR. 130 132 ********************************************************************/ 133 131 134 ssize_t sys_write(int fd, const void *buf, size_t count) 132 135 { 133 136 ssize_t ret; 137 134 138 do { 135 139 ret = write(fd, buf, count); -
branches/samba-3.3.x/source/lib/util.c
r248 r309 2723 2723 } 2724 2724 if (name) { 2725 *name = "";2725 *name = dir; 2726 2726 } 2727 2727 return True; -
branches/samba-3.3.x/source/libnet/libnet_join.c
r224 r309 1924 1924 } 1925 1925 1926 if (!(r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) && 1927 !r->in.delete_machine_account) { 1928 libnet_join_unjoindomain_remove_secrets(mem_ctx, r); 1929 return WERR_OK; 1930 } 1931 1926 1932 if (!r->in.dc_name) { 1927 1933 struct netr_DsRGetDCNameInfo *info; … … 1949 1955 } 1950 1956 1951 status = libnet_join_unjoindomain_rpc(mem_ctx, r);1952 if (!NT_STATUS_IS_OK(status)) {1953 libnet_unjoin_set_error_string(mem_ctx, r,1954 "failed to disable machine account via rpc: %s",1955 get_friendly_nt_error_msg(status));1956 if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {1957 return WERR_SETUP_NOT_JOINED;1958 }1959 return ntstatus_to_werror(status);1960 }1961 1962 r->out.disabled_machine_account = true;1963 1964 1957 #ifdef WITH_ADS 1965 if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) { 1958 /* for net ads leave, try to delete the account. If it works, 1959 no sense in disabling. If it fails, we can still try to 1960 disable it. jmcd */ 1961 1962 if (r->in.delete_machine_account) { 1966 1963 ADS_STATUS ads_status; 1967 libnet_unjoin_connect_ads(mem_ctx, r); 1968 ads_status = libnet_unjoin_remove_machine_acct(mem_ctx, r); 1964 ads_status = libnet_unjoin_connect_ads(mem_ctx, r); 1965 if (ADS_ERR_OK(ads_status)) { 1966 /* dirty hack */ 1967 r->out.dns_domain_name = 1968 talloc_strdup(mem_ctx, 1969 r->in.ads->server.realm); 1970 ads_status = 1971 libnet_unjoin_remove_machine_acct(mem_ctx, r); 1972 } 1969 1973 if (!ADS_ERR_OK(ads_status)) { 1970 1974 libnet_unjoin_set_error_string(mem_ctx, r, … … 1973 1977 } else { 1974 1978 r->out.deleted_machine_account = true; 1975 /* dirty hack */1976 r->out.dns_domain_name = talloc_strdup(mem_ctx,1977 r->in.ads->server.realm);1978 1979 W_ERROR_HAVE_NO_MEMORY(r->out.dns_domain_name); 1980 libnet_join_unjoindomain_remove_secrets(mem_ctx, r); 1981 return WERR_OK; 1979 1982 } 1980 1983 } 1981 1984 #endif /* WITH_ADS */ 1985 1986 /* The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag really means 1987 "disable". */ 1988 if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE) { 1989 status = libnet_join_unjoindomain_rpc(mem_ctx, r); 1990 if (!NT_STATUS_IS_OK(status)) { 1991 libnet_unjoin_set_error_string(mem_ctx, r, 1992 "failed to disable machine account via rpc: %s", 1993 get_friendly_nt_error_msg(status)); 1994 if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) { 1995 return WERR_SETUP_NOT_JOINED; 1996 } 1997 return ntstatus_to_werror(status); 1998 } 1999 2000 r->out.disabled_machine_account = true; 2001 } 2002 2003 /* If disable succeeded or was not requested at all, we 2004 should be getting rid of our end of things */ 1982 2005 1983 2006 libnet_join_unjoindomain_remove_secrets(mem_ctx, r); -
branches/samba-3.3.x/source/librpc/gen_ndr/libnet_join.h
r206 r309 59 59 const char * machine_password; 60 60 uint32_t unjoin_flags; 61 uint8_t delete_machine_account; 61 62 uint8_t modify_config; 62 63 struct dom_sid *domain_sid;/* [ref] */ -
branches/samba-3.3.x/source/librpc/gen_ndr/ndr_libnet_join.c
r206 r309 90 90 #endif 91 91 ndr_print_wkssvc_joinflags(ndr, "unjoin_flags", r->in.unjoin_flags); 92 ndr_print_uint8(ndr, "delete_machine_account", r->in.delete_machine_account); 92 93 ndr_print_uint8(ndr, "modify_config", r->in.modify_config); 93 94 ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid); -
branches/samba-3.3.x/source/librpc/idl/libnet_join.idl
r206 r309 54 54 [in] string machine_password, 55 55 [in] wkssvc_joinflags unjoin_flags, 56 [in] boolean8 delete_machine_account, 56 57 [in] boolean8 modify_config, 57 58 [in] dom_sid *domain_sid, -
branches/samba-3.3.x/source/libsmb/passchange.c
r274 r309 187 187 if (asprintf(err_str, "SAMR connection to machine %s " 188 188 "failed. Error was %s, but LANMAN password " 189 "change dare disabled\n",189 "changes are disabled\n", 190 190 remote_machine, nt_errstr(result)) == -1) { 191 191 *err_str = NULL; -
branches/samba-3.3.x/source/nsswitch/pam_winbind.c
r224 r309 915 915 /* good catch from Ralf Haferkamp: an expiry of "never" is translated 916 916 * to -1 */ 917 if (policy->expire <= 0) { 917 if ((policy->expire == (int64_t)-1) || 918 (policy->expire == 0)) { 918 919 return; 919 920 } … … 2284 2285 char *domain; 2285 2286 char *name; 2287 char *p; 2286 2288 2287 2289 /* This cannot work when the winbind separator = @ */ … … 2292 2294 } 2293 2295 2296 name = talloc_strdup(ctx, upn); 2297 if (!name) { 2298 return NULL; 2299 } 2300 2301 if ((p = strchr(name, '@')) != NULL) { 2302 *p = 0; 2303 domain = p + 1; 2304 } 2305 2294 2306 /* Convert the UPN to a SID */ 2295 2307 2296 wbc_status = wbcLookupName( "", upn, &sid, &type);2308 wbc_status = wbcLookupName(domain, name, &sid, &type); 2297 2309 if (!WBC_ERROR_IS_OK(wbc_status)) { 2298 2310 return NULL; -
branches/samba-3.3.x/source/rpc_server/srv_lsa_nt.c
r224 r309 1091 1091 status = _lsa_LookupNames(p, &q); 1092 1092 1093 sid_array2->count = sid_array->count; 1093 1094 sid_array2->sids = TALLOC_ARRAY(p->mem_ctx, struct lsa_TranslatedSid2, sid_array->count); 1094 1095 if (!sid_array2->sids) { -
branches/samba-3.3.x/source/script/tests/test_posix_s3.sh
r224 r309 39 39 rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC" 40 40 rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME" 41 rpc="$rpc RPC-LSA-LOOKUPSIDS RPC-JOIN "41 rpc="$rpc RPC-LSA-LOOKUPSIDS RPC-JOIN RPC-SAMR-MACHINE-AUTH" 42 42 43 43 # NOTE: to enable the UNIX-WHOAMI test, we need to change the default share -
branches/samba-3.3.x/source/smbd/lanman.c
r206 r309 1215 1215 } 1216 1216 fstrcpy(s->comment, p); 1217 string_truncate(s->comment, MAX_SERVER_STRING_LENGTH); 1217 1218 1218 1219 s->domain[0] = '\0'; -
branches/samba-3.3.x/source/smbd/open.c
r224 r309 318 318 if (!CAN_WRITE(conn)) { 319 319 /* It's a read-only share - fail if we wanted to write. */ 320 if(accmode != O_RDONLY ) {320 if(accmode != O_RDONLY || (flags & O_TRUNC) || (flags & O_APPEND)) { 321 321 DEBUG(3,("Permission denied opening %s\n", path)); 322 322 return NT_STATUS_ACCESS_DENIED; … … 326 326 access into the directory. 327 327 */ 328 flags &= ~ O_CREAT;329 local_flags &= ~ O_CREAT;328 flags &= ~(O_CREAT|O_EXCL); 329 local_flags &= ~(O_CREAT|O_EXCL); 330 330 } 331 331 } -
branches/samba-3.3.x/source/smbd/server.c
r274 r309 356 356 unsigned dns_port = 0; 357 357 358 if (!is_daemon) {359 return open_sockets_inetd();360 }361 362 358 #ifdef HAVE_ATEXIT 363 359 { … … 369 365 } 370 366 #endif 367 368 if (!is_daemon) { 369 /* 370 * Stop zombies the old way. 371 * We aren't forking any new 372 * 'normal' connections when 373 * run from [x]inetd. 374 */ 375 CatchChild(); 376 return open_sockets_inetd(); 377 } 371 378 372 379 /* Stop zombies */ … … 1260 1267 BlockSignals(False, SIGTERM); 1261 1268 1269 /* Ensure we leave no zombies until we 1270 * correctly set up child handling below. */ 1271 CatchChild(); 1272 1262 1273 /* we want total control over the permissions on created files, 1263 1274 so set our umask to 0 */ -
branches/samba-3.3.x/source/smbd/trans2.c
r222 r309 4938 4938 if (setting_write_time) { 4939 4939 /* 4940 * This was a setfileinfo on an open file.4940 * This was a Windows setfileinfo on an open file. 4941 4941 * NT does this a lot. We also need to 4942 4942 * set the time here, as it can be read by … … 6016 6016 bool delete_on_fail = False; 6017 6017 enum perm_type ptype; 6018 files_struct *all_fsps = NULL; 6019 bool modify_mtime = true; 6020 struct file_id id; 6018 6021 6019 6022 if (total_data < 100) { … … 6162 6165 6163 6166 /* Deal with any time changes. */ 6164 6165 return smb_set_file_time(conn, 6167 id = vfs_file_id_from_sbuf(conn, psbuf); 6168 for(all_fsps = file_find_di_first(id); all_fsps; 6169 all_fsps = file_find_di_next(all_fsps)) { 6170 /* 6171 * We're setting the time explicitly for UNIX. 6172 * Cancel any pending changes over all handles. 6173 */ 6174 all_fsps->update_write_time_on_close = false; 6175 TALLOC_FREE(all_fsps->update_write_time_event); 6176 } 6177 6178 /* 6179 * Override the "setting_write_time" 6180 * parameter here as it almost does what 6181 * we need. Just remember if we modified 6182 * mtime and send the notify ourselves. 6183 */ 6184 if (null_timespec(ts[1])) { 6185 modify_mtime = false; 6186 } 6187 6188 status = smb_set_file_time(conn, 6166 6189 fsp, 6167 6190 fname, 6168 6191 psbuf, 6169 6192 ts, 6170 true); 6193 false); 6194 6195 if (modify_mtime) { 6196 notify_fname(conn, NOTIFY_ACTION_MODIFIED, 6197 FILE_NOTIFY_CHANGE_LAST_WRITE, fname); 6198 } 6199 return status; 6171 6200 } 6172 6201 … … 6795 6824 } 6796 6825 6797 if (!CAN_WRITE(conn)) {6798 reply_doserror(req, ERRSRV, ERRaccess);6799 return;6800 }6801 6802 6826 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) { 6803 6827 reply_nterror(req, NT_STATUS_INVALID_LEVEL); 6804 6828 return; 6829 } 6830 6831 if (!CAN_WRITE(conn)) { 6832 /* Allow POSIX opens. The open path will deny 6833 * any non-readonly opens. */ 6834 if (info_level != SMB_POSIX_PATH_OPEN) { 6835 reply_doserror(req, ERRSRV, ERRaccess); 6836 return; 6837 } 6805 6838 } 6806 6839 … … 7109 7142 7110 7143 DEBUG(3,("call_trans2mkdir : name = %s\n", directory)); 7144 7145 status = resolve_dfspath(ctx, 7146 conn, 7147 req->flags2 & FLAGS2_DFS_PATHNAMES, 7148 directory, 7149 &directory); 7150 if (!NT_STATUS_IS_OK(status)) { 7151 if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { 7152 reply_botherror(req, 7153 NT_STATUS_PATH_NOT_COVERED, 7154 ERRSRV, ERRbadpath); 7155 } 7156 reply_nterror(req, status); 7157 return; 7158 } 7111 7159 7112 7160 status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf); -
branches/samba-3.3.x/source/utils/net_ads.c
r206 r309 902 902 r->in.admin_password = net_prompt_pass(c, c->opt_user_name); 903 903 r->in.modify_config = lp_config_backend_is_registry(); 904 905 /* Try to delete it, but if that fails, disable it. The 906 WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE really means "disable */ 904 907 r->in.unjoin_flags = WKSSVC_JOIN_FLAGS_JOIN_TYPE | 905 908 WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE; 909 r->in.delete_machine_account = true; 906 910 907 911 werr = libnet_Unjoin(ctx, r); … … 913 917 } 914 918 915 if ( W_ERROR_IS_OK(werr)) {919 if (r->out.deleted_machine_account) { 916 920 d_printf("Deleted account for '%s' in realm '%s'\n", 917 921 r->in.machine_name, r->out.dns_domain_name); … … 927 931 } 928 932 929 d_fprintf(stderr, "Failed to disable machine account for '%s' in realm '%s'\n", 933 /* Based on what we requseted, we shouldn't get here, but if 934 we did, it means the secrets were removed, and therefore 935 we have left the domain */ 936 d_fprintf(stderr, "Machine '%s' Left domain '%s'\n", 930 937 r->in.machine_name, r->out.dns_domain_name); 931 938 -
branches/samba-3.3.x/source/utils/net_rpc.c
r224 r309 5764 5764 char *cleartextpwd = NULL; 5765 5765 uint8_t nt_hash[16]; 5766 DATA_BLOB data ;5766 DATA_BLOB data = data_blob_null; 5767 5767 5768 5768 nt_status = rpccli_lsa_QueryTrustedDomainInfoBySid(pipe_hnd, mem_ctx, -
branches/samba-3.3.x/source/winbindd/winbindd_sid.c
r206 r309 94 94 name_domain = state->request.data.name.name; 95 95 name_user = p+1; 96 } else if ((p = strchr(state->request.data.name.name, '@')) != NULL) { 97 /* upn */ 98 name_domain = p + 1; 99 *p = 0; 100 name_user = state->request.data.name.name; 96 101 } else { 97 102 name_domain = state->request.data.name.dom_name; -
branches/samba-3.3.x/source/winbindd/winbindd_util.c
r206 r309 1145 1145 fstrcpy(domain, lp_workgroup()); 1146 1146 } else if ((p = strchr(domuser, '@')) != NULL) { 1147 fstrcpy(domain, ""); 1147 fstrcpy(domain, p + 1); 1148 user[PTR_DIFF(p, domuser)] = 0; 1148 1149 } else { 1149 1150 return False;
Note:
See TracChangeset
for help on using the changeset viewer.