Re: [Samba] Samba 3.0.25 Password Expiration, Disk Mapping and Winbindd Warning
On Sun, May 20, 2007 at 01:14:06AM +0200, Jancio Wodnik wrote: Yes, i have the same problems. I sugest revert back to 3.0.24 and have good sleep, waiting for 3.0.25a Can anybody please provide full debug level 10 logs of this? We have difficulties reproducing this, we just don't know under what exact circumstances this happens. We *want* to fix this, but right now we're kind of stuck. Volker Lendecke Samba Team pgpV0SwIbdQWV.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.25 Password Expiration, Disk Mapping and Winbindd Warning
On Sun, 20 May 2007 11:58:37 +0200 Volker Lendecke [EMAIL PROTECTED] wrote: On Sun, May 20, 2007 at 01:14:06AM +0200, Jancio Wodnik wrote: Yes, i have the same problems. I sugest revert back to 3.0.24 and have good sleep, waiting for 3.0.25a Can anybody please provide full debug level 10 logs of this? We have difficulties reproducing this, we just don't know under what exact circumstances this happens. I thought I have sent one to Jeremy [EMAIL PROTECTED]. Didn't he receive it? -- Best regards, imacat ^_*' [EMAIL PROTECTED] PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt Woman's Voice News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3.0.25 Password Expiration, Disk Mapping and Winbindd Warning
Volker Lendecke pisze: On Sun, May 20, 2007 at 01:14:06AM +0200, Jancio Wodnik wrote: Yes, i have the same problems. I sugest revert back to 3.0.24 and have good sleep, waiting for 3.0.25a Can anybody please provide full debug level 10 logs of this? We have difficulties reproducing this, we just don't know under what exact circumstances this happens. We *want* to fix this, but right now we're kind of stuck. Volker Lendecke Samba Team OK. I try generate log with debug level 10 on my centos4 update 5 x86_64 - upgrade again to samba from sernet: 3.0.24 - 3.0.25, but in late monday 20.05.2007, sory, maybe someone elese will be faster. Irens -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] BUIILTIN accounts with Samba 3.0.24 + LDAP
Does Samba cache info about builtin accounts? If so, where? I'd appreciate any nudges in the right direction here. I really don't have the option of rebuilding this server (unless there's a way to tell it what SID to use so that I don't have to re-migrate all of the user profiles). Any ideas are appreciated! Thanks! -Justin Justin Zipperle wrote: I'm having a problem with BUILTIN accounts on a Samba 3.0.24 PDC with an LDAP backend on Ubuntu. I followed this guide for setting up the server: http://samba.org/samba/docs/man/Samba-Guide/happy.html ...and everything worked well until I migrated all the user, machine, and group accounts from the old domain and the PDC went into production this morning. Once the machine went live, I started to notice that there were significant delays when connecting to shares or viewing security on files or folders within shares from WinXP Pro SP2 workstations. When viewing security, certain builtin accounts (Domain Users, Domain Admins, etc) wouldn't resolve to their DisplayNames and would instead show the SID...this after much delay. I've reindexed LDAP w/ slapindex thinking this was part of the problem, but it had no effect. I can see all of the BUILTIN accounts using net groupmap list and getent group, but I don't see them with net rpc rights list accounts. Any idea what I may have changed that broke this? -Justin -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Don't see Users and Groups in Samba Server from MMC WXPPRO
When I connect from MMC (Remote Administration) of a WXPPro client with the server Linux Samba PDC, so that the users and groups of the domain neither the Unix groups/passwd do not see? I have implemented svcctl but she did not solve east problem. Any idea?? Tks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba-3.0.25 Solaris 8, smbd
Built using: ./configure make make install Exit status when running /usr/local/samba/sbin/smbd -d10 -D is 0. # Samba config file created using SWAT # from 10.10.10.5 (10.10.10.5) # Date: 2006/06/28 10:47:07 # Global parameters [global] workgroup = MONARCHW server string = Ultra 60 guest account = none username map = /usr/local/samba/lib/users.map log level = 10 log file = /usr/local/samba/var/log.%m max log size = 50 dns proxy = No ldap ssl = no nt acl support = No -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] error setting trust account password
Hello, I've set up a FreeBSD pdc with a lot of help and now i'm trying to add a member server to the domain. This member server isn't a bdc, it's just a member server that coincidentally does printing. I'm following chapter 2 of the official howto and am issueing the command: net rpc join -Uroot%password error setting trust account password, can not join domain. I've got winbind running on the pdc and currently i don't have a firewall on it either. Any suggestions? Thanks. Dave. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba LDAP Directory Tree details
Hello List, i have set up a samba pdc with ldap, smbldap-tools about one year ago. Now i would like to extend it with OX, squid, etc... After checking out the LDAP Directory tree i was wondering what the Organisation Units DSA and ldmap are good for? My current tree looks like this: dc=example,dc=com + ou=Computers + ou=DSA + ou=Groups + ou=Idmap + ou=Users + sambaDomainName=MyDomain I also had a look at Collax´s PDC and they even have an additional PosixGroup. Their tree looks like this: dc=example,dc=com + ou=ABook + ou=groups + ou=Infrastructure + ou=people + ou=posixgroups + sambaDomainName=MyDomain Any idea why they have groups and posixgroups? If i would like to add other services than samba, would a directory tree like Collax has make more sense than my current samba-only tree? Thanks, Mario -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] SAMBA 4 AND LDAP, Where can we get the information??
On Thu, 2007-05-17 at 08:30 +0200, Fernando Moreno wrote: SAMBA 4 AND LDAP, Where can we get the information?? We are trying to get samba 4 working together with ldap, but there's no information anywhere. We'll be pleased if someone can tell us how to get this working. Thanks, and one more question... Why we can get the SAMBA4_TP4 and there is no man pages or any information about the implementations of this?? Thanks you so much and sorry for my poor english. I'm putting together documentation at: http://wiki.samba.org/index.php/Samba4/LDAP_Backend See the HOWTO section, which is my work-in-progress directions for Fedora DS. I'll be updating these for OpenLDAP soon. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Red Hat Inc. http://redhat.com signature.asc Description: This is a digitally signed message part -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] 3.0.25 breaks username map?
Hi there I was using username map under 3.0.24 so that when I connected from DOM\jhaar under (ADS Win2K3) Windows, it was mapped to my local jhaar Unix account - with homedir /home/jhaar, etc. However, when I upgraded to 3.0.25, I started getting NT_STATUS_LOGON_FAILURE errors - even when just trying to list the shares. This occurred using smbclient as well as Windows clients. Ends up it was that username map wasn't working correctly. It appears to be that when DOM\jhaar connects, it generates the following error: [2007/05/21 13:18:11, 10] passdb/lookup_sid.c:lookup_name(64) lookup_name: Unix User\jhaar = Unix User (domain), jhaar (name) [2007/05/21 13:18:11, 10] lib/util_pw.c:getpwnam_alloc(76) Got jhaar from pwnam_cache [2007/05/21 13:18:11, 5] passdb/lookup_sid.c:sid_to_uid(1401) winbind failed to find a uid for sid S-1-22-1-500 [2007/05/21 13:18:11, 1] auth/auth_util.c:create_token_from_username(1110) sid_to_uid for jhaar (S-1-22-1-500) failed [2007/05/21 13:18:11, 10] auth/auth_ntlmssp.c:auth_ntlmssp_check_password(131) create_local_token failed [2007/05/21 13:18:11, 3] smbd/error.c:error_packet_set(106) error packet at smbd/sesssetup.c(105) cmd=115 (SMBsesssetupX) NT_STATUS_LOGON_FAILURE The Unix account jhaar indeed has a UID of 500. If I remove the account from the username map file, then the problem disappears - although of course I can no longer connect to my homedir as the UIDs of jhaar cf. DOM\jhaar are different :-/ I have tried this with a couple of other domain accounts (I created Unix versions of the usernames) and the same thing occurs. If they are not in the username map file, they work - otherwise they don't. Has the format of username map changed? I currently have jhaar=DOM\jhaar and that worked under 3.0.24 and previous. I have rolled back to 3.0.24 and the problem disappears - so it's something in 3.0.25 fer shure... -- Cheers Jason Haar Information Security Manager, Trimble Navigation Ltd. Phone: +64 3 9635 377 Fax: +64 3 9635 417 PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Domain authentication not working
Hi all. I'm trying to share a printer out via samba, and it's suddenly stopped working. Samba says it's connecting to the DC, but then returning NT_STATUS_NO_SUCH_USER. It wasn't doing this earlier today. I haven't changed anything in the top half of the smb.conf file ... only the print-related stuff. Any ideas? The log is saying: [2007/05/21 11:40:26, 3] smbd/process.c:process_smb(1110) Transaction 8 of length 210 [2007/05/21 11:40:26, 3] smbd/process.c:switch_message(914) switch message SMBsesssetupX (pid 21422) conn 0x0 [2007/05/21 11:40:26, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0 [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X(849) wct=12 flg2=0xc807 [2007/05/21 11:40:26, 2] smbd/sesssetup.c:setup_new_vc_session(799) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(660) Doing spnego session setup [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(691) NativeOS=[Windows 2000 2195] NativeLanMan=[Windows 2000 5.0] PrimaryDomain=[] [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_spnego_negotiate(551) Got OID 1 3 6 1 4 1 311 2 2 10 [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_spnego_negotiate(554) Got secblob of size 40 [2007/05/21 11:40:26, 3] libsmb/ntlmssp.c:debug_ntlmssp_flags(63) Got NTLMSSP neg_flags=0xe2088297 [2007/05/21 11:40:26, 3] smbd/process.c:process_smb(1110) Transaction 9 of length 338 [2007/05/21 11:40:26, 3] smbd/process.c:switch_message(914) switch message SMBsesssetupX (pid 21422) conn 0x0 [2007/05/21 11:40:26, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0 [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X(849) wct=12 flg2=0xc807 [2007/05/21 11:40:26, 2] smbd/sesssetup.c:setup_new_vc_session(799) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(660) Doing spnego session setup [2007/05/21 11:40:26, 3] smbd/sesssetup.c:reply_sesssetup_and_X_spnego(691) NativeOS=[Windows 2000 2195] NativeLanMan=[Windows 2000 5.0] PrimaryDomain=[] [2007/05/21 11:40:26, 3] libsmb/ntlmssp.c:ntlmssp_server_auth(672) Got user=[administrator] domain=[NUSAUS] workstation=[VMDKASAK] len1=24 len2=24 [2007/05/21 11:40:26, 3] libsmb/namequery.c:get_dc_list(1426) get_dc_list: preferred server list: NUS_AUST_NT, * [2007/05/21 11:40:26, 3] libsmb/namequery_dc.c:rpc_dc_name(117) rpc_dc_name: Returning DC NUS_AUST_NT (10.146.0.2) for domain NUSAUS [2007/05/21 11:40:26, 3] libsmb/cliconnect.c:cli_start_connection(1426) Connecting to host=NUS_AUST_NT [2007/05/21 11:40:26, 3] lib/util_sock.c:open_socket_out(874) Connecting to 10.146.0.2 at port 445 [2007/05/21 11:40:26, 2] lib/util_sock.c:open_socket_out(911) error connecting to 10.146.0.2:445 (Connection refused) [2007/05/21 11:40:26, 3] lib/util_sock.c:open_socket_out(874) Connecting to 10.146.0.2 at port 139 [2007/05/21 11:40:26, 3] rpc_client/cli_pipe.c:rpc_pipe_bind(2081) rpc_pipe_bind: Remote machine NUS_AUST_NT pipe \lsarpc fnum 0x380b bind request returned ok. [2007/05/21 11:40:26, 3] rpc_parse/parse_lsa.c:lsa_io_sec_qos(224) lsa_io_sec_qos: length c does not match size 8 [2007/05/21 11:40:26, 3] auth/auth.c:check_ntlm_password(221) check_ntlm_password: Checking password for unmapped user [EMAIL PROTECTED] with the new password interface [2007/05/21 11:40:26, 3] auth/auth.c:check_ntlm_password(224) check_ntlm_password: mapped user is: [EMAIL PROTECTED] [2007/05/21 11:40:26, 3] smbd/sec_ctx.c:push_sec_ctx(208) push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1 [2007/05/21 11:40:26, 3] smbd/uid.c:push_conn_ctx(345) push_conn_ctx(0) : conn_ctx_stack_ndx = 0 [2007/05/21 11:40:26, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1 [2007/05/21 11:40:26, 3] smbd/sec_ctx.c:pop_sec_ctx(339) pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0 [2007/05/21 11:40:26, 3] libsmb/namequery.c:get_dc_list(1426) get_dc_list: preferred server list: NUS_AUST_NT, * [2007/05/21 11:40:26, 3] libsmb/namequery_dc.c:rpc_dc_name(117) rpc_dc_name: Returning DC NUS_AUST_NT (10.146.0.2) for domain NUSAUS [2007/05/21 11:40:26, 3] libsmb/cliconnect.c:cli_start_connection(1426) Connecting to host=NUS_AUST_NT [2007/05/21 11:40:26, 3] lib/util_sock.c:open_socket_out(874) Connecting to 10.146.0.2 at port 445 [2007/05/21 11:40:26, 2] lib/util_sock.c:open_socket_out(911) error connecting to 10.146.0.2:445 (Connection refused) [2007/05/21 11:40:26, 3] lib/util_sock.c:open_socket_out(874) Connecting to 10.146.0.2 at port 139 [2007/05/21 11:40:26, 3] rpc_client/cli_pipe.c:rpc_pipe_bind(2081) rpc_pipe_bind: Remote machine NUS_AUST_NT pipe \NETLOGON fnum 0x980a bind request returned ok. [2007/05/21 11:40:26, 3] rpc_client/cli_pipe.c:rpc_pipe_bind(2081) rpc_pipe_bind:
Re: [Samba] Domain authentication not working
On Mon, 2007-05-21 at 11:46 +1000, Daniel Kasak wrote: Hi all. I'm trying to share a printer out via samba, and it's suddenly stopped working. Samba says it's connecting to the DC, but then returning NT_STATUS_NO_SUCH_USER. Right. I have things 'working'. I added a 'dkasak' account on the samba server, and NOW it authenticates. Is there a way to allow clients to authenticate against DOMAIN accounts from an NT4 PDC to access services on a SAMBA server WITHOUT having a user account with a matching name on the samba server? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Domain authentication not working
You need to look at chapter 6 of the Samba 3 HOWTO on samba.org. You need to setup domain pass-through authentication. Are you using winbind? You should be getting all the domain accounts when you do wbinfo -u and getent passwd. If not, please refer to the above document. Good luck From: Daniel Kasak [EMAIL PROTECTED] To: samba@lists.samba.org Subject: Re: [Samba] Domain authentication not working Date: Mon, 21 May 2007 13:56:18 +1000 On Mon, 2007-05-21 at 11:46 +1000, Daniel Kasak wrote: Hi all. I'm trying to share a printer out via samba, and it's suddenly stopped working. Samba says it's connecting to the DC, but then returning NT_STATUS_NO_SUCH_USER. Right. I have things 'working'. I added a 'dkasak' account on the samba server, and NOW it authenticates. Is there a way to allow clients to authenticate against DOMAIN accounts from an NT4 PDC to access services on a SAMBA server WITHOUT having a user account with a matching name on the samba server? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba _ More photos, more messages, more storageget 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_2G_0507 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r23017 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2007-05-20 08:01:02 + (Sun, 20 May 2007) New Revision: 23017 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23017 Log: fixed the warning we have been getting for a long time: pvfs_close: failed to delete XXX during the BASE-DELETE test. It was a real bug, and could result in a delete on close triggering for a handle that had never fully opened. Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c 2007-05-19 22:29:59 UTC (rev 23016) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c 2007-05-20 08:01:02 UTC (rev 23017) @@ -270,6 +270,7 @@ f-handle-position = 0; f-handle-mode = 0; f-handle-sticky_write_time = False; + f-handle-open_completed= False; if ((create_options NTCREATEX_OPTIONS_DELETE_ON_CLOSE) pvfs_directory_empty(pvfs, f-handle-name)) { @@ -379,6 +380,8 @@ goto cleanup_delete; } + f-handle-open_completed = True; + io-generic.out.oplock_level = OPLOCK_NONE; io-generic.out.file.ntvfs= h; io-generic.out.create_action = create_action; @@ -437,6 +440,7 @@ } if (h-name-stream_name == NULL + h-open_completed pvfs_delete_on_close_set(h-pvfs, h, open_count, path) open_count == 1) { NTSTATUS status; @@ -701,6 +705,7 @@ f-handle-mode = 0; f-handle-have_opendb_entry = True; f-handle-sticky_write_time = False; + f-handle-open_completed= False; DLIST_ADD(pvfs-files.list, f); @@ -729,6 +734,8 @@ goto cleanup_delete; } + f-handle-open_completed = True; + notify_trigger(pvfs-notify_context, NOTIFY_ACTION_ADDED, FILE_NOTIFY_CHANGE_FILE_NAME, @@ -1129,6 +1136,7 @@ f-handle-mode = 0; f-handle-have_opendb_entry = False; f-handle-sticky_write_time = False; + f-handle-open_completed= False; /* form the lock context used for byte range locking and opendb locking */ @@ -1264,6 +1272,10 @@ status = ntvfs_handle_set_backend_data(h, ntvfs, f); NT_STATUS_NOT_OK_RETURN(status); + /* mark the open as having completed fully, so delete on close + can now be used */ + f-handle-open_completed = True; + io-generic.out.oplock_level = oplock_granted; io-generic.out.file.ntvfs= h; io-generic.out.create_action = stream_existed? Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h === --- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2007-05-19 22:29:59 UTC (rev 23016) +++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2007-05-20 08:01:02 UTC (rev 23017) @@ -150,6 +150,9 @@ /* have we set a sticky write time that we should remove on close */ BOOL sticky_write_time; + + /* the open went through to completion */ + BOOL open_completed; }; /* open file state */
svn commit: samba r23018 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: tridge Date: 2007-05-20 08:43:03 + (Sun, 20 May 2007) New Revision: 23018 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23018 Log: fixed a memory leak in our server side session setup code for failed session setups Modified: branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c === --- branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 08:01:02 UTC (rev 23017) +++ branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 08:43:03 UTC (rev 23018) @@ -60,7 +60,7 @@ union smb_sesssetup *sess = talloc_get_type(req-io_ptr, union smb_sesssetup); struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info; - struct smbsrv_session *smb_sess; + struct smbsrv_session *smb_sess = NULL; NTSTATUS status; status = auth_check_password_recv(areq, req, server_info); @@ -88,6 +88,10 @@ sess-old.out.vuid = smb_sess-vuid; failed: + if (!NT_STATUS_IS_OK(status)) { + talloc_free(smb_sess); + req-session = NULL; + } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); } @@ -155,7 +159,7 @@ union smb_sesssetup *sess = talloc_get_type(req-io_ptr, union smb_sesssetup); struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info; - struct smbsrv_session *smb_sess; + struct smbsrv_session *smb_sess = NULL; NTSTATUS status; status = auth_check_password_recv(areq, req, server_info); @@ -204,6 +208,10 @@ done: status = NT_STATUS_OK; failed: + if (!NT_STATUS_IS_OK(status)) { + talloc_free(smb_sess); + req-session = NULL; + } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); } @@ -337,6 +345,10 @@ done: sess-spnego.out.vuid = smb_sess-vuid; failed: + if (!NT_STATUS_IS_OK(status)) { + talloc_free(smb_sess); + req-session = NULL; + } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); }
svn commit: samba r23019 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: tridge Date: 2007-05-20 08:57:01 + (Sun, 20 May 2007) New Revision: 23019 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23019 Log: revert r23018 - this will require more thought. Modified: branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c === --- branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 08:43:03 UTC (rev 23018) +++ branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 08:57:01 UTC (rev 23019) @@ -60,7 +60,7 @@ union smb_sesssetup *sess = talloc_get_type(req-io_ptr, union smb_sesssetup); struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info; - struct smbsrv_session *smb_sess = NULL; + struct smbsrv_session *smb_sess; NTSTATUS status; status = auth_check_password_recv(areq, req, server_info); @@ -88,10 +88,6 @@ sess-old.out.vuid = smb_sess-vuid; failed: - if (!NT_STATUS_IS_OK(status)) { - talloc_free(smb_sess); - req-session = NULL; - } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); } @@ -159,7 +155,7 @@ union smb_sesssetup *sess = talloc_get_type(req-io_ptr, union smb_sesssetup); struct auth_serversupplied_info *server_info = NULL; struct auth_session_info *session_info; - struct smbsrv_session *smb_sess = NULL; + struct smbsrv_session *smb_sess; NTSTATUS status; status = auth_check_password_recv(areq, req, server_info); @@ -208,10 +204,6 @@ done: status = NT_STATUS_OK; failed: - if (!NT_STATUS_IS_OK(status)) { - talloc_free(smb_sess); - req-session = NULL; - } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); } @@ -345,10 +337,6 @@ done: sess-spnego.out.vuid = smb_sess-vuid; failed: - if (!NT_STATUS_IS_OK(status)) { - talloc_free(smb_sess); - req-session = NULL; - } status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); }
svn commit: samba r23020 - in branches/SAMBA_4_0/source/smb_server: . smb smb2
Author: tridge Date: 2007-05-20 09:44:03 + (Sun, 20 May 2007) New Revision: 23020 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23020 Log: a better fix for the memory leak - this one doesn't stuff up spnego :) Modified: branches/SAMBA_4_0/source/smb_server/session.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/session.c === --- branches/SAMBA_4_0/source/smb_server/session.c 2007-05-20 08:57:01 UTC (rev 23019) +++ branches/SAMBA_4_0/source/smb_server/session.c 2007-05-20 09:44:03 UTC (rev 23020) @@ -136,6 +136,7 @@ * gensec_ctx is optional, but talloc_steal'ed when present */ struct smbsrv_session *smbsrv_session_new(struct smbsrv_connection *smb_conn, + TALLOC_CTX *mem_ctx, struct gensec_security *gensec_ctx) { struct smbsrv_session *sess = NULL; @@ -144,7 +145,7 @@ /* Ensure no vuid gets registered in share level security. */ if (smb_conn-config.security == SEC_SHARE) return NULL; - sess = talloc_zero(smb_conn, struct smbsrv_session); + sess = talloc_zero(mem_ctx, struct smbsrv_session); if (!sess) return NULL; sess-smb_conn = smb_conn; Modified: branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c === --- branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 08:57:01 UTC (rev 23019) +++ branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c2007-05-20 09:44:03 UTC (rev 23020) @@ -49,6 +49,8 @@ { if (NT_STATUS_IS_OK(status)) { req-smb_conn-negotiate.done_sesssetup = True; + /* we need to keep the session long term */ + req-session = talloc_steal(req-smb_conn, req-session); } smbsrv_reply_sesssetup_send(req, sess, status); } @@ -71,7 +73,7 @@ if (!NT_STATUS_IS_OK(status)) goto failed; /* allocate a new session */ - smb_sess = smbsrv_session_new(req-smb_conn, NULL); + smb_sess = smbsrv_session_new(req-smb_conn, req, NULL); if (!smb_sess) { status = NT_STATUS_INSUFFICIENT_RESOURCES; goto failed; @@ -166,7 +168,7 @@ if (!NT_STATUS_IS_OK(status)) goto failed; /* allocate a new session */ - smb_sess = smbsrv_session_new(req-smb_conn, NULL); + smb_sess = smbsrv_session_new(req-smb_conn, req, NULL); if (!smb_sess) { status = NT_STATUS_INSUFFICIENT_RESOURCES; goto failed; @@ -339,6 +341,10 @@ failed: status = auth_nt_status_squash(status); smbsrv_sesssetup_backend_send(req, sess, status); + if (!NT_STATUS_IS_OK(status) + !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + talloc_free(smb_sess); + } } /* @@ -394,7 +400,7 @@ } /* allocate a new session */ - smb_sess = smbsrv_session_new(req-smb_conn, gensec_ctx); + smb_sess = smbsrv_session_new(req-smb_conn, req-smb_conn, gensec_ctx); if (!smb_sess) { status = NT_STATUS_INSUFFICIENT_RESOURCES; goto failed; Modified: branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c === --- branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c 2007-05-20 08:57:01 UTC (rev 23019) +++ branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c 2007-05-20 09:44:03 UTC (rev 23020) @@ -95,6 +95,10 @@ failed: req-status = auth_nt_status_squash(status); smb2srv_sesssetup_send(req, io); + if (!NT_STATUS_IS_OK(status) ! + NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + talloc_free(smb_sess); + } } static void smb2srv_sesssetup_backend(struct smb2srv_request *req, union smb_sesssetup *io) @@ -138,7 +142,7 @@ } /* allocate a new session */ - smb_sess = smbsrv_session_new(req-smb_conn, gensec_ctx); + smb_sess = smbsrv_session_new(req-smb_conn, req-smb_conn, gensec_ctx); if (!smb_sess) { status = NT_STATUS_INSUFFICIENT_RESOURCES; goto failed;
svn commit: samba r23021 - in branches/SAMBA_4_0/source/lib/util/tests: .
Author: tridge Date: 2007-05-20 10:21:14 + (Sun, 20 May 2007) New Revision: 23021 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23021 Log: test some boundary conditions for idtree, after I saw some suspicious behaviour Modified: branches/SAMBA_4_0/source/lib/util/tests/idtree.c Changeset: Modified: branches/SAMBA_4_0/source/lib/util/tests/idtree.c === --- branches/SAMBA_4_0/source/lib/util/tests/idtree.c 2007-05-20 09:44:03 UTC (rev 23020) +++ branches/SAMBA_4_0/source/lib/util/tests/idtree.c 2007-05-20 10:21:14 UTC (rev 23021) @@ -26,7 +26,7 @@ static bool torture_local_idtree_simple(struct torture_context *tctx) { struct idr_context *idr; - int i; + int i, ret; int *ids; int *present; extern int torture_numops; @@ -92,6 +92,23 @@ } } + /* now test some limits */ + for (i=0;i25000;i++) { + ret = idr_get_new_above(idr, ids[0], random() % 25000, 0x1-3); + torture_assert(tctx, ret != -1, idr_get_new_above failed); + } + + ret = idr_get_new_above(idr, ids[0], 0x1-2, 0x1); + torture_assert_int_equal(tctx, ret, 0x1-2, idr_get_new_above failed); + ret = idr_get_new_above(idr, ids[0], 0x1-1, 0x1); + torture_assert_int_equal(tctx, ret, 0x1-1, idr_get_new_above failed); + ret = idr_get_new_above(idr, ids[0], 0x1, 0x1); + torture_assert_int_equal(tctx, ret, 0x1, idr_get_new_above failed); + ret = idr_get_new_above(idr, ids[0], 0x1+1, 0x1); + torture_assert_int_equal(tctx, ret, -1, idr_get_new_above succeeded above limit); + ret = idr_get_new_above(idr, ids[0], 0x1+2, 0x1); + torture_assert_int_equal(tctx, ret, -1, idr_get_new_above succeeded above limit); + torture_comment(tctx, cleaned up\n); return true; }
svn commit: samba r23022 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib
Author: vlendec Date: 2007-05-20 17:00:18 + (Sun, 20 May 2007) New Revision: 23022 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23022 Log: Reformatting Modified: branches/SAMBA_3_0/source/lib/messages.c branches/SAMBA_3_0_26/source/lib/messages.c Changeset: Modified: branches/SAMBA_3_0/source/lib/messages.c === --- branches/SAMBA_3_0/source/lib/messages.c2007-05-20 10:21:14 UTC (rev 23021) +++ branches/SAMBA_3_0/source/lib/messages.c2007-05-20 17:00:18 UTC (rev 23022) @@ -285,19 +285,22 @@ if (duplicates_allowed) { - /* If duplicates are allowed we can just append the message and return. */ + /* If duplicates are allowed we can just append the message +* and return. */ /* lock the record for the destination */ if (timeout) { - if (tdb_chainlock_with_timeout(tdb, kbuf, timeout) == -1) { - DEBUG(0,(message_send_pid_internal: failed to get -chainlock with timeout %ul.\n, timeout)); + if (tdb_chainlock_with_timeout(tdb, kbuf, + timeout) == -1) { + DEBUG(0,(message_send_pid_internal: failed +to get chainlock with timeout +%ul.\n, timeout)); return NT_STATUS_IO_TIMEOUT; } } else { if (tdb_chainlock(tdb, kbuf) == -1) { - DEBUG(0,(message_send_pid_internal: failed to get -chainlock.\n)); + DEBUG(0,(message_send_pid_internal: failed +to get chainlock.\n)); return NT_STATUS_LOCK_NOT_GRANTED; } } @@ -312,8 +315,8 @@ /* lock the record for the destination */ if (timeout) { if (tdb_chainlock_with_timeout(tdb, kbuf, timeout) == -1) { - DEBUG(0,(message_send_pid_internal: failed to get chainlock -with timeout %ul.\n, timeout)); + DEBUG(0,(message_send_pid_internal: failed to get +chainlock with timeout %ul.\n, timeout)); return NT_STATUS_IO_TIMEOUT; } } else { @@ -341,16 +344,18 @@ for(ptr = old_dbuf.dptr; ptr old_dbuf.dptr + old_dbuf.dsize; ) { /* -* First check if the message header matches, then, if it's a non-zero -* sized message, check if the data matches. If so it's a duplicate and -* we can discard it. JRA. +* First check if the message header matches, then, if it's a +* non-zero sized message, check if the data matches. If so +* it's a duplicate and we can discard it. JRA. */ if (!memcmp(ptr, rec, sizeof(rec))) { - if (!len || (len !memcmp( ptr + sizeof(rec), buf, len))) { + if (!len + || (len +!memcmp( ptr + sizeof(rec), buf, len))) { tdb_chainunlock(tdb, kbuf); - DEBUG(10,(message_send_pid_internal: discarding - duplicate message.\n)); + DEBUG(10,(message_send_pid_internal: + discarding duplicate message.\n)); SAFE_FREE(dbuf.dptr); SAFE_FREE(old_dbuf.dptr); return NT_STATUS_OK; @@ -474,7 +479,8 @@ ret_buf += sizeof(rec); if (rec.msg_version != MESSAGE_VERSION) { - DEBUG(0,(message version %d received (expected %d)\n, rec.msg_version, MESSAGE_VERSION)); + DEBUG(0,(message version %d received (expected %d)\n, +rec.msg_version, MESSAGE_VERSION)); return False; } @@ -510,14 +516,17 @@ if (!received_signal) return; - DEBUG(10,(message_dispatch: received_signal = %d\n, received_signal)); + DEBUG(10, (message_dispatch: received_signal = %d\n, + received_signal)); received_signal = 0; if (!retrieve_all_messages(msgs_buf, total_len)) return; - for (buf = msgs_buf; message_recv(msgs_buf, total_len, msg_type, src, buf, len); buf += len) { + for (buf = msgs_buf; +message_recv(msgs_buf, total_len,
svn commit: samba r23023 - in branches: SAMBA_3_0/source/lib SAMBA_3_0/source/printing SAMBA_3_0_26/source/lib SAMBA_3_0_26/source/printing
Author: vlendec Date: 2007-05-20 19:43:49 + (Sun, 20 May 2007) New Revision: 23023 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23023 Log: Get rid of the only caller of message_send_pid_with_timeout(). This replaces the timeouts on the individual message send calls with an overall timeout on all the calls. The timeout in message_send_pid_with_timeout() did not make much sense IMO anyway, because the tdb_fetch() for the messages_pending_for_pid was blocking in a readlock anyway, we just did the timeout for the write lock. This new code goes through the full wait for the write lock once and then breaks out of sending the notifies instead of running into the timeout per target. Jerry, please check this! Thanks, Volker Modified: branches/SAMBA_3_0/source/lib/messages.c branches/SAMBA_3_0/source/printing/notify.c branches/SAMBA_3_0_26/source/lib/messages.c branches/SAMBA_3_0_26/source/printing/notify.c Changeset: Modified: branches/SAMBA_3_0/source/lib/messages.c === --- branches/SAMBA_3_0/source/lib/messages.c2007-05-20 17:00:18 UTC (rev 23022) +++ branches/SAMBA_3_0/source/lib/messages.c2007-05-20 19:43:49 UTC (rev 23023) @@ -872,14 +872,4 @@ return messaging_send(msg_ctx, server, msg_type, blob); } -NTSTATUS messaging_send_buf_with_timeout(struct messaging_context *msg_ctx, -struct server_id server, -uint32_t msg_type, -const uint8 *buf, size_t len, -int timeout) -{ - return message_send_pid_internal(server, msg_type, buf, len, -True, timeout); -} - /** @} **/ Modified: branches/SAMBA_3_0/source/printing/notify.c === --- branches/SAMBA_3_0/source/printing/notify.c 2007-05-20 17:00:18 UTC (rev 23022) +++ branches/SAMBA_3_0/source/printing/notify.c 2007-05-20 19:43:49 UTC (rev 23023) @@ -126,6 +126,7 @@ size_t num_pids = 0; size_t i; pid_t *pid_list = NULL; + struct timeval end_time = timeval_zero(); /* Count the space needed to send the messages. */ for (pq = notify_queue_head; pq; pq = pq-next) { @@ -177,6 +178,10 @@ if (!print_notify_pid_list(printer, send_ctx, num_pids, pid_list)) return; + if (timeout != 0) { + end_time = timeval_current_ofs(timeout, 0); + } + for (i = 0; i num_pids; i++) { unsigned int q_len = messages_pending_for_pid(pid_to_procid(pid_list[i])); if (q_len 1000) { @@ -184,11 +189,14 @@ printer, q_len )); continue; } - messaging_send_buf_with_timeout(msg_ctx, - pid_to_procid(pid_list[i]), - MSG_PRINTER_NOTIFY2, - (uint8 *)buf, offset, - timeout); + messaging_send_buf(msg_ctx, + pid_to_procid(pid_list[i]), + MSG_PRINTER_NOTIFY2, + (uint8 *)buf, offset); + + if ((timeout != 0) timeval_expired(end_time)) { + break; + } } } Modified: branches/SAMBA_3_0_26/source/lib/messages.c === --- branches/SAMBA_3_0_26/source/lib/messages.c 2007-05-20 17:00:18 UTC (rev 23022) +++ branches/SAMBA_3_0_26/source/lib/messages.c 2007-05-20 19:43:49 UTC (rev 23023) @@ -872,14 +872,4 @@ return messaging_send(msg_ctx, server, msg_type, blob); } -NTSTATUS messaging_send_buf_with_timeout(struct messaging_context *msg_ctx, -struct server_id server, -uint32_t msg_type, -const uint8 *buf, size_t len, -int timeout) -{ - return message_send_pid_internal(server, msg_type, buf, len, -True, timeout); -} - /** @} **/ Modified: branches/SAMBA_3_0_26/source/printing/notify.c === --- branches/SAMBA_3_0_26/source/printing/notify.c 2007-05-20 17:00:18 UTC (rev 23022) +++ branches/SAMBA_3_0_26/source/printing/notify.c 2007-05-20 19:43:49 UTC (rev 23023) @@ -126,6 +126,7 @@ size_t num_pids = 0; size_t i; pid_t *pid_list = NULL; + struct timeval end_time = timeval_zero(); /* Count the space needed to send the messages. */ for (pq =
svn commit: samba r23024 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib
Author: vlendec Date: 2007-05-20 20:11:23 + (Sun, 20 May 2007) New Revision: 23024 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23024 Log: Ok, neither the duplicates_allowed nor the timeout argument to message_send_pid is used anymore. Two users of duplicates_allowed: winbind and the printer notify system. I don't thing this really changes semantics: duplicates_allowed is hell racy anyway, we can't guarantee that we don't send the same message in sequence twice, and I think the only thing we can harm with the print notify is performance. For winbind I talked to G?\195?\188nther, and he did not seem too worried. Volker Modified: branches/SAMBA_3_0/source/lib/messages.c branches/SAMBA_3_0_26/source/lib/messages.c Changeset: Modified: branches/SAMBA_3_0/source/lib/messages.c === --- branches/SAMBA_3_0/source/lib/messages.c2007-05-20 19:43:49 UTC (rev 23023) +++ branches/SAMBA_3_0/source/lib/messages.c2007-05-20 20:11:23 UTC (rev 23024) @@ -4,6 +4,7 @@ Copyright (C) Andrew Tridgell 2000 Copyright (C) 2001 by Martin Pool Copyright (C) 2002 by Jeremy Allison + Copyright (C) 2007 by Volker Lendecke This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -106,8 +107,7 @@ } static NTSTATUS message_send_pid(struct server_id pid, int msg_type, -const void *buf, size_t len, -BOOL duplicates_allowed); +const void *buf, size_t len); / A useful function for testing the message system. @@ -120,7 +120,7 @@ DEBUG(1,(INFO: Received PING message from PID %s [%s]\n, procid_str_static(src), msg)); - message_send_pid(src, MSG_PONG, buf, len, True); + message_send_pid(src, MSG_PONG, buf, len); } / @@ -240,17 +240,13 @@ Send a message to a particular pid. / -static NTSTATUS message_send_pid_internal(struct server_id pid, int msg_type, - const void *buf, size_t len, - BOOL duplicates_allowed, - unsigned int timeout) +static NTSTATUS message_send_pid(struct server_id pid, int msg_type, +const void *buf, size_t len) { TDB_DATA kbuf; TDB_DATA dbuf; - TDB_DATA old_dbuf; struct message_rec rec; - uint8 *ptr; - struct message_rec prec; + int ret; /* NULL pointer means implicit length zero. */ if (!buf) { @@ -283,113 +279,19 @@ dbuf.dsize = len + sizeof(rec); - if (duplicates_allowed) { + ret = tdb_append(tdb, kbuf, dbuf); - /* If duplicates are allowed we can just append the message -* and return. */ + SAFE_FREE(dbuf.dptr); - /* lock the record for the destination */ - if (timeout) { - if (tdb_chainlock_with_timeout(tdb, kbuf, - timeout) == -1) { - DEBUG(0,(message_send_pid_internal: failed -to get chainlock with timeout -%ul.\n, timeout)); - return NT_STATUS_IO_TIMEOUT; - } - } else { - if (tdb_chainlock(tdb, kbuf) == -1) { - DEBUG(0,(message_send_pid_internal: failed -to get chainlock.\n)); - return NT_STATUS_LOCK_NOT_GRANTED; - } - } - tdb_append(tdb, kbuf, dbuf); - tdb_chainunlock(tdb, kbuf); - - SAFE_FREE(dbuf.dptr); - errno = 0;/* paranoia */ - return message_notify(pid); + if (ret == -1) { + return NT_STATUS_INTERNAL_ERROR; } - /* lock the record for the destination */ - if (timeout) { - if (tdb_chainlock_with_timeout(tdb, kbuf, timeout) == -1) { - DEBUG(0,(message_send_pid_internal: failed to get -chainlock with timeout %ul.\n, timeout)); - return NT_STATUS_IO_TIMEOUT; - } - } else { - if (tdb_chainlock(tdb, kbuf) == -1) { - DEBUG(0,(message_send_pid_internal: failed to get -chainlock.\n)); -
svn commit: samba r23025 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_26/source/lib
Author: vlendec Date: 2007-05-20 20:28:45 + (Sun, 20 May 2007) New Revision: 23025 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23025 Log: Some logic simplifications Modified: branches/SAMBA_3_0/source/lib/messages.c branches/SAMBA_3_0_26/source/lib/messages.c Changeset: Modified: branches/SAMBA_3_0/source/lib/messages.c === --- branches/SAMBA_3_0/source/lib/messages.c2007-05-20 20:11:23 UTC (rev 23024) +++ branches/SAMBA_3_0/source/lib/messages.c2007-05-20 20:28:45 UTC (rev 23025) @@ -208,32 +208,36 @@ errno = saved_errno; } - if (ret == -1) { - if (errno == ESRCH) { - DEBUG(2,(pid %d doesn't exist - deleting messages record\n, -(int)pid)); - tdb_delete(tdb, message_key_pid(procid)); + if (ret == 0) { + return NT_STATUS_OK; + } - /* -* INVALID_HANDLE is the closest I can think of -- vl -*/ - return NT_STATUS_INVALID_HANDLE; - } + /* +* Something has gone wrong +*/ - DEBUG(2,(message to process %d failed - %s\n, (int)pid, -strerror(errno))); + if (errno == ESRCH) { + DEBUG(2,(pid %d doesn't exist - deleting messages record\n, +(int)pid)); + tdb_delete(tdb, message_key_pid(procid)); /* -* No call to map_nt_error_from_unix -- don't want to link in -* errormap.o into lots of utils. +* INVALID_HANDLE is the closest I can think of -- vl */ - - if (errno == EINVAL) return NT_STATUS_INVALID_PARAMETER; - if (errno == EPERM) return NT_STATUS_ACCESS_DENIED; - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_INVALID_HANDLE; } - return NT_STATUS_OK; + DEBUG(2,(message to process %d failed - %s\n, (int)pid, +strerror(errno))); + + /* +* No call to map_nt_error_from_unix -- don't want to link in +* errormap.o into lots of utils. +*/ + + if (errno == EINVAL) return NT_STATUS_INVALID_PARAMETER; + if (errno == EPERM) return NT_STATUS_ACCESS_DENIED; + return NT_STATUS_UNSUCCESSFUL; } / @@ -243,7 +247,6 @@ static NTSTATUS message_send_pid(struct server_id pid, int msg_type, const void *buf, size_t len) { - TDB_DATA kbuf; TDB_DATA dbuf; struct message_rec rec; int ret; @@ -266,8 +269,6 @@ rec.src = procid_self(); rec.len = buf ? len : 0; - kbuf = message_key_pid(pid); - dbuf.dptr = (uint8 *)SMB_MALLOC(len + sizeof(rec)); if (!dbuf.dptr) { return NT_STATUS_NO_MEMORY; @@ -279,7 +280,7 @@ dbuf.dsize = len + sizeof(rec); - ret = tdb_append(tdb, kbuf, dbuf); + ret = tdb_append(tdb, message_key_pid(pid), dbuf); SAFE_FREE(dbuf.dptr); @@ -297,14 +298,11 @@ unsigned int messages_pending_for_pid(struct server_id pid) { - TDB_DATA kbuf; TDB_DATA dbuf; uint8 *buf; unsigned int message_count = 0; - kbuf = message_key_pid(pid); - - dbuf = tdb_fetch(tdb, kbuf); + dbuf = tdb_fetch(tdb, message_key_pid(pid)); if (dbuf.dptr == NULL || dbuf.dsize == 0) { SAFE_FREE(dbuf.dptr); return 0; @@ -337,7 +335,7 @@ *msgs_buf = NULL; *total_len = 0; - kbuf = message_key_pid(pid_to_procid(sys_getpid())); + kbuf = message_key_pid(procid_self()); if (tdb_chainlock(tdb, kbuf) == -1) return False; Modified: branches/SAMBA_3_0_26/source/lib/messages.c === --- branches/SAMBA_3_0_26/source/lib/messages.c 2007-05-20 20:11:23 UTC (rev 23024) +++ branches/SAMBA_3_0_26/source/lib/messages.c 2007-05-20 20:28:45 UTC (rev 23025) @@ -208,32 +208,36 @@ errno = saved_errno; } - if (ret == -1) { - if (errno == ESRCH) { - DEBUG(2,(pid %d doesn't exist - deleting messages record\n, -(int)pid)); - tdb_delete(tdb, message_key_pid(procid)); + if (ret == 0) { + return NT_STATUS_OK; + } - /* -* INVALID_HANDLE is the closest I can think of -- vl -*/ - return NT_STATUS_INVALID_HANDLE; - } + /* +* Something has gone wrong +*/ -
Build status as of Mon May 21 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-05-20 00:01:37.0 + +++ /home/build/master/cache/broken_results.txt 2007-05-21 00:01:01.0 + @@ -1,4 +1,4 @@ -Build status as of Sun May 20 00:00:02 2007 +Build status as of Mon May 21 00:00:02 2007 Build counts: Tree Total Broken Panic @@ -13,11 +13,11 @@ pidl 19 4 0 ppp 15 0 0 python 0 0 0 -rsync37 17 0 +rsync37 22 0 samba0 0 0 samba-docs 0 0 0 samba-gtk3 3 0 -samba4 32 18 5 +samba4 32 20 5 samba_3_037 16 0 smb-build33 32 0 talloc 36 2 0
svn commit: samba r23026 - in branches/SAMBA_4_0/testprogs/ejs: .
Author: abartlet Date: 2007-05-21 04:01:26 + (Mon, 21 May 2007) New Revision: 23026 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23026 Log: Add groupPolicyContainer, as we now require this schema element. Andrew Bartlett Modified: branches/SAMBA_4_0/testprogs/ejs/minschema_classes.txt Changeset: Modified: branches/SAMBA_4_0/testprogs/ejs/minschema_classes.txt === --- branches/SAMBA_4_0/testprogs/ejs/minschema_classes.txt 2007-05-20 20:28:45 UTC (rev 23025) +++ branches/SAMBA_4_0/testprogs/ejs/minschema_classes.txt 2007-05-21 04:01:26 UTC (rev 23026) @@ -33,3 +33,4 @@ attributeSchema subSchema queryPolicy +groupPolicyContainer
svn commit: samba r23027 - in branches/SAMBA_4_0/source/setup: .
Author: abartlet Date: 2007-05-21 04:06:42 + (Mon, 21 May 2007) New Revision: 23027 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23027 Log: Make sure the parent object always exists. Andrew Bartlett Modified: branches/SAMBA_4_0/source/setup/provision.ldif Changeset: Modified: branches/SAMBA_4_0/source/setup/provision.ldif === --- branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-21 04:01:26 UTC (rev 23026) +++ branches/SAMBA_4_0/source/setup/provision.ldif 2007-05-21 04:06:42 UTC (rev 23027) @@ -95,6 +95,10 @@ objectCategory: CN=Builtin-Domain,${SCHEMADN} isCriticalSystemObject: TRUE +dn: CN=Policies,CN=System,${DOMAINDN} +objectClass: top +objectClass: container + dn: CN={${POLICYGUID}},CN=Policies,CN=System,${DOMAINDN} objectClass: top objectClass: container
svn commit: samba r23028 - in branches/SAMBA_4_0/source/selftest: .
Author: abartlet Date: 2007-05-21 04:10:13 + (Mon, 21 May 2007) New Revision: 23028 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23028 Log: I've now got a patch to Fedora DS to make it only install the very base schema. I'll post that patch into lorikeet and submit upstram. Andrew Bartlett Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm Changeset: Modified: branches/SAMBA_4_0/source/selftest/Samba4.pm === --- branches/SAMBA_4_0/source/selftest/Samba4.pm2007-05-21 04:06:42 UTC (rev 23027) +++ branches/SAMBA_4_0/source/selftest/Samba4.pm2007-05-21 04:10:13 UTC (rev 23028) @@ -219,6 +219,7 @@ cert_dir= $fedora_ds_dir start_server= 0 +install_full_schema= 0 ; close(CONF); @@ -231,9 +232,6 @@ die(perl $ENV{FEDORA_DS_PREFIX}/bin/ds_newinst.pl $fedora_ds_inf FAILED: $?); } chdir $dir || die; - foreach($fedora_ds_dir/schema/*) { - unlink unless (/00core.*/); - } open(LDIF, $fedora_ds_dir/dse.ldif); print LDIF dn: cn=\cn=Configuration,$basedn\,cn=mapping tree,cn=config