Re: [Samba] ACL changes on Samba NT 4.0 Member Server
I'm not really sure what I'm looking for or which log file the error would present it's self in. Anyways below is a my shot in the dark [2007/11/02 06:13:29, 5] rpc_parse/parse_prs.c:prs_ntstatus(763) 0018 status: NT_STATUS_OK [2007/11/02 06:13:29, 10] nsswitch/winbindd_rpc.c:sequence_number(848) domain_sequence_number: for domain CPDOM is 29539 [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:store_cache_seqnum(400) store_cache_seqnum: success [CPDOM][29539 @ 1194002009] [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:refresh_sequence_number(459) refresh_sequence_number: CPDOM seq number is now 29539 [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:centry_expired(501) centry_expired: Key TRUSTDOMS/CPDOM for domain CPDOM is good. [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:wcache_fetch(588) wcache_fetch: returning entry TRUSTDOMS/CPDOM for domain CPDOM [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:trusted_domains(1741) trusted_domains: [Cached] - cached info for domain CPDOM (2 trusts) status: NT_STATUS_OK [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:cache_store_response(1966) Storing response for pid 2464, len 3337 [2007/11/02 06:13:29, 10] nsswitch/winbindd_cache.c:cache_store_response(1980) Storing extra data: len=97 [2007/11/02 06:13:35, 4] nsswitch/winbindd_dual.c:fork_domain_child(809) child daemon request 13 [2007/11/02 06:13:35, 10] nsswitch/winbindd_dual.c:child_process_request(395) process_request: request fn AUTH_CRAP [2007/11/02 06:13:35, 3] nsswitch/winbindd_pam.c:winbindd_dual_pam_auth_crap(1460) [ 2453]: pam auth crap domain: CPDOM user: ADMIN [2007/11/02 06:13:35, 8] lib/util.c:is_myname(2065) is_myname(CPDOM) returns 0 [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(148) sequence = 0x472b046c [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(150) seed:6A478DD1D50C5B54 [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(155) seed+seq D64BB818D50C5B54 [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(159) CLIENT 39C2447FE6E06DDE [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(164) seed+seq+1 D74BB818D50C5B54 [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_step(168) SERVER AFDE89BB3E2F0393 [2007/11/02 06:13:35, 5] libsmb/credentials.c:creds_reseed(238) cred_reseed: seed D74BB818D50C5B54 John Drescher wrote: On 11/1/07, Hans-Wilhelm Heisinger [EMAIL PROTECTED] wrote: John, Thank you for the reply. Below is the output from mount and ls -al. Yes I can login as CPDOM+admin and create files, but connecting to the share as CPDOM+admin doesn't work. Hans [EMAIL PROTECTED] ~]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/hda1 on /boot type ext3 (rw,acl) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) [EMAIL PROTECTED] ~]# ls -al /files total 5196 drwxrwxrwx 3 root root4096 Nov 1 10:17 . drwxr-xr-x 26 root root4096 Nov 1 05:25 .. -rwxrw-rw- 1 root root 413 Feb 24 2006 AS400.WS -rwxrw-rw- 1 root root 398 Jul 27 14:13 dnsb.txt -rwxrw-rw- 1 root root 3100432 May 22 2006 Dsclient.exe drwxrwxrwx 2 root root4096 Apr 7 2005 Fonts -rwxrw-rw- 1 root root1411 Aug 15 08:09 hans.txt -rwxrw-rw- 1 root root 61440 Sep 14 08:57 IDTag.exe -rwxrw-rw- 1 root root 262727 Apr 21 2003 keyfinder.exe -rwxrw-rw- 1 root root 25088 Mar 22 2007 Label6x4 layout with text.doc -rwxrw-rw- 1 root root 60416 Jun 6 09:41 Label proposal II.xls -rwxrw-rw- 1 root root 90112 May 9 2006 OfficeTime.exe -rwxrw-rw- 1 root root 317 Jul 3 07:51 OutputsLisec.txt -rwxrw-rw- 1 root root 173231 May 4 1999 REPLICA.HLP -rwxrw-rw- 1 root root1101 Apr 25 2005 Salesreport.dtf -rw-rw-rw- 1 root root 481 Nov 1 08:42 smb.conf -rwxrw-rw- 1 root root 69632 Mar 4 2004 system.mdw -rwxrw-rw- 1 root root 491008 May 10 13:20 TSClient.doc -rwxrw-rw- 1 root root 782848 Jun 30 2006 WIP LOCATIONS.xls -rwxrw-rw- 1 root root5632 Aug 4 2004 wmi.dll -rwxrw-rw- 1 root root 16930 May 31 1994 XCOPY.EXE It is possible the problem is that the owner and group of the share are both root. I never do that for any of my working samba shares. The owner can be a user or possibly root but the group is always a group that the users I want to change acls. I see from the docs that dos filemode is supposed to fix that so maybe this is not the case. Can you set a log level of 10 and see if there are any errors caused when you try to change the acls? John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba Hung Process (D state) and hung system
Hi, I had an interesting problem with a Samba server recently, and I think I know what happened. But I want to post here to see if those wiser than I can confirm this or give me a better explanation of what went awry. I initially noticed around 8:35 AM samba wasn't working at all, and that my server had huge load averages indicated by uptime. Though in top I could clearly see that no burden was on the CPU. A ps -e u showed me a large number of process in the dread D state. I grepped the output of the ps command thusly, ps -e u | grep D to get a list of all the processes in the D state. I noticed that it seemed nearly all of them were just smbd. So I grepped out the smbd lines with the command ps -e u | grep D | grep -v smbd. This gave me just 1 process. That full line reads as follows: root 16909 0.0 0.0 2428 508 ?D04:02 0:00 quotaoff /md2/lv00 I tried to shutdown the system, but even THAT failed. Looking in ps revealed that the shutdown command was also in a D state. So I held the power button on the machine until it died and then brought it back up. Everything seemed fine at this point. So what happened? There is a cronjob on the server scheduled for 4:02AM every night that does nothing more than run quotaoff, quotacheck, and then quotaon. This time, for some reason, quotaoff failed miserably. It went into the D state permanently, and just locked up the whole hard disk, keeping anything else from using it. Of course, no one is trying to use the file server for any reason at 4AM so no problems are apparent yet. But then at about 8:35 AM, when people start using the server, smbd processes start showing up. They all try to access the hard disk, because that's where the files are. But they can't because of the hung quotaoff process. So they just all start hanging (going into the D state), waiting permanently on the hard disk. When I run shutdown, that tries to unmount the filesystem, because that is part of the procedure. So it also enters the D state forever, because it's also waiting on the hard disk which quotaoff has somehow locked up. Thus, the only fix is a nasty reboot by using the power button on the box. Because a process in the D state ignores all signals, including SIGKILL (9). So how much of that did I get right...? Any remarks from helpful gurus? Thanks, - SG -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Jonathan Parr presents www.libeldefense.com
Self subscribing spam bot :-( Simo. On Fri, 2007-11-02 at 11:33 +0100, Per Qvindesland wrote: Ok I am blond I know that, but could someone please tell me what the heck this got to do with Samba? Tommy Lee wrote: www.libeldefense.com Without doubt, MP3 on the Internet is a phenomenon. Napster alone is now credited with more than 10 million users. There are plenty of smaller sites offering hundreds of MP3s, and big traffic in MP3 exchanges through ICQ, IRC, Freenet and other Internet formats. But MP3s do have a tiny problem with legality. Many of the most sought after files are illegal, they're rip-off from CDs without the copyright holder's permission. Once you start dealing with truly legal MP3's you're diving into a mixed bag of mediocre and plain poor music that probably couldn't make money anyway, so may as well be given away. This theft of copyright is a genuine weakness in MP3 life, and a moral weakness too. After all, as Bruce Morris points out in http://www.libeldefense.com/Streaming's Gonna Kick MP3 Butthttp://www.libeldefense.com/, musicians need to eat and pay mortgages like everybody else. If they can't get paid they'll have to put down their guitars and go back to accountancy or driving freight trains. http://libeldefense.studioathome.com/ http://libeldefense.blogspirit.com/ http://libeldefense.blogster.com/jonathan_parr_presents.html http://libeldefense.livejournal.com/723.html http://libeldefense.blogspot.com/ http://www.bloglines.com/blog/libeldefense http://libeldefense.bloghi.com/ http://libeldefense.tripod.com/libeldefense/ http://www.yasvs.com/ http://www.greatestjournal.com/users/libeldefense http://www.greatestjournal.com/users/libeldefense/362.html http://www.naymz.com/search/jonathan/parr/1314951 http://www.xanga.com/libeldefense http://libeldefense.multiply.com/journal/ http://20six.co.uk/libeldefense/ http://libeldefense.blogsome.com/ http://www.freewebs.com/libeldefense/ http://dangerell.googlepages.com/home http://www.opendiary.com/entrylist.asp?authorcode=D736464 http://libeldefense.bravehost.com/index.html http://www.my-diary.org/users/296432 http://www.my-diary.org/edit/?action=viewentryentryid=541256338 http://libeldefense.blog.co.uk/ http://clearblogs.com/libeldefense/78969/Jonathan+Parr+presents+www.libeldefense.com.html http://libeldefense.bloggerteam.com/entry.php?u=libeldefensee_id=293138 http://www.ebloggy.com/blog.php?username=libeldefenseid=1 http://libeldefense.blogs.ie/ http://www.teenblog.org/libeldefense/ http://libeldefense.myweblog.com/2007/10/27/jonathan-parr-presents-wwwlibeldefensecom/ http://libeldefense.egoweblog.com/ http://www.bahraichblogs.com/libeldefense/5952/ http://libeldefense.blogbeee.com/ http://portal.blogfusion.com/blogs/libeldefense/ http://noss123network.ning.com/profile/JonathanParr __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Simo Sorce Samba Team GPL Compliance Officer [EMAIL PROTECTED] Senior Software Engineer at Red Hat Inc. [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] where samba store user's passwords ?
I have got tdbsam as backend in smb.conf passdb backend = tdbsam When user change password from windows XP file passdb.tdb schould change date because was updated, but I have still the same date IX 18 10:30. [EMAIL PROTECTED] private]# ls -al razem 76 drwx-- 2 root root 4096 IX 11 20:25 . drwxr-xr-x 7 root root 4096 XI 2 15:14 .. -rw--- 1 root root 36864 IX 25 07:57 passdb.tdb -rw--- 1 root root 8192 VII 24 07:57 schannel_store.tdb -rw--- 1 root root 8192 IX 18 10:30 secrets.tdb -rw--- 1 root root 7161 IX 19 15:28 smbpasswd user changed password 31 X 2007 08:08:16 but date of the passdb.tdb file is still the same (IX 18 2007 ). pdbedit -Lv praktykanci Unix username:praktykanci NT username: Account Flags:[U ] User SID: S-1-5-21-2794518228-724393910-221713885-2096 Primary Group SID:S-1-5-21-2794518228-724393910-221713885-513 Full Name: Home Directory: HomeDir Drive: Logon Script: praktykanci.CMD Password last set:Śr, 31 X 2007 08:08:16 CET Password can change: So, 19 I 2008 08:08:16 CET Password must change: Wt, 29 I 2008 08:08:16 CET Where samba with tdbsam store passwords ?? And how can i check whether user really changed password in tdbsam backend ?? How can I dump passwords ? How can I convert passdb.tdb to smbpasswd style ?? Please help Ragtime rewelacyjny musical w 2 aktach Premiera w Gliwickim Teatrze Muzycznym już 23 listopada. Musisz to zobaczyć! Kliknij: http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2FRagtime-musical.htmlsid=83 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] ACL changes on Samba NT 4.0 Member Server
On 11/2/07, Hans-Wilhelm Heisinger [EMAIL PROTECTED] wrote: I'm not really sure what I'm looking for or which log file the error would present it's self in. Anyways below is a my shot in the dark This is the right file but I don't see an error. Hopefully someone else can help. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Winbind Offline Login
Hi, I've been testing winbind offline logon feature using samba-3.2.0pre1. It works great when logging in locally (or via SSH) to the machine in offline mode, but I can't seem to connect to a share from a Windows client when in offline mode. The reasoning behind using the offline feature for us is to provide ADS integrated file share that can function in a remote office in the event that communications with the central dc's is down. Is the winbind offline logon feature intended to support this operation? I know the normal answer would be to install a DC locally in the remote site, but we've got 100's of small remote sites that don't warrant their own DC's. Any suggestions would be great! Thanks, Brian The contents of this e-mail (including attachments) are private and confidential and may also be subject to legal privilege. It is intended only for the use of the addressee. If you are not the addressee, or the person responsible for delivering it to the addressee, you may not copy or deliver this e-mail or any attachments to anyone else or make any use of its contents; you should not read any part of this e-mail or any attachments. Unauthorised disclosure or communication or other use of the contents of this e-mail or any part thereof may be prohibited by law and may constitute a criminal offence. If you receive this e-mail by mistake please notify [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Domain password server not available
Hello, In our environment we've had SAMBA 3.0.21b joined to a Windows 2003 domain forest as a member server (configured with SECURIY = DOMAIN) for couple of years with no problem. Just recently the SAMBA server seems to be loosing connection to the Windows domain controllers. We are able to re-establish the trust (re-join samba server to domain) successfully. However after a few successful user connections the trust link immediately breaks with the message below. auth/auth_domain.c:domain_client_validate(345) domain_client_validate: Domain password server not available. auth/auth.c:check_ntlm_password(456) check_ntlm_password: Authentication for user [abc] - [abc] FAILED with error NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE smbd/server.c:exit_server(987) Closing connections There are numerous posts elsewhere but none really seem to apply to our scenario. There have been no changes configuration changes on the SAMBA side. Is it possible that an MS patch, Service Pack or perhaps a security policy recently applied to a particular DC is causing this? (Since we have multiple DCs for multiple domains in our environment we have password server = * in the smb.conf). On the client side (Windows XP SP1 clients) the Windows security policies (currently enforced by means of GPOs) are these: - Domain Member: Digitally encrypt secure channel data (when possible) set to Enabled - Domain Member: Digitally sign secure channel data (when possible) set to Enabled - Microsoft Network Client: Digitally sign communications (if server agrees) set to Enabled - Network Security: LAN Manager Authentication level set to Send NTLMv2 response only Interesting enough the above policies are NOT YET implemented or enforced on the DCs which make me think we are looking at an issue within the DCs themselves and not with the security policies applied on the clients? Should we point to a specific DC instead of all (password server = *) in order to pin-point this issue to a particular domain controller or is not really the issue? Should we focus on some other specific smb.conf setting to match the above security policies perhaps? Any feedback is really appreciated. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Jonathan Parr presents www.libeldefense.com
www.libeldefense.com Without doubt, MP3 on the Internet is a phenomenon. Napster alone is now credited with more than 10 million users. There are plenty of smaller sites offering hundreds of MP3s, and big traffic in MP3 exchanges through ICQ, IRC, Freenet and other Internet formats. But MP3s do have a tiny problem with legality. Many of the most sought after files are illegal, they're rip-off from CDs without the copyright holder's permission. Once you start dealing with truly legal MP3's you're diving into a mixed bag of mediocre and plain poor music that probably couldn't make money anyway, so may as well be given away. This theft of copyright is a genuine weakness in MP3 life, and a moral weakness too. After all, as Bruce Morris points out in http://www.libeldefense.com/Streaming's Gonna Kick MP3 Butthttp://www.libeldefense.com/, musicians need to eat and pay mortgages like everybody else. If they can't get paid they'll have to put down their guitars and go back to accountancy or driving freight trains. http://libeldefense.studioathome.com/ http://libeldefense.blogspirit.com/ http://libeldefense.blogster.com/jonathan_parr_presents.html http://libeldefense.livejournal.com/723.html http://libeldefense.blogspot.com/ http://www.bloglines.com/blog/libeldefense http://libeldefense.bloghi.com/ http://libeldefense.tripod.com/libeldefense/ http://www.yasvs.com/ http://www.greatestjournal.com/users/libeldefense http://www.greatestjournal.com/users/libeldefense/362.html http://www.naymz.com/search/jonathan/parr/1314951 http://www.xanga.com/libeldefense http://libeldefense.multiply.com/journal/ http://20six.co.uk/libeldefense/ http://libeldefense.blogsome.com/ http://www.freewebs.com/libeldefense/ http://dangerell.googlepages.com/home http://www.opendiary.com/entrylist.asp?authorcode=D736464 http://libeldefense.bravehost.com/index.html http://www.my-diary.org/users/296432 http://www.my-diary.org/edit/?action=viewentryentryid=541256338 http://libeldefense.blog.co.uk/ http://clearblogs.com/libeldefense/78969/Jonathan+Parr+presents+www.libeldefense.com.html http://libeldefense.bloggerteam.com/entry.php?u=libeldefensee_id=293138 http://www.ebloggy.com/blog.php?username=libeldefenseid=1 http://libeldefense.blogs.ie/ http://www.teenblog.org/libeldefense/ http://libeldefense.myweblog.com/2007/10/27/jonathan-parr-presents-wwwlibeldefensecom/ http://libeldefense.egoweblog.com/ http://www.bahraichblogs.com/libeldefense/5952/ http://libeldefense.blogbeee.com/ http://portal.blogfusion.com/blogs/libeldefense/ http://noss123network.ning.com/profile/JonathanParr __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Jonathan Parr presents www.libeldefense.com
Ok I am blond I know that, but could someone please tell me what the heck this got to do with Samba? Tommy Lee wrote: www.libeldefense.com Without doubt, MP3 on the Internet is a phenomenon. Napster alone is now credited with more than 10 million users. There are plenty of smaller sites offering hundreds of MP3s, and big traffic in MP3 exchanges through ICQ, IRC, Freenet and other Internet formats. But MP3s do have a tiny problem with legality. Many of the most sought after files are illegal, they're rip-off from CDs without the copyright holder's permission. Once you start dealing with truly legal MP3's you're diving into a mixed bag of mediocre and plain poor music that probably couldn't make money anyway, so may as well be given away. This theft of copyright is a genuine weakness in MP3 life, and a moral weakness too. After all, as Bruce Morris points out in http://www.libeldefense.com/Streaming's Gonna Kick MP3 Butthttp://www.libeldefense.com/, musicians need to eat and pay mortgages like everybody else. If they can't get paid they'll have to put down their guitars and go back to accountancy or driving freight trains. http://libeldefense.studioathome.com/ http://libeldefense.blogspirit.com/ http://libeldefense.blogster.com/jonathan_parr_presents.html http://libeldefense.livejournal.com/723.html http://libeldefense.blogspot.com/ http://www.bloglines.com/blog/libeldefense http://libeldefense.bloghi.com/ http://libeldefense.tripod.com/libeldefense/ http://www.yasvs.com/ http://www.greatestjournal.com/users/libeldefense http://www.greatestjournal.com/users/libeldefense/362.html http://www.naymz.com/search/jonathan/parr/1314951 http://www.xanga.com/libeldefense http://libeldefense.multiply.com/journal/ http://20six.co.uk/libeldefense/ http://libeldefense.blogsome.com/ http://www.freewebs.com/libeldefense/ http://dangerell.googlepages.com/home http://www.opendiary.com/entrylist.asp?authorcode=D736464 http://libeldefense.bravehost.com/index.html http://www.my-diary.org/users/296432 http://www.my-diary.org/edit/?action=viewentryentryid=541256338 http://libeldefense.blog.co.uk/ http://clearblogs.com/libeldefense/78969/Jonathan+Parr+presents+www.libeldefense.com.html http://libeldefense.bloggerteam.com/entry.php?u=libeldefensee_id=293138 http://www.ebloggy.com/blog.php?username=libeldefenseid=1 http://libeldefense.blogs.ie/ http://www.teenblog.org/libeldefense/ http://libeldefense.myweblog.com/2007/10/27/jonathan-parr-presents-wwwlibeldefensecom/ http://libeldefense.egoweblog.com/ http://www.bahraichblogs.com/libeldefense/5952/ http://libeldefense.blogbeee.com/ http://portal.blogfusion.com/blogs/libeldefense/ http://noss123network.ning.com/profile/JonathanParr __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Mounting windows home dir's with samba
Hi all! Would it be possible to mount the entire NT home dir (c:\documents and settings\%user name\) as a samba share? I need to have the home dir mounted outside the machine, but I' trying to avoid NT roaming profiles because of the performance penalties. My ideia would be to mount the entire user profile tree on some folder exported by samba Do you thing that's possible? Thank you very much! Regards, Tiago -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] password sync does not work
Samba 3.026a on Solaris PDC. I am trying to enable password sync. My smb.conf file includes... passdb backend = tdbsam passwd program = /usr/bin/passwd -r nis %u # passwd chat = *New*Password* %n\n *new*Password* %n\n *changed* # passwd chat = *New*Password* %n\n *Re-enter*new*Password* %n\n *changed* passwd chat=*New\sPassword:\s%n\nRe-enter\snew\sPassword:\s%n\npasswd:\spassword\ssucc essfully\schanged*\n unix password sync = Yes passwd chat debug = yes log level = 5 I have tried with and without pam password change = yes If t try to change my password on an XP client it fails with you do not have permission to change your password. If I try to change a password, as administrator, from a Windows 2000 server with User Manager for Domains (NT4 tools) I get the following error occured changing the properties of the user johnsmith- Access is denied The samba logs for the XP client doesn't show any failures or rejections. It does show entries like the following, which tool me look like things are working up to a point. [2007/11/02 12:25:08, 3] smbd/process.c:switch_message(926) switch message SMBtconX (pid 17953) conn 0x0 [2007/11/02 12:25:08, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0 [2007/11/02 12:25:08, 5] auth/auth_util.c:debug_nt_user_token(448) NT user token: (NULL) [2007/11/02 12:25:08, 5] auth/auth_util.c:debug_unix_user_token(474) UNIX token of user 0 Primary group is 0 and contains 0 supplementary groups [2007/11/02 12:25:08, 5] smbd/uid.c:change_to_root_user(288) change_to_root_user: now uid=(0,0) gid=(0,0) [2007/11/02 12:25:08, 4] smbd/reply.c:reply_tcon_and_X(506) Client requested device type [?] for share [IPC$] [2007/11/02 12:25:08, 5] smbd/service.c:make_connection(1205) making a connection to 'normal' service ipc$ [2007/11/02 12:25:08, 5] lib/username.c:Get_Pwnam_alloc(131) Finding user fedora [2007/11/02 12:25:08, 5] lib/username.c:Get_Pwnam_internals(75) Trying _Get_Pwnam(), username as lowercase is johnsmith [2007/11/02 12:25:08, 5] lib/username.c:Get_Pwnam_internals(108) Get_Pwnam_internals did find user [johnsmith]! [2007/11/02 12:25:08, 3] smbd/service.c:make_connection_snum(806) Connect path is '/tmp' for service [IPC$] [2007/11/02 12:25:08, 4] lib/sharesec.c:get_share_security(132) get_share_security: using default secdesc for IPC$ Thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] smbpasswd and 8 character limit
The smbpasswd on my PDC (Solaris 9, Samba 3.026a) will truncate or corrupt passwords over 8 chars. The smbpasswd command on the linux clients (Samba 3.024a) is OK. Anyone know if this is a samba version issue or something solaris specific. Thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] smbpasswd and 8 character limit
I'm pretty sure it's Solaris specific, I didn't have problems on my CentOS box I've been using as a reference machine. See this bug in bugzilla: https://bugzilla.samba.org/show_bug.cgi?id=4863 ~Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gaiseric Vandal Sent: Friday, November 02, 2007 5:04 PM To: Samba Subject: [Samba] smbpasswd and 8 character limit The smbpasswd on my PDC (Solaris 9, Samba 3.026a) will truncate or corrupt passwords over 8 chars. The smbpasswd command on the linux clients (Samba 3.024a) is OK. Anyone know if this is a samba version issue or something solaris specific. Thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba o/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] smbpasswd and 8 character limit
Sorry, brain-fart, you'll probably be interested in knowing what version does work. The latest version of Samba that I've tested as working with the password issue is 3.0.24. I'm having trouble getting ACL support to work with it, but I have got ADS and winbind working seamlessly. ~Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gaiseric Vandal Sent: Friday, November 02, 2007 5:04 PM To: Samba Subject: [Samba] smbpasswd and 8 character limit The smbpasswd on my PDC (Solaris 9, Samba 3.026a) will truncate or corrupt passwords over 8 chars. The smbpasswd command on the linux clients (Samba 3.024a) is OK. Anyone know if this is a samba version issue or something solaris specific. Thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba o/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] where samba store user's passwords ?
On Friday 02 November 2007 09:27, Hubert Choma wrote: I have got tdbsam as backend in smb.conf passdb backend = tdbsam When user change password from windows XP file passdb.tdb schould change date because was updated, but I have still the same date IX 18 10:30. [EMAIL PROTECTED] private]# ls -al razem 76 drwx-- 2 root root 4096 IX 11 20:25 . drwxr-xr-x 7 root root 4096 XI 2 15:14 .. -rw--- 1 root root 36864 IX 25 07:57 passdb.tdb The above (passdb.tdb) is the file in which they are stored. -rw--- 1 root root 8192 VII 24 07:57 schannel_store.tdb -rw--- 1 root root 8192 IX 18 10:30 secrets.tdb -rw--- 1 root root 7161 IX 19 15:28 smbpasswd user changed password 31 X 2007 08:08:16 but date of the passdb.tdb file is still the same (IX 18 2007 ). pdbedit -Lv praktykanci Unix username:praktykanci NT username: Account Flags:[U ] User SID: S-1-5-21-2794518228-724393910-221713885-2096 Primary Group SID:S-1-5-21-2794518228-724393910-221713885-513 Full Name: Home Directory: HomeDir Drive: Logon Script: praktykanci.CMD Password last set:Śr, 31 X 2007 08:08:16 CET Password can change: So, 19 I 2008 08:08:16 CET Password must change: Wt, 29 I 2008 08:08:16 CET Where samba with tdbsam store passwords ?? passdb.tdb And how can i check whether user really changed password in tdbsam backend ?? How can I dump passwords ? pdbedit -Lw How can I convert passdb.tdb to smbpasswd style ?? ppdbedit -e smbpasswd -i tdbsam Please help Is that what you needed? - John T. Ragtime rewelacyjny musical w 2 aktach Premiera w Gliwickim Teatrze Muzycznym już 23 listopada. Musisz to zobaczyć! Kliknij: http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2FRagtime-musical. htmlsid=83 -- John H Terpstra Samba-Team Member Phone: +1 (650) 580-8668 Author: The Official Samba-3 HOWTO Reference Guide, 2 Ed., ISBN: 0131882228 Samba-3 by Example, 2 Ed., ISBN: 0131882221X Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba server as a Primary Domain controller with LDAP
Dear Experts, I want to Run a Samba server as a Primary Domain controller in Open Suse 10.3 or Centos 5. This server will serve for 200 windows and linux clients. Users will login in their PC and authentication will be given by Samba Server to all $ MS or Linux computers. All the data and E-mails of the clients will be stored in Linux Server for backup management. In this case, tell me the best distro to config the server and client. Send me the web link so i can configure this in quick way with your config steps. Vijay Thakur - Bollywood, fun, friendship, sports and more. You name it, we have it. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r25790 - in branches/SAMBA_4_0/source/utils: .
Author: metze Date: 2007-11-02 08:49:23 + (Fri, 02 Nov 2007) New Revision: 25790 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25790 Log: - remove some nesting by using error and out logic - print in the print_* function ... metze Modified: branches/SAMBA_4_0/source/utils/getntacl.c Changeset: Modified: branches/SAMBA_4_0/source/utils/getntacl.c === --- branches/SAMBA_4_0/source/utils/getntacl.c 2007-11-02 08:16:32 UTC (rev 25789) +++ branches/SAMBA_4_0/source/utils/getntacl.c 2007-11-02 08:49:23 UTC (rev 25790) @@ -44,16 +44,17 @@ free(s); } -static NTSTATUS get_ntacl(char *filename, struct xattr_NTACL **ntacl, +static NTSTATUS get_ntacl(TALLOC_CTX *mem_ctx, + char *filename, + struct xattr_NTACL **ntacl, ssize_t *ntacl_len) { DATA_BLOB blob; ssize_t size; NTSTATUS result; struct ndr_pull *ndr; - struct ndr_print *pr; - *ntacl = talloc(NULL, struct xattr_NTACL); + *ntacl = talloc(mem_ctx, struct xattr_NTACL); size = wrap_getxattr(filename, XATTR_NTACL_NAME, NULL, 0); @@ -74,24 +75,30 @@ result = ndr_pull_xattr_NTACL(ndr, NDR_SCALARS|NDR_BUFFERS, *ntacl); - if (NT_STATUS_IS_OK(result)) { - pr = talloc(*ntacl, struct ndr_print); - pr-print = ntacl_print_debug_helper; - pr-depth = 0; - pr-flags = 0; - - ndr_print_xattr_NTACL(pr, filename, *ntacl); + if (!NT_STATUS_IS_OK(result)) { + return result; } - return result; + return NT_STATUS_OK; } -static void print_ntacl(struct xattr_NTACL *ntacl) +static void print_ntacl(TALLOC_CTX *mem_ctx, + const char *fname, + struct xattr_NTACL *ntacl) { + struct ndr_print *pr; + + pr = talloc_zero(mem_ctx, struct ndr_print); + if (!pr) return; + pr-print = ntacl_print_debug_helper; + + ndr_print_xattr_NTACL(pr, fname, ntacl); + talloc_free(pr); } int main(int argc, char *argv[]) { + NTSTATUS status; struct xattr_NTACL *ntacl; ssize_t ntacl_len; @@ -100,10 +107,15 @@ return 1; } + status = get_ntacl(NULL, argv[1], ntacl, ntacl_len); + if (!NT_STATUS_IS_OK(status)) { + fprintf(stderr, get_ntacl failed: %s\n, nt_errstr(status)); + return 1; + } - get_ntacl(argv[1], ntacl, ntacl_len); + print_ntacl(ntacl, argv[1], ntacl); - print_ntacl(ntacl); + talloc_free(ntacl); return 0; }
svn commit: samba r25789 - in branches/SAMBA_4_0/source/kdc: .
Author: metze Date: 2007-11-02 08:16:32 + (Fri, 02 Nov 2007) New Revision: 25789 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25789 Log: print out what error happened... metze Modified: branches/SAMBA_4_0/source/kdc/pac-glue.c Changeset: Modified: branches/SAMBA_4_0/source/kdc/pac-glue.c === --- branches/SAMBA_4_0/source/kdc/pac-glue.c2007-11-02 03:39:24 UTC (rev 25788) +++ branches/SAMBA_4_0/source/kdc/pac-glue.c2007-11-02 08:16:32 UTC (rev 25789) @@ -187,8 +187,8 @@ nt_status = ndr_pull_struct_blob(pac_in, mem_ctx, logon_info, (ndr_pull_flags_fn_t)ndr_pull_PAC_LOGON_INFO_CTR); if (!NT_STATUS_IS_OK(nt_status) || !logon_info.info) { + DEBUG(0,(can't parse the PAC LOGON_INFO: %s\n, nt_errstr(nt_status))); talloc_free(mem_ctx); - DEBUG(0,(can't parse the PAC LOGON_INFO\n)); return EINVAL; }
svn commit: samba r25801 - in branches/SAMBA_4_0/source/libcli/security: .
Author: gd Date: 2007-11-02 11:51:26 + (Fri, 02 Nov 2007) New Revision: 25801 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25801 Log: Add security_ace_create() function. Guenther Modified: branches/SAMBA_4_0/source/libcli/security/security_descriptor.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/security/security_descriptor.c === --- branches/SAMBA_4_0/source/libcli/security/security_descriptor.c 2007-11-02 11:36:06 UTC (rev 25800) +++ branches/SAMBA_4_0/source/libcli/security/security_descriptor.c 2007-11-02 11:51:26 UTC (rev 25801) @@ -422,3 +422,32 @@ return sd; } + +struct security_ace *security_ace_create(TALLOC_CTX *mem_ctx, +const char *sid_str, +enum security_ace_type type, +uint32_t access_mask, +uint8_t flags) + +{ + struct dom_sid *sid; + struct security_ace *ace; + + ace = talloc_zero(mem_ctx, struct security_ace); + if (ace == NULL) { + return NULL; + } + + sid = dom_sid_parse_talloc(ace, sid_str); + if (sid == NULL) { + talloc_free(ace); + return NULL; + } + + ace-trustee = *sid; + ace-type = type; + ace-access_mask = access_mask; + ace-flags = flags; + + return ace; +}
Re: [SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-156-g779353b
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gerald (Jerry) Carter schrieb: The branch, v3-2-test has been updated via 779353b86d1699324149896f1ffa237c6ebe46ec (commit) via d6cdbfd875bb2653e831d314726c3240beb0a96b (commit) via b7d2fadbef044a89920da613b1aafc74a3d94e24 (commit) from 47dbddcb5361caa30ee60cf4e15bb50d557d1191 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 779353b86d1699324149896f1ffa237c6ebe46ec Merge: d6cdbfd875bb2653e831d314726c3240beb0a96b 47dbddcb5361caa30ee60cf4e15bb50d557d1191 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Thu Nov 1 21:30:43 2007 -0400 Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit d6cdbfd875bb2653e831d314726c3240beb0a96b Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Thu Nov 1 15:53:44 2007 -0400 Patch 2 of 3 from Debian Samba packagers: Hi Jerry, one of this patches, broke make install in the build-farm... metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHKwyom70gjA5TCD8RApF1AJ9t4dWOidyJe+rN9cnRzTGc7sTkyQCZARG/ nLSndwtrYeUuIS2b/4XEZn0= =HmRu -END PGP SIGNATURE-
svn commit: samba r25799 - in branches/SAMBA_4_0/source/lib/util: .
Author: gd Date: 2007-11-02 11:33:53 + (Fri, 02 Nov 2007) New Revision: 25799 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25799 Log: Add dump_data_skip_zeros() which omits 16 zero bytes in a row (if not at the beginning or the end of a blob). Usefull when inspecting protocols that exchange huge mostly empty blobs. Guenther Modified: branches/SAMBA_4_0/source/lib/util/util.c branches/SAMBA_4_0/source/lib/util/util.h Changeset: Modified: branches/SAMBA_4_0/source/lib/util/util.c === --- branches/SAMBA_4_0/source/lib/util/util.c 2007-11-02 11:01:18 UTC (rev 25798) +++ branches/SAMBA_4_0/source/lib/util/util.c 2007-11-02 11:33:53 UTC (rev 25799) @@ -393,24 +393,55 @@ * * The data is only written if the log level is at least level. */ -_PUBLIC_ void dump_data(int level, const uint8_t *buf,int len) +static void _dump_data(int level, const uint8_t *buf, int len, + bool omit_zero_bytes) { int i=0; + const uint8_t empty[16]; + bool skipped = false; + if (len=0) return; if (!DEBUGLVL(level)) return; - - DEBUGADD(level,([%03X] ,i)); + + memset(empty, '\0', 16); + for (i=0;ilen;) { + + if (i%16 == 0) { + if ((omit_zero_bytes == true) + (i 0) + (len i+16) + (memcmp(buf[i], empty, 16) == 0)) + { + i +=16; + continue; + } + + if (ilen) { + DEBUGADD(level,([%04X] ,i)); + } + } + DEBUGADD(level,(%02X ,(int)buf[i])); i++; - if (i%8 == 0) DEBUGADD(level,( )); - if (i%16 == 0) { + if (i%8 == 0) DEBUGADD(level,( )); + if (i%16 == 0) { + print_asc(level,buf[i-16],8); DEBUGADD(level,( )); print_asc(level,buf[i-8],8); DEBUGADD(level,(\n)); - if (ilen) DEBUGADD(level,([%03X] ,i)); + + if ((omit_zero_bytes == true) + (len i+16) + (memcmp(buf[i], empty, 16) == 0)) { + if (!skipped) { + DEBUGADD(level,(skipping zero buffer bytes\n)); + skipped = true; + } + } } } + if (i%16) { int n; n = 16 - (i%16); @@ -420,12 +451,35 @@ n = MIN(8,i%16); print_asc(level,buf[i-(i%16)],n); DEBUGADD(level,( )); n = (i%16) - n; - if (n0) print_asc(level,buf[i-n],n); - DEBUGADD(level,(\n)); - } + if (n0) print_asc(level,buf[i-n],n); + DEBUGADD(level,(\n)); + } + } /** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + */ +_PUBLIC_ void dump_data(int level, const uint8_t *buf, int len) +{ + return _dump_data(level, buf, len, false); +} + +/** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + * 16 zero bytes in a row are ommited + */ +_PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len) +{ + return _dump_data(level, buf, len, true); +} + + +/** malloc that aborts with smb_panic on fail or zero size. **/ Modified: branches/SAMBA_4_0/source/lib/util/util.h === --- branches/SAMBA_4_0/source/lib/util/util.h 2007-11-02 11:01:18 UTC (rev 25798) +++ branches/SAMBA_4_0/source/lib/util/util.h 2007-11-02 11:33:53 UTC (rev 25799) @@ -656,6 +656,14 @@ _PUBLIC_ void dump_data(int level, const uint8_t *buf,int len); /** + * Write dump of binary data to the log file. + * + * The data is only written if the log level is at least level. + * 16 zero bytes in a row are ommited + */ +_PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len); + +/** malloc that aborts with smb_panic on fail or zero size. **/ _PUBLIC_ void *smb_xmalloc(size_t size);
svn commit: samba r25802 - in branches/SAMBA_4_0/source/lib/util: .
Author: metze Date: 2007-11-02 12:50:24 + (Fri, 02 Nov 2007) New Revision: 25802 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25802 Log: fix the build on solaris, void functions doesn't return values metze Modified: branches/SAMBA_4_0/source/lib/util/util.c Changeset: Modified: branches/SAMBA_4_0/source/lib/util/util.c === --- branches/SAMBA_4_0/source/lib/util/util.c 2007-11-02 11:51:26 UTC (rev 25801) +++ branches/SAMBA_4_0/source/lib/util/util.c 2007-11-02 12:50:24 UTC (rev 25802) @@ -464,7 +464,7 @@ */ _PUBLIC_ void dump_data(int level, const uint8_t *buf, int len) { - return _dump_data(level, buf, len, false); + _dump_data(level, buf, len, false); } /** @@ -475,7 +475,7 @@ */ _PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len) { - return _dump_data(level, buf, len, true); + _dump_data(level, buf, len, true); }
svn commit: samba r25797 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 10:59:43 + (Fri, 02 Nov 2007) New Revision: 25797 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25797 Log: use error and out logic metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:49:51 UTC (rev 25796) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:59:43 UTC (rev 25797) @@ -606,9 +606,13 @@ { NTSTATUS status; uint32_t v; + status = ndr_token_retrieve_cmp_fn(list, key, v, NULL, false); - if (NT_STATUS_IS_OK(status)) return v; - return 0; + if (!NT_STATUS_IS_OK(status)) { + return 0; + } + + return v; } /*
svn commit: samba r25807 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:18:07 + (Fri, 02 Nov 2007) New Revision: 25807 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25807 Log: Close handle during winreg test. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 13:48:11 UTC (rev 25806) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:18:07 UTC (rev 25807) @@ -713,6 +713,10 @@ torture_fail(tctx, CreateKey failed (OpenKey after Create didn't work)\n); + if (created !test_CloseKey(p, tctx, newhandle)) + torture_fail(tctx, +CreateKey failed (CloseKey after Open didn't work)\n); + if (created !test_DeleteKey(p, tctx, handle, TEST_KEY1)) { torture_comment(tctx, DeleteKey failed\n); ret = false;
svn commit: samba r25817 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 15:43:09 + (Fri, 02 Nov 2007) New Revision: 25817 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25817 Log: Add very basic FRSAPI InfoW test. Again, this is surely not correct but at least displays a lot of very useful information. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/frsapi.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/frsapi.c === --- branches/SAMBA_4_0/source/torture/rpc/frsapi.c 2007-11-02 15:41:55 UTC (rev 25816) +++ branches/SAMBA_4_0/source/torture/rpc/frsapi.c 2007-11-02 15:43:09 UTC (rev 25817) @@ -207,6 +207,50 @@ return true; } +static bool test_InfoW(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + int i; + + for (i=0; i10; i++) { + + struct frsapi_InfoW r; + struct frsapi_Info *info; + int d; + DATA_BLOB blob; + + ZERO_STRUCT(r); + + info = talloc_zero(tctx, struct frsapi_Info); + + r.in.length = 0x1000; + r.in.info = r.out.info = info; + + info-length = r.in.length; + info-length2 = r.in.length; + info-level = i; + info-offset = 0x2c; + info-blob_len = 0x2c; + + torture_assert_ntstatus_ok(tctx, + dcerpc_frsapi_InfoW(p, tctx, r), + InfoW failed); + + torture_assert_werr_ok(tctx, r.out.result, InfoW failed); + + /* display the formatted blob text */ + blob = r.out.info-blob; + for (d = 0; d blob.length; d++) { + if (blob.data[d]) { + printf(%c, blob.data[d]); + } + } + printf(\n); + } + + return true; +} + struct torture_suite *torture_rpc_frsapi(TALLOC_CTX *mem_ctx) { struct torture_rpc_tcase *tcase; @@ -225,6 +269,7 @@ test = torture_rpc_tcase_add_test(tcase, ForceReplication, test_ForceReplication); - + test = torture_rpc_tcase_add_test(tcase, InfoW, + test_InfoW); return suite; }
svn commit: samba r25815 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: gd Date: 2007-11-02 15:11:54 + (Fri, 02 Nov 2007) New Revision: 25815 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25815 Log: Small DFS idl fixes. Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl branches/SAMBA_4_0/source/torture/rpc/dfs.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl === --- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-11-02 15:09:58 UTC (rev 25814) +++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-11-02 15:11:54 UTC (rev 25815) @@ -52,12 +52,11 @@ [string,charset(UTF16)] uint16 *path; } dfs_Info1; - /* first 4 bits unverified yet */ typedef [public,bitmap32bit] bitmap { DFS_VOLUME_STATE_OK = 0x1, DFS_VOLUME_STATE_INCONSISTENT = 0x2, - DFS_VOLUME_STATE_OFFLINE= 0x4, - DFS_VOLUME_STATE_ONLINE = 0x8, + DFS_VOLUME_STATE_OFFLINE= 0x3, + DFS_VOLUME_STATE_ONLINE = 0x4, DFS_VOLUME_STATE_STANDALONE = DFS_VOLUME_FLAVOR_STANDALONE, DFS_VOLUME_STATE_AD_BLOB= DFS_VOLUME_FLAVOR_AD_BLOB } dfs_VolumeState; @@ -266,6 +265,16 @@ typedef struct { uint32 count; + [size_is(count)] dfs_Info5 *s; + } dfs_EnumArray5; + + typedef struct { + uint32 count; + [size_is(count)] dfs_Info6 *s; + } dfs_EnumArray6; + + typedef struct { + uint32 count; [size_is(count)] dfs_Info200 *s; } dfs_EnumArray200; @@ -280,6 +289,8 @@ [case(2)] dfs_EnumArray2 *info2; [case(3)] dfs_EnumArray3 *info3; [case(4)] dfs_EnumArray4 *info4; + [case(5)] dfs_EnumArray5 *info5; + [case(6)] dfs_EnumArray6 *info6; [case(200)] dfs_EnumArray200 *info200; [case(300)] dfs_EnumArray300 *info300; } dfs_EnumInfo; Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c === --- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-02 15:09:58 UTC (rev 25814) +++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-02 15:11:54 UTC (rev 25815) @@ -335,7 +335,7 @@ static bool test_Enum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { bool ret = true; - uint16_t levels[] = {1, 2, 3, 4, 200, 300}; + uint16_t levels[] = {1, 2, 3, 4, 5, 6, 200, 300}; int i; for (i=0;iARRAY_SIZE(levels);i++) { @@ -350,7 +350,7 @@ static bool test_EnumEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host) { bool ret = true; - uint16_t levels[] = {1, 2, 3, 4, 200, 300}; + uint16_t levels[] = {1, 2, 3, 4, 5, 6, 200, 300}; int i; for (i=0;iARRAY_SIZE(levels);i++) {
svn commit: samba r25814 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 15:09:58 + (Fri, 02 Nov 2007) New Revision: 25814 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25814 Log: Add my (C). Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 15:06:58 UTC (rev 25813) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 15:09:58 UTC (rev 25814) @@ -4,6 +4,7 @@ Copyright (C) Tim Potter 2003 Copyright (C) Jelmer Vernooij 2004-2007 + Copyright (C) Günther Deschner 2007 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
svn commit: samba r25813 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 15:06:58 + (Fri, 02 Nov 2007) New Revision: 25813 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25813 Log: Add unfinished SecurityDescriptorsMasks test for winreg. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:51:49 UTC (rev 25812) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 15:06:58 UTC (rev 25813) @@ -439,6 +439,40 @@ return ret; } +static bool _test_SecurityDescriptor(struct dcerpc_pipe *p, +struct torture_context *tctx, +struct policy_handle *handle, +uint32_t access_mask, +const char *key, +WERROR open_werr, +WERROR get_werr, +WERROR set_werr) +{ + struct policy_handle new_handle; + bool ret = true; + bool got_key = false; + + if (!_test_OpenKey(p, tctx, handle, key, access_mask, new_handle, + open_werr, got_key)) { + return false; + } + + if (!got_key) { + return true; + } + + if (!_test_GetSetSecurityDescriptor(p, tctx, new_handle, + get_werr, set_werr)) { + ret = false; + } + + if (!test_CloseKey(p, tctx, new_handle)) { + return false; + } + + return ret; +} + static bool test_dacl_trustee_present(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle, @@ -946,6 +980,60 @@ return ret; } +static bool test_SecurityDescriptorsMasks(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key) +{ + bool ret = true; + int i; + + struct winreg_mask_result_table { + uint32_t access_mask; + WERROR open_werr; + WERROR get_werr; + WERROR set_werr; + } sd_mask_tests[] = { + { 0, + WERR_ACCESS_DENIED, WERR_BADFILE, WERR_FOOBAR }, + { SEC_FLAG_MAXIMUM_ALLOWED, + WERR_OK, WERR_OK, WERR_OK }, + { SEC_STD_WRITE_DAC, + WERR_OK, WERR_ACCESS_DENIED, WERR_FOOBAR }, + { SEC_FLAG_SYSTEM_SECURITY, + WERR_OK, WERR_ACCESS_DENIED, WERR_FOOBAR } + }; + + /* FIXME: before this test can ever run successfully we need a way to +* correctly read a NULL security_descritpor in ndr, get the required +* length, requery, etc. +*/ + + return true; + + for (i=0; i ARRAY_SIZE(sd_mask_tests); i++) { + + torture_comment(tctx, + SecurityDescriptor get set with access_mask: 0x%08x\n, + sd_mask_tests[i].access_mask); + torture_comment(tctx, + expecting: open %s, get: %s, set: %s\n, + win_errstr(sd_mask_tests[i].open_werr), + win_errstr(sd_mask_tests[i].get_werr), + win_errstr(sd_mask_tests[i].set_werr)); + + if (_test_SecurityDescriptor(p, tctx, handle, +sd_mask_tests[i].access_mask, key, +sd_mask_tests[i].open_werr, +sd_mask_tests[i].get_werr, +sd_mask_tests[i].set_werr)) { + ret = false; + } + } + + return ret; +} + typedef bool (*secinfo_verify_fn)(struct dcerpc_pipe *, struct torture_context *, struct policy_handle *, @@ -1255,7 +1343,6 @@ { bool ret = true; - if (!test_SecurityDescriptor(p, tctx, handle, key)) { printf(test_SecurityDescriptor failed\n); ret = false; @@ -1276,6 +1363,11 @@ ret = false; } + if (!test_SecurityDescriptorsMasks(p, tctx, handle, key)) { + printf(test_SecurityDescriptorsMasks failed\n); + ret = false; + } + return ret; }
svn commit: samba r25810 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:43:11 + (Fri, 02 Nov 2007) New Revision: 25810 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25810 Log: Add test for blocking security descriptor inheritance in winreg. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:37:07 UTC (rev 25809) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:43:11 UTC (rev 25810) @@ -422,6 +422,58 @@ return ret; } +static bool test_dacl_trustee_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const struct dom_sid *sid) +{ + struct security_descriptor *sd = NULL; + int i; + + if (!test_GetKeySecurity(p, tctx, handle, sd)) { + return false; + } + + if (!sd || !sd-dacl) { + return false; + } + + for (i = 0; i sd-dacl-num_aces; i++) { + if (dom_sid_equal(sd-dacl-aces[i].trustee, sid)) { + return true; + } + } + + return false; +} + +static bool test_dacl_trustee_flags_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const struct dom_sid *sid, + uint8_t flags) +{ + struct security_descriptor *sd = NULL; + int i; + + if (!test_GetKeySecurity(p, tctx, handle, sd)) { + return false; + } + + if (!sd || !sd-dacl) { + return false; + } + + for (i = 0; i sd-dacl-num_aces; i++) { + if ((dom_sid_equal(sd-dacl-aces[i].trustee, sid)) + (sd-dacl-aces[i].flags == flags)) { + return true; + } + } + + return false; +} + static bool test_dacl_ace_present(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle, @@ -585,6 +637,129 @@ return true; } +static bool test_SecurityDescriptorBlockInheritance(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key) +{ + /* get sd + add ace SEC_ACE_FLAG_NO_PROPAGATE_INHERIT + set sd + add subkey/subkey + get sd + check ace + get sd from subkey + check ace + del subkey/subkey + del subkey + reset sd + */ + + struct security_descriptor *sd = NULL; + struct security_descriptor *sd_orig = NULL; + struct security_ace *ace = NULL; + struct policy_handle new_handle; + struct dom_sid *sid = NULL; + NTSTATUS status; + bool ret = true; + uint8_t ace_flags = 0x0; + + torture_comment(tctx, SecurityDescriptor inheritance block\n); + + if (!test_OpenKey(p, tctx, handle, key, new_handle)) { + return false; + } + + if (!_test_GetKeySecurity(p, tctx, new_handle, NULL, WERR_OK, sd)) { + return false; + } + + sd_orig = security_descriptor_copy(tctx, sd); + if (sd_orig == NULL) { + return false; + } + + ace = security_ace_create(tctx, + TEST_SID, + SEC_ACE_TYPE_ACCESS_ALLOWED, + SEC_STD_REQUIRED, + SEC_ACE_FLAG_CONTAINER_INHERIT | + SEC_ACE_FLAG_NO_PROPAGATE_INHERIT); + + status = security_descriptor_dacl_add(sd, ace); + if (!NT_STATUS_IS_OK(status)) { + printf(failed to add ace: %s\n, nt_errstr(status)); + return false; + } + + if (!_test_SetKeySecurity(p, tctx, new_handle, NULL, sd, WERR_OK)) { + return false; + } + + if (!test_dacl_ace_present(p, tctx, new_handle, ace)) { + printf(new ACE not present!\n); + return false; + } + + if (!test_CloseKey(p, tctx, new_handle)) { + return false; + } + + if (!test_CreateKey(p, tctx, handle, TEST_SUBSUBKEY_SD, NULL)) { + return false; + } + + if (!test_OpenKey(p, tctx, handle, TEST_SUBSUBKEY_SD, new_handle)) { + ret = false; + goto out; + } + + if
svn commit: samba r25812 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:51:49 + (Fri, 02 Nov 2007) New Revision: 25812 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25812 Log: Add test for valid and invalid security descriptor and security information flag combinations. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:50:27 UTC (rev 25811) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:51:49 UTC (rev 25812) @@ -946,6 +946,308 @@ return ret; } +typedef bool (*secinfo_verify_fn)(struct dcerpc_pipe *, + struct torture_context *, + struct policy_handle *, + const char *, + const struct dom_sid *); + +static bool test_SetSecurityDescriptor_SecInfo(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key, + const char *test, + uint32_t access_mask, + uint32_t sec_info, + struct security_descriptor *sd, + WERROR set_werr, + bool expect_present, + bool (*fn) (struct dcerpc_pipe *, + struct torture_context *, + struct policy_handle *, + const char *, + const struct dom_sid *), + const struct dom_sid *sid) +{ + struct policy_handle new_handle; + bool open_success = false; + + torture_comment(tctx, SecurityDescriptor (%s) sets for secinfo: + 0x%08x, access_mask: 0x%08x\n, + test, sec_info, access_mask); + + if (!_test_OpenKey(p, tctx, handle, key, + access_mask, + new_handle, + WERR_OK, + open_success)) { + return false; + } + + if (!open_success) { + printf(key did not open\n); + test_CloseKey(p, tctx, new_handle); + return false; + } + + if (!_test_SetKeySecurity(p, tctx, new_handle, sec_info, + sd, + set_werr)) { + torture_warning(tctx, + SetKeySecurity with secinfo: 0x%08x has failed\n, + sec_info); + smb_panic(); + test_CloseKey(p, tctx, new_handle); + return false; + } + + test_CloseKey(p, tctx, new_handle); + + if (W_ERROR_IS_OK(set_werr)) { + bool present; + present = fn(p, tctx, handle, key, sid); + if ((expect_present) (!present)) { + torture_warning(tctx, + %s sid is not present!\n, + test); + return false; + } + if ((!expect_present) (present)) { + torture_warning(tctx, + %s sid is present but not expected!\n, + test); + return false; + } + } + + return true; +} + +static bool test_SecurityDescriptorsSecInfo(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key) +{ + struct security_descriptor *sd_orig = NULL; + struct dom_sid *sid = NULL; + bool ret = true; + int i, a; + + struct security_descriptor *sd_owner = + security_descriptor_dacl_create(tctx, + 0, + TEST_SID, NULL, NULL); + + struct security_descriptor *sd_group = + security_descriptor_dacl_create(tctx, + 0, + NULL, TEST_SID, NULL); + + struct security_descriptor *sd_dacl = +
svn commit: samba r25811 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:50:27 + (Fri, 02 Nov 2007) New Revision: 25811 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25811 Log: Add some security descriptor helper functions. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:43:11 UTC (rev 25810) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:50:27 UTC (rev 25811) @@ -344,26 +344,43 @@ return true; } -static bool test_OpenKey(struct dcerpc_pipe *p, struct torture_context *tctx, -struct policy_handle *hive_handle, -const char *keyname, struct policy_handle *key_handle) +static bool _test_OpenKey(struct dcerpc_pipe *p, struct torture_context *tctx, + struct policy_handle *hive_handle, + const char *keyname, uint32_t access_mask, + struct policy_handle *key_handle, + WERROR open_werr, + bool *success) { struct winreg_OpenKey r; r.in.parent_handle = hive_handle; init_winreg_String(r.in.keyname, keyname); r.in.unknown = 0x; - r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; + r.in.access_mask = access_mask; r.out.handle = key_handle; torture_assert_ntstatus_ok(tctx, dcerpc_winreg_OpenKey(p, tctx, r), OpenKey failed); - torture_assert_werr_ok(tctx, r.out.result, OpenKey failed); + torture_assert_werr_equal(tctx, r.out.result, open_werr, + OpenKey failed); + if (success W_ERROR_EQUAL(r.out.result, WERR_OK)) { + *success = true; + } + return true; } +static bool test_OpenKey(struct dcerpc_pipe *p, struct torture_context *tctx, +struct policy_handle *hive_handle, +const char *keyname, struct policy_handle *key_handle) +{ + return _test_OpenKey(p, tctx, hive_handle, keyname, +SEC_FLAG_MAXIMUM_ALLOWED, key_handle, +WERR_OK, NULL); +} + static bool test_Cleanup(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle, const char *key) { @@ -447,6 +464,151 @@ return false; } +static bool _test_dacl_trustee_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key, + const struct dom_sid *sid) +{ + struct policy_handle new_handle; + bool ret = true; + + if (!test_OpenKey(p, tctx, handle, key, new_handle)) { + return false; + } + + ret = test_dacl_trustee_present(p, tctx, new_handle, sid); + + test_CloseKey(p, tctx, new_handle); + + return ret; +} + +static bool test_sacl_trustee_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const struct dom_sid *sid) +{ + struct security_descriptor *sd = NULL; + int i; + uint32_t sec_info = SECINFO_SACL; + + if (!_test_GetKeySecurity(p, tctx, handle, sec_info, WERR_OK, sd)) { + return false; + } + + if (!sd || !sd-sacl) { + return false; + } + + for (i = 0; i sd-sacl-num_aces; i++) { + if (dom_sid_equal(sd-sacl-aces[i].trustee, sid)) { + return true; + } + } + + return false; +} + +static bool _test_sacl_trustee_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key, + const struct dom_sid *sid) +{ + struct policy_handle new_handle; + bool ret = true; + + if (!_test_OpenKey(p, tctx, handle, key, SEC_FLAG_SYSTEM_SECURITY, + new_handle, WERR_OK, NULL)) { + return false; + } + + ret = test_sacl_trustee_present(p, tctx, new_handle, sid); + + test_CloseKey(p, tctx, new_handle); + + return ret; +} + +static bool test_owner_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const struct dom_sid *sid) +{ + struct security_descriptor *sd = NULL; +
svn commit: samba r25809 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:37:07 + (Fri, 02 Nov 2007) New Revision: 25809 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25809 Log: Add basic security descriptor inheritance test for winreg. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:27:58 UTC (rev 25808) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:37:07 UTC (rev 25809) @@ -32,7 +32,11 @@ #define TEST_KEY3 TEST_KEY_BASE \\with a subkey #define TEST_KEY4 TEST_KEY_BASE \\sd_tests #define TEST_SUBKEY TEST_KEY3 \\subkey +#define TEST_SUBKEY_SD TEST_KEY4 \\subkey_sd +#define TEST_SUBSUBKEY_SD TEST_KEY4 \\subkey_sd\\subsubkey_sd +#define TEST_SID S-1-5-21-1234567890-1234567890-1234567890-500 + static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s) @@ -302,6 +306,14 @@ return true; } +static bool test_SetKeySecurity(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + struct security_descriptor *sd) +{ + return _test_SetKeySecurity(p, tctx, handle, NULL, sd, WERR_OK); +} + static bool test_CloseKey(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle) { @@ -410,20 +422,166 @@ return ret; } -static bool test_DeleteKey(struct dcerpc_pipe *p, struct torture_context *tctx, - struct policy_handle *handle, const char *key) +static bool test_dacl_ace_present(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const struct security_ace *ace) { + struct security_descriptor *sd = NULL; + int i; + + if (!test_GetKeySecurity(p, tctx, handle, sd)) { + return false; + } + + if (!sd || !sd-dacl) { + return false; + } + + for (i = 0; i sd-dacl-num_aces; i++) { + if (security_ace_equal(sd-dacl-aces[i], ace)) { + return true; + } + } + + return false; +} + +static bool test_RestoreSecurity(struct dcerpc_pipe *p, +struct torture_context *tctx, +struct policy_handle *handle, +const char *key, +struct security_descriptor *sd) +{ + struct policy_handle new_handle; + bool ret = true; + + if (!test_OpenKey(p, tctx, handle, key, new_handle)) { + return false; + } + + if (!test_SetKeySecurity(p, tctx, new_handle, sd)) { + ret = false; + } + + if (!test_CloseKey(p, tctx, new_handle)) { + ret = false; + } + + return ret; +} + +static bool test_SecurityDescriptorInheritance(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + const char *key) +{ + /* get sd + add ace SEC_ACE_FLAG_CONTAINER_INHERIT + set sd + get sd + check ace + add subkey + get sd + check ace + add subsubkey + get sd + check ace + del subsubkey + del subkey + reset sd + */ + + struct security_descriptor *sd = NULL; + struct security_descriptor *sd_orig = NULL; + struct security_ace *ace = NULL; + struct policy_handle new_handle; NTSTATUS status; - struct winreg_DeleteKey r; + bool ret = true; - r.in.handle = handle; - init_winreg_String(r.in.key, key); + torture_comment(tctx, SecurityDescriptor inheritance\n); - status = dcerpc_winreg_DeleteKey(p, tctx, r); + if (!test_OpenKey(p, tctx, handle, key, new_handle)) { + return false; + } - torture_assert_ntstatus_ok(tctx, status, DeleteKey failed); - torture_assert_werr_ok(tctx, r.out.result, DeleteKey failed); + if (!_test_GetKeySecurity(p, tctx, new_handle, NULL, WERR_OK, sd)) { + return false; + } + sd_orig = security_descriptor_copy(tctx, sd); + if (sd_orig == NULL) { + return false; + } + + ace = security_ace_create(tctx, + TEST_SID, + SEC_ACE_TYPE_ACCESS_ALLOWED, +
svn commit: samba r25808 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-02 14:27:58 + (Fri, 02 Nov 2007) New Revision: 25808 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25808 Log: Move basic security descriptor test to a test_SecurityDescriptors() call. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:18:07 UTC (rev 25807) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2007-11-02 14:27:58 UTC (rev 25808) @@ -30,6 +30,7 @@ #define TEST_KEY1 TEST_KEY_BASE \\spottyfoot #define TEST_KEY2 TEST_KEY_BASE \\with a SD (#1) #define TEST_KEY3 TEST_KEY_BASE \\with a subkey +#define TEST_KEY4 TEST_KEY_BASE \\sd_tests #define TEST_SUBKEY TEST_KEY3 \\subkey static void init_initshutdown_String(TALLOC_CTX *mem_ctx, @@ -145,7 +146,8 @@ SID_NT_AUTHENTICATED_USERS, SEC_ACE_TYPE_ACCESS_ALLOWED, SEC_GENERIC_ALL, - SEC_ACE_FLAG_OBJECT_INHERIT, + SEC_ACE_FLAG_OBJECT_INHERIT | + SEC_ACE_FLAG_CONTAINER_INHERIT, NULL); torture_assert_ntstatus_ok(tctx, @@ -176,27 +178,37 @@ return true; } -static bool test_GetKeySecurity(struct dcerpc_pipe *p, - struct torture_context *tctx, - struct policy_handle *handle, - struct security_descriptor **sd_out) +static bool _test_GetKeySecurity(struct dcerpc_pipe *p, +struct torture_context *tctx, +struct policy_handle *handle, +uint32_t *sec_info_ptr, +WERROR get_werr, +struct security_descriptor **sd_out) { struct winreg_GetKeySecurity r; struct security_descriptor *sd = NULL; + uint32_t sec_info; DATA_BLOB sdblob; + if (sec_info_ptr) { + sec_info = *sec_info_ptr; + } else { + sec_info = SECINFO_OWNER | SECINFO_GROUP | SECINFO_DACL; + } + ZERO_STRUCT(r); r.in.handle = handle; + r.in.sec_info = sec_info; r.in.sd = r.out.sd = talloc_zero(tctx, struct KeySecurityData); r.in.sd-size = 0x1000; - r.in.sec_info = SECINFO_OWNER | SECINFO_GROUP | SECINFO_DACL; torture_assert_ntstatus_ok(tctx, dcerpc_winreg_GetKeySecurity(p, tctx, r), GetKeySecurity failed); - torture_assert_werr_ok(tctx, r.out.result, GetKeySecurity failed); + torture_assert_werr_equal(tctx, r.out.result, get_werr, + GetKeySecurity failed); sdblob.data = r.out.sd-data; sdblob.length = r.out.sd-len; @@ -221,11 +233,21 @@ return true; } -static bool test_SetKeySecurity(struct dcerpc_pipe *p, +static bool test_GetKeySecurity(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle, - struct security_descriptor *sd) + struct security_descriptor **sd_out) { + return _test_GetKeySecurity(p, tctx, handle, NULL, WERR_OK, sd_out); +} + +static bool _test_SetKeySecurity(struct dcerpc_pipe *p, +struct torture_context *tctx, +struct policy_handle *handle, +uint32_t *sec_info_ptr, +struct security_descriptor *sd, +WERROR werr) +{ struct winreg_SetKeySecurity r; struct KeySecurityData *sdata = NULL; DATA_BLOB sdblob; @@ -233,7 +255,7 @@ ZERO_STRUCT(r); - if (p-conn-flags DCERPC_DEBUG_PRINT_OUT) { + if (sd (p-conn-flags DCERPC_DEBUG_PRINT_OUT)) { NDR_PRINT_DEBUG(security_descriptor, sd); } @@ -247,20 +269,24 @@ sdata-size = sdblob.length; sdata-len = sdblob.length; - sec_info = SECINFO_UNPROTECTED_SACL | SECINFO_UNPROTECTED_DACL; - - if (sd-owner_sid) { - sec_info |= SECINFO_OWNER; + if (sec_info_ptr) { + sec_info = *sec_info_ptr; + } else { + sec_info = SECINFO_UNPROTECTED_SACL | + SECINFO_UNPROTECTED_DACL; + if (sd-owner_sid) { + sec_info |= SECINFO_OWNER; + } + if (sd-group_sid) { + sec_info |= SECINFO_GROUP; + } +
svn commit: samba r25806 - in branches/SAMBA_4_0/source: librpc/ndr pidl/lib/Parse/Pidl/Samba4/NDR
Author: metze Date: 2007-11-02 13:48:11 + (Fri, 02 Nov 2007) New Revision: 25806 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25806 Log: let libndr.h include needed stuff and remove pidl magic for choosing common required headers metze Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h === --- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2007-11-02 13:05:43 UTC (rev 25805) +++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2007-11-02 13:48:11 UTC (rev 25806) @@ -286,8 +286,8 @@ typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *); typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *); -#include librpc/gen_ndr/misc.h -#include libcli/util/werror.h +#include libcli/util/error.h +#include librpc/gen_ndr/ndr_misc.h #include librpc/ndr/libndr_proto.h extern const struct ndr_syntax_id ndr_transfer_syntax; Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 13:05:43 UTC (rev 25805) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 13:48:11 UTC (rev 25806) @@ -2607,12 +2607,6 @@ $self-pidl(#include stdarg.h); $self-pidl(#include string.h); } - - # Samba3 has everything in include/includes.h - if (is_intree() != 3) { - $self-pidl(choose_header(libcli/util/ntstatus.h, core/ntstatus.h)); - $self-pidl(choose_header(librpc/gen_ndr/ndr_misc.h, gen_ndr/ndr_misc.h)); - } } #
svn commit: samba r25816 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: gd Date: 2007-11-02 15:41:55 + (Fri, 02 Nov 2007) New Revision: 25816 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25816 Log: Add idl for frsapi_InfoW. Surely not correct, but a start. Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/frsapi.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/frsapi.idl === --- branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-11-02 15:11:54 UTC (rev 25815) +++ branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-11-02 15:41:55 UTC (rev 25816) @@ -53,8 +53,7 @@ // /* Function 0x07 */ - - typedef enum { + typedef [v1_enum] enum { FRSAPI_INFO_VERSION = 0, FRSAPI_INFO_SETS= 1, FRSAPI_INFO_DS = 2, @@ -67,8 +66,27 @@ FRSAPI_INFO_CONFIGTABLE = 9 } frsapi_InfoEnum; - void FRSAPI_INFO_W(); + typedef struct { + uint32 length; + GUID guid; + uint32 length2; + uint32 unknown1; + frsapi_InfoEnum level; + uint32 query_counter; + uint32 unknown2; + uint32 offset; + uint32 blob_len; + /* [size_is(length-offset)] uint8 *data; */ + [subcontext_size(length-offset),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB blob; + } frsapi_Info; + WERROR frsapi_InfoW( + [in] [range(0,0x1)] uint32 length, + /* [in,out] [size_is(length)] [unique] uint8 *data */ + [in,out,unique] frsapi_Info *info + + ); + // /* Function 0x08 */ typedef [v1_enum] enum {
svn commit: samba r25803 - in branches/SAMBA_4_0/source: lib/registry/tests libcli/security libnet torture/raw torture/rpc
Author: gd Date: 2007-11-02 12:54:19 + (Fri, 02 Nov 2007) New Revision: 25803 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25803 Log: Make our security descriptor acl manipulation methods more generic so that we can add and delete ACEs for SACLs as well as for DACLs. Guenther Modified: branches/SAMBA_4_0/source/lib/registry/tests/registry.c branches/SAMBA_4_0/source/libcli/security/security_descriptor.c branches/SAMBA_4_0/source/libnet/libnet_become_dc.c branches/SAMBA_4_0/source/torture/raw/acls.c branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Sorry, the patch is too large (608 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25803
svn commit: samba r25800 - in branches/SAMBA_4_0/source/librpc/tools: .
Author: gd Date: 2007-11-02 11:36:06 + (Fri, 02 Nov 2007) New Revision: 25800 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25800 Log: Use dump_data_skip_zeros() in ndrdump. Still obey the --dump-data parameter which enforces the full dump display (thanks metze). Guenther Modified: branches/SAMBA_4_0/source/librpc/tools/ndrdump.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/tools/ndrdump.c === --- branches/SAMBA_4_0/source/librpc/tools/ndrdump.c2007-11-02 11:33:53 UTC (rev 25799) +++ branches/SAMBA_4_0/source/librpc/tools/ndrdump.c2007-11-02 11:36:06 UTC (rev 25800) @@ -130,6 +130,15 @@ return p; } +static void ndrdump_data(uint8_t *d, uint32_t l, bool force) +{ + if (force) { + dump_data(0, d, l); + } else { + dump_data_skip_zeros(0, d, l); + } +} + int main(int argc, const char *argv[]) { const struct ndr_interface_table *p = NULL; @@ -338,12 +347,14 @@ if (ndr_pull-offset != ndr_pull-data_size) { printf(WARNING! %d unread bytes\n, ndr_pull-data_size - ndr_pull-offset); - dump_data(0, ndr_pull-data+ndr_pull-offset, ndr_pull-data_size - ndr_pull-offset); + ndrdump_data(ndr_pull-data+ndr_pull-offset, +ndr_pull-data_size - ndr_pull-offset, +dumpdata); } if (dumpdata) { printf(%d bytes consumed\n, ndr_pull-offset); - dump_data(0, blob.data, blob.length); + ndrdump_data(blob.data, blob.length, dumpdata); } ndr_print = talloc_zero(mem_ctx, struct ndr_print); @@ -377,7 +388,7 @@ if (dumpdata) { printf(%ld bytes generated (validate)\n, (long)v_blob.length); - dump_data(0, v_blob.data, v_blob.length); + ndrdump_data(v_blob.data, v_blob.length, dumpdata); } ndr_v_pull = ndr_pull_init_blob(v_blob, mem_ctx); @@ -393,7 +404,9 @@ if (ndr_v_pull-offset != ndr_v_pull-data_size) { printf(WARNING! %d unread bytes in validation\n, ndr_v_pull-data_size - ndr_v_pull-offset); - dump_data(0, ndr_v_pull-data+ndr_v_pull-offset, ndr_v_pull-data_size - ndr_v_pull-offset); + ndrdump_data(ndr_v_pull-data+ndr_v_pull-offset, +ndr_v_pull-data_size - ndr_v_pull-offset, +dumpdata); } ndr_v_print = talloc_zero(mem_ctx, struct ndr_print);
svn commit: samba r25798 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 11:01:18 + (Fri, 02 Nov 2007) New Revision: 25798 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25798 Log: - check return value of ndr_push_set_switch_value() - fix memory leaks in error pathes metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:59:43 UTC (rev 25797) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 11:01:18 UTC (rev 25798) @@ -843,6 +843,7 @@ ndr-flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE; status = push(ndr, NDR_SCALARS|NDR_BUFFERS, discard_const(p)); if (!NT_STATUS_IS_OK(status)) { + talloc_free(ndr); return 0; } ret = ndr-offset; @@ -865,9 +866,15 @@ ndr = ndr_push_init_ctx(NULL); if (!ndr) return 0; ndr-flags |= flags | LIBNDR_FLAG_NO_NDR_SIZE; - ndr_push_set_switch_value(ndr, p, level); + + status = ndr_push_set_switch_value(ndr, p, level); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(ndr); + return 0; + } status = push(ndr, NDR_SCALARS|NDR_BUFFERS, p); if (!NT_STATUS_IS_OK(status)) { + talloc_free(ndr); return 0; } ret = ndr-offset;
Re: [SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-156-g779353b
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan (metze) Metzmacher wrote: Gerald (Jerry) Carter schrieb: The branch, v3-2-test has been updated via 779353b86d1699324149896f1ffa237c6ebe46ec (commit) via d6cdbfd875bb2653e831d314726c3240beb0a96b (commit) via b7d2fadbef044a89920da613b1aafc74a3d94e24 (commit) from 47dbddcb5361caa30ee60cf4e15bb50d557d1191 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 779353b86d1699324149896f1ffa237c6ebe46ec Merge: d6cdbfd875bb2653e831d314726c3240beb0a96b 47dbddcb5361caa30ee60cf4e15bb50d557d1191 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Thu Nov 1 21:30:43 2007 -0400 Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit d6cdbfd875bb2653e831d314726c3240beb0a96b Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Thu Nov 1 15:53:44 2007 -0400 Patch 2 of 3 from Debian Samba packagers: Hi Jerry, one of this patches, broke make install in the build-farm... Gahok. I'll fix it. Sorry. cheers, jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHKx/4IR7qMdg1EfYRAmAvAJ9bBHT1wbs8yAtIntwZ/a0Jqpe8kgCeJ3Km LN/WKYb16hTfbgSxIZ3mD7A= =r5jU -END PGP SIGNATURE-
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-160-g8c73e19
The branch, v3-2-test has been updated via 8c73e19f51d6e3f520cf44dd22f9b9584d4b460f (commit) from 84d22f7747126608b9460f9591bb5967d871b82d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 8c73e19f51d6e3f520cf44dd22f9b9584d4b460f Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 09:27:04 2007 -0700 Fix state_path to take a const string, not use pstring. Jeremy. --- Summary of changes: source/lib/util.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/util.c b/source/lib/util.c index c8f0c31..0ae80c1 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -550,7 +550,7 @@ int set_message(char *buf,int num_words,int num_bytes,bool zero) int set_message_bcc(char *buf,int num_bytes) { int num_words = CVAL(buf,smb_wct); - SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes); + SSVAL(buf,smb_vwv + num_words*SIZEOFWORD,num_bytes); smb_setlen(buf,smb_size + num_words*2 + num_bytes - 4); return (smb_size + num_words*2 + num_bytes); } @@ -2450,21 +2450,25 @@ char *data_path(const char *name) /* a useful function for returning a path in the Samba state directory */ -char *state_path(char *name) + +char *state_path(const char *name) { - pstring fname; + TALLOC_CTX *ctx = talloc_tos(); + char *fname = talloc_strdup(ctx, dyn_STATEDIR()); - pstrcpy(fname,dyn_STATEDIR()); + if (!fname) { + smb_panic(state_path: out of memory); + } trim_string(fname,,/); if (!directory_exist(fname,NULL)) { mkdir(fname,0755); } - pstrcat(fname,/); - pstrcat(fname,name); + fname = talloc_asprintf(ctx, %s/%s, + fname, name); - return talloc_strdup(talloc_tos(), fname); + return fname; } /** -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-162-gc3de44b
The branch, v3-2-test has been updated via c3de44b6b063e126095b30536fdcb643c70e395e (commit) from 4d7badb0c44f287034f58d9a412e662c0fbecdc9 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit c3de44b6b063e126095b30536fdcb643c70e395e Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 10:35:10 2007 -0700 Argggh. smblen doesn't include the +4, so my smb_doff calculations shouldn't either :-). Jeremy. --- Summary of changes: source/smbd/reply.c |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source/smbd/reply.c b/source/smbd/reply.c index de0e852..84c1892 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3927,8 +3927,8 @@ void reply_write_and_X(connection_struct *conn, struct smb_request *req) smblen = smb_len(req-inbuf); if (req-unread_bytes 0x || - (smblen smb_doff + 4 - smblen - smb_doff + 4 0x)) { + (smblen smb_doff + smblen - smb_doff 0x)) { numtowrite |= (((size_t)SVAL(req-inbuf,smb_vwv9))16); } @@ -3939,8 +3939,8 @@ void reply_write_and_X(connection_struct *conn, struct smb_request *req) return; } } else { - if (smb_doff + 4 smblen || smb_doff + 4 + numtowrite numtowrite || - smb_doff + 4 + numtowrite smblen) { + if (smb_doff smblen || smb_doff + numtowrite numtowrite || + smb_doff + numtowrite smblen) { reply_doserror(req, ERRDOS, ERRbadmem); END_PROFILE(SMBwriteX); return; -- Samba Shared Repository
svn commit: samba r25795 - in branches/SAMBA_4_0/source/pidl/tests: .
Author: metze Date: 2007-11-02 10:35:09 + (Fri, 02 Nov 2007) New Revision: 25795 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25795 Log: whitespace cleanup... metze Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl Changeset: Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl === --- branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl 2007-11-02 10:32:47 UTC (rev 25794) +++ branches/SAMBA_4_0/source/pidl/tests/ndr_simple.pl 2007-11-02 10:35:09 UTC (rev 25795) @@ -9,20 +9,20 @@ use lib $RealBin; use Util qw(test_samba4_ndr); -test_samba4_ndr(simple, void Test(); , +test_samba4_ndr(simple, void Test(); , - uint8_t data[] = { 0x02 }; - uint8_t result; - DATA_BLOB b; - struct ndr_pull *ndr; - - b.data = data; - b.length = 1; - ndr = ndr_pull_init_blob(b, mem_ctx); - - if (!NT_STATUS_IS_OK(ndr_pull_uint8(ndr, NDR_SCALARS, result))) - return 1; - - if (result != 0x02) - return 2; + uint8_t data[] = { 0x02 }; + uint8_t result; + DATA_BLOB b; + struct ndr_pull *ndr; + + b.data = data; + b.length = 1; + ndr = ndr_pull_init_blob(b, mem_ctx); + + if (!NT_STATUS_IS_OK(ndr_pull_uint8(ndr, NDR_SCALARS, result))) + return 1; + + if (result != 0x02) + return 2; );
svn commit: samba r25794 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 10:32:47 + (Fri, 02 Nov 2007) New Revision: 25794 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25794 Log: use NDR_CHECK() metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2007-11-02 10:29:19 UTC (rev 25793) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2007-11-02 10:32:47 UTC (rev 25794) @@ -130,12 +130,11 @@ */ _PUBLIC_ NTSTATUS ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v) { - NTSTATUS status; - status = ndr_pull_uint32(ndr, NDR_SCALARS, v); - if (NT_STATUS_IS_OK(status) *v != 0) { + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, v)); + if (*v != 0) { ndr-ptr_count++; } - return status; + return NT_STATUS_OK; } /*
svn commit: samba r25793 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 10:29:19 + (Fri, 02 Nov 2007) New Revision: 25793 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25793 Log: check the return value of ndr_push_set_switch_value() metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:26:49 UTC (rev 25792) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:29:19 UTC (rev 25793) @@ -814,7 +814,7 @@ ndr = ndr_push_init_ctx(mem_ctx); NT_STATUS_HAVE_NO_MEMORY(ndr); - ndr_push_set_switch_value(ndr, p, level); + NDR_CHECK(ndr_push_set_switch_value(ndr, p, level)); NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); *blob = ndr_push_blob(ndr);
svn commit: samba r25792 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 10:26:49 + (Fri, 02 Nov 2007) New Revision: 25792 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25792 Log: use NT_STATUS_HAVE_NO_MEMORY() and NDR_CHECK() metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 09:15:12 UTC (rev 25791) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:26:49 UTC (rev 25792) @@ -791,17 +791,12 @@ _PUBLIC_ NTSTATUS ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, ndr_push_flags_fn_t fn) { - NTSTATUS status; struct ndr_push *ndr; ndr = ndr_push_init_ctx(mem_ctx); - if (!ndr) { - return NT_STATUS_NO_MEMORY; - } - status = fn(ndr, NDR_SCALARS|NDR_BUFFERS, p); - if (!NT_STATUS_IS_OK(status)) { - return status; - } + NT_STATUS_HAVE_NO_MEMORY(ndr); + NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); + *blob = ndr_push_blob(ndr); talloc_steal(mem_ctx, blob-data); talloc_free(ndr); @@ -815,17 +810,12 @@ _PUBLIC_ NTSTATUS ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_push_flags_fn_t fn) { - NTSTATUS status; struct ndr_push *ndr; ndr = ndr_push_init_ctx(mem_ctx); - if (!ndr) { - return NT_STATUS_NO_MEMORY; - } + NT_STATUS_HAVE_NO_MEMORY(ndr); + ndr_push_set_switch_value(ndr, p, level); - status = fn(ndr, NDR_SCALARS|NDR_BUFFERS, p); - if (!NT_STATUS_IS_OK(status)) { - return status; - } + NDR_CHECK(fn(ndr, NDR_SCALARS|NDR_BUFFERS, p)); *blob = ndr_push_blob(ndr); talloc_steal(mem_ctx, blob-data);
svn commit: samba r25805 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .
Author: metze Date: 2007-11-02 13:05:43 + (Fri, 02 Nov 2007) New Revision: 25805 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25805 Log: pidl: include libndr.h as first header in ndr_foo.h metze Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 13:02:25 UTC (rev 25804) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 13:05:43 UTC (rev 25805) @@ -2398,8 +2398,6 @@ my $count = 0; - $self-pidl_hdr(choose_header(librpc/ndr/libndr.h, ndr.h)); - if ($needed-{compression}) { $self-pidl(choose_header(librpc/ndr/ndr_compression.h, ndr/compression.h)); } @@ -2625,6 +2623,7 @@ $self-pidl_hdr(/* header auto-generated by pidl */); $self-pidl_hdr(); + $self-pidl_hdr(choose_header(librpc/ndr/libndr.h, ndr.h)); $self-pidl_hdr(#include \$gen_header\) if ($gen_header); $self-pidl_hdr();
svn commit: samba r25804 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .
Author: metze Date: 2007-11-02 13:02:25 + (Fri, 02 Nov 2007) New Revision: 25804 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25804 Log: move including ndr_compression.h into HeaderInterface() metze Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 12:54:19 UTC (rev 25803) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-11-02 13:02:25 UTC (rev 25804) @@ -2392,14 +2392,18 @@ # generate prototypes and defines for the interface definitions # FIXME: these prototypes are for the DCE/RPC client functions, not the # NDR parser and so do not belong here, technically speaking -sub HeaderInterface($$) +sub HeaderInterface($$$) { - my($self,$interface) = @_; + my($self,$interface,$needed) = @_; my $count = 0; $self-pidl_hdr(choose_header(librpc/ndr/libndr.h, ndr.h)); + if ($needed-{compression}) { + $self-pidl(choose_header(librpc/ndr/ndr_compression.h, ndr/compression.h)); + } + if (has_property($interface, object)) { $self-pidl(choose_header(librpc/gen_ndr/ndr_orpc.h, ndr/orpc.h)); } @@ -2559,12 +2563,8 @@ $self-pidl_hdr(); - if ($needed-{compression}) { - $self-pidl(choose_header(librpc/ndr/ndr_compression.h, ndr/compression.h)); - } + $self-HeaderInterface($interface, $needed); - $self-HeaderInterface($interface); - # Typedefs foreach my $d (@{$interface-{TYPES}}) { ($needed-{TypeFunctionName(ndr_push, $d)}) $self-ParseTypePushFunction($d, r);
Jonathan Parr presents www.libeldefense.com
www.libeldefense.com Most people have limited knowledge when it comes to search engine ranking and the various types of services on offer. We all know that having top 10 positions on some of the leading engines can bring all the traffic we can handle, and then some. But how do we get those top 10 listings and what should we expect to pay to get them? September 6, 2000 A simple way to approach this is to look at your competition. Do a quick search on one of the leading engines like What U Seek, Google or AltaVista, using a search phrase that people might use when looking for your products or services, and check the number on the first results page that shows how many pages have been found. http://libeldefense.studioathome.com/ http://libeldefense.blogspirit.com/ http://libeldefense.blogster.com/jonathan_parr_presents.html http://libeldefense.livejournal.com/723.html http://libeldefense.blogspot.com/ http://www.bloglines.com/blog/libeldefense http://libeldefense.bloghi.com/ http://libeldefense.tripod.com/libeldefense/ http://www.yasvs.com/ http://www.greatestjournal.com/users/libeldefense http://www.greatestjournal.com/users/libeldefense/362.html http://www.naymz.com/search/jonathan/parr/1314951 http://www.xanga.com/libeldefense http://libeldefense.multiply.com/journal/ http://20six.co.uk/libeldefense/ http://libeldefense.blogsome.com/ http://www.freewebs.com/libeldefense/ http://dangerell.googlepages.com/home http://www.opendiary.com/entrylist.asp?authorcode=D736464 http://libeldefense.bravehost.com/index.html http://www.my-diary.org/users/296432 http://www.my-diary.org/edit/?action=viewentryentryid=541256338 http://libeldefense.blog.co.uk/ http://clearblogs.com/libeldefense/78969/Jonathan+Parr+presents+www.libeldefense.com.html http://libeldefense.bloggerteam.com/entry.php?u=libeldefensee_id=293138 http://www.ebloggy.com/blog.php?username=libeldefenseid=1 http://libeldefense.blogs.ie/ http://www.teenblog.org/libeldefense/ http://libeldefense.myweblog.com/2007/10/27/jonathan-parr-presents-wwwlibeldefensecom/ http://libeldefense.egoweblog.com/ http://www.bahraichblogs.com/libeldefense/5952/ http://libeldefense.blogbeee.com/ http://portal.blogfusion.com/blogs/libeldefense/ http://noss123network.ning.com/profile/JonathanParr __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
svn commit: samba r25791 - in branches/SAMBA_4_0/source/libcli/wrepl: .
Author: metze Date: 2007-11-02 09:15:12 + (Fri, 02 Nov 2007) New Revision: 25791 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25791 Log: wrepl_request_finished() sets req-status, so make this explicit and avoid req-status = req-status... metze Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c === --- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c 2007-11-02 08:49:23 UTC (rev 25790) +++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c 2007-11-02 09:15:12 UTC (rev 25791) @@ -85,6 +85,7 @@ struct wrepl_socket *wrepl_socket = talloc_get_type(private, struct wrepl_socket); struct wrepl_request *req = wrepl_socket-recv_queue; DATA_BLOB blob; + NTSTATUS status; if (!req) { DEBUG(1,(Received unexpected WINS packet of length %u!\n, @@ -99,11 +100,11 @@ blob.length = packet_blob_in.length - 4; /* we have a full request - parse it */ - req-status = ndr_pull_struct_blob(blob, - req-packet, req-packet, - (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet); - if (!NT_STATUS_IS_OK(req-status)) { - wrepl_request_finished(req, req-status); + status = ndr_pull_struct_blob(blob, + req-packet, req-packet, + (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet); + if (!NT_STATUS_IS_OK(status)) { + wrepl_request_finished(req, status); return NT_STATUS_OK; } @@ -113,7 +114,7 @@ NDR_PRINT_DEBUG(wrepl_packet, req-packet); } - wrepl_request_finished(req, req-status); + wrepl_request_finished(req, NT_STATUS_OK); return NT_STATUS_OK; } @@ -468,6 +469,7 @@ struct wrepl_request *req; struct wrepl_wrap wrap; DATA_BLOB blob; + NTSTATUS status; req = talloc_zero(wrepl_socket, struct wrepl_request); if (!req) return NULL; @@ -483,10 +485,10 @@ } wrap.packet = *packet; - req-status = ndr_push_struct_blob(blob, req, wrap, - (ndr_push_flags_fn_t)ndr_push_wrepl_wrap); - if (!NT_STATUS_IS_OK(req-status)) { - return wrepl_request_finished(req, req-status); + status = ndr_push_struct_blob(blob, req, wrap, + (ndr_push_flags_fn_t)ndr_push_wrepl_wrap); + if (!NT_STATUS_IS_OK(status)) { + return wrepl_request_finished(req, status); } if (DEBUGLVL(10)) { @@ -511,9 +513,9 @@ talloc_set_destructor(s, wrepl_send_ctrl_destructor); } - req-status = packet_send(wrepl_socket-packet, blob); - if (!NT_STATUS_IS_OK(req-status)) { - return wrepl_request_finished(req, req-status); + status = packet_send(wrepl_socket-packet, blob); + if (!NT_STATUS_IS_OK(status)) { + return wrepl_request_finished(req, status); } req-trigger = false;
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-164-g95de802
The branch, v3-2-test has been updated via 95de80218c10a72c7b28541c3c2e475e083b68f1 (commit) via 10af752391be51c7381a4eaca27f29e1f2a677b3 (commit) from c3de44b6b063e126095b30536fdcb643c70e395e (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 95de80218c10a72c7b28541c3c2e475e083b68f1 Merge: 10af752391be51c7381a4eaca27f29e1f2a677b3 c3de44b6b063e126095b30536fdcb643c70e395e Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Fri Nov 2 14:16:40 2007 -0400 Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit 10af752391be51c7381a4eaca27f29e1f2a677b3 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Fri Nov 2 14:16:06 2007 -0400 Fix build breakage when not specifying --with-fhs. Ensure that CODEPAGEDIR, STATEDIR, and CACHEDIR have values. --- Summary of changes: source/configure.in |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/configure.in b/source/configure.in index 227ab40..1b282ae 100644 --- a/source/configure.in +++ b/source/configure.in @@ -52,6 +52,9 @@ test ${libdir} || libdir=\${prefix}/lib pammodulesdir=\${LIBDIR}/security configdir=\${LIBDIR} swatdir=\${prefix}/swat +codepagedir=\${LIBDIR} +statedir=\${LOCKDIR} +cachedir=\${LOCKDIR} AC_ARG_WITH(fhs, [ --with-fhs Use FHS-compliant paths (default=no)], -- Samba Shared Repository
svn commit: samba r25796 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2007-11-02 10:49:51 + (Fri, 02 Nov 2007) New Revision: 25796 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25796 Log: use NT_STATUS_HAVE_NO_MEMORY() metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:35:09 UTC (rev 25795) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-02 10:49:51 UTC (rev 25796) @@ -563,9 +563,7 @@ { struct ndr_token_list *tok; tok = talloc(mem_ctx, struct ndr_token_list); - if (tok == NULL) { - return NT_STATUS_NO_MEMORY; - } + NT_STATUS_HAVE_NO_MEMORY(tok); tok-key = key; tok-value = value; DLIST_ADD((*list), tok);
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-161-g4d7badb
The branch, v3-2-test has been updated via 4d7badb0c44f287034f58d9a412e662c0fbecdc9 (commit) from 8c73e19f51d6e3f520cf44dd22f9b9584d4b460f (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 4d7badb0c44f287034f58d9a412e662c0fbecdc9 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 10:25:34 2007 -0700 Fix Solaris by ensuring we use the IPv4 or IPv6 length in any getnameinfo calls. Jeremy --- Summary of changes: source/lib/interfaces.c | 17 ++--- source/lib/system.c | 24 source/lib/util_sock.c|7 --- source/utils/net_lookup.c |2 +- 4 files changed, 43 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c index 38abb92..01481c5 100644 --- a/source/lib/interfaces.c +++ b/source/lib/interfaces.c @@ -696,6 +696,16 @@ int get_interfaces(struct iface_struct *ifaces, int max_interfaces) #ifdef AUTOCONF_TEST /* this is the autoconf driver to test get_interfaces() */ +static socklen_t calc_sa_size(struct sockaddr *psa) +{ + socklen_t sl = sizeof(struct sockaddr_in); +#if defined(HAVE_IPV6) + if (psa-sa_family == AF_INET6) { + salen = sizeof(struct sockaddr_in6); + } +#endif +} + int main() { struct iface_struct ifaces[MAX_INTERFACES]; @@ -710,22 +720,23 @@ int get_interfaces(struct iface_struct *ifaces, int max_interfaces) for (i=0;itotal;i++) { char addr[INET6_ADDRSTRLEN]; int ret; + socklen_t sl; printf(%-10s , ifaces[i].name); addr[0] = '\0'; ret = getnameinfo((struct sockaddr *)ifaces[i].ip, - sizeof(ifaces[i].ip), + calc_sa_size(ifaces[i].ip), addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); printf(IP=%s , addr); addr[0] = '\0'; ret = getnameinfo((struct sockaddr *)ifaces[i].netmask, - sizeof(ifaces[i].netmask), + calc_sa_size(ifaces[i].netmask), addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); printf(NETMASK=%s , addr); addr[0] = '\0'; ret = getnameinfo((struct sockaddr *)ifaces[i].bcast, - sizeof(ifaces[i].bcast), + calc_sa_size(ifaces[i].bcast), addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); printf(BCAST=%s\n, addr); diff --git a/source/lib/system.c b/source/lib/system.c index 6042282..fe4e700 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -2545,3 +2545,27 @@ int sys_getpeereid( int s, uid_t *uid) return -1; #endif } + +int sys_getnameinfo(const struct sockaddr *psa, + socklen_t salen, + char *host, + size_t hostlen, + char *service, + size_t servlen, + int flags) +{ + /* +* For Solaris we must make sure salen is the +* correct length for the incoming sa_family. +*/ + + if (salen == sizeof(struct sockaddr_storage)) { + salen = sizeof(struct sockaddr_in); +#if defined(HAVE_IPV6) + if (psa-sa_family == AF_INET6) { + salen = sizeof(struct sockaddr_in6); + } +#endif + } + return getnameinfo(psa, salen, host, hostlen, service, servlen, flags); +} diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index bbcbcac..b4fda54 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -495,7 +495,7 @@ bool is_address_any(const struct sockaddr_storage *psa) Print out an IPv4 or IPv6 address from a struct sockaddr_storage. / -char *print_sockaddr_len(char *dest, +static char *print_sockaddr_len(char *dest, size_t destlen, const struct sockaddr_storage *psa, socklen_t psalen) @@ -503,7 +503,7 @@ char *print_sockaddr_len(char *dest, if (destlen 0) { dest[0] = '\0'; } - (void)getnameinfo((const struct sockaddr *)psa, + (void)sys_getnameinfo((const struct sockaddr *)psa, psalen, dest, destlen, NULL, 0, @@ -519,7 +519,8 @@ char *print_sockaddr(char *dest, size_t destlen,
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-167-g81ca585
The branch, v3-2-test has been updated via 81ca5853b2475f123faab3b550f0a7b24ae3c208 (commit) via 319dfbaf1b8d08171731d4575127f4bb5255a229 (commit) via 619e33248d12e764e902e4fdb5fb223cb9cfea3b (commit) from 95de80218c10a72c7b28541c3c2e475e083b68f1 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 81ca5853b2475f123faab3b550f0a7b24ae3c208 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 12:21:34 2007 -0700 Change the client library to write directly out of the incoming buffer in the non-signed case. Speeds up writes by over 10% or so. Complete the server recvfile implementation. Jeremy. commit 319dfbaf1b8d08171731d4575127f4bb5255a229 Merge: 619e33248d12e764e902e4fdb5fb223cb9cfea3b 95de80218c10a72c7b28541c3c2e475e083b68f1 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 12:06:15 2007 -0700 Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into v3-2-test commit 619e33248d12e764e902e4fdb5fb223cb9cfea3b Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 12:05:17 2007 -0700 Forgot one more getnameinfo. Jeremy. --- Summary of changes: source/client/client.c | 30 source/include/client.h |1 + source/include/smb_macros.h |4 +- source/libsmb/clientgen.c| 65 - source/libsmb/clireadwrite.c | 106 +- source/smbd/reply.c | 15 -- source/utils/nmblookup.c |2 +- 7 files changed, 180 insertions(+), 43 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/client.c b/source/client/client.c index a381d13..27f120c 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -3227,6 +3227,35 @@ static int cmd_show_connect( void ) return 0; } +/ + iosize command +***/ + +int cmd_iosize(void) +{ + fstring buf; + int iosize; + + if (!next_token_nr(NULL,buf,NULL,sizeof(buf))) { + DEBUG(0, (iosize n or iosize 0xn. + Minimum is 16384 (0x4000), + max is 16776960 (0x00)\n)); + return 1; + } + + iosize = strtol(buf,NULL,0); + if (iosize 0 || iosize 0x00) { + DEBUG(0, (iosize out of range (min = 16384 (0x4000), + max = 16776960 (0x0x00))); + return 1; + } + + io_bufsize = iosize; + d_printf(iosize is now %d\n, io_bufsize); + return 0; +} + + /* Some constants for completing filename arguments */ #define COMPL_NONE0 /* No completions */ @@ -3265,6 +3294,7 @@ static struct {hardlink,cmd_hardlink,src dest create a Windows hard link,{COMPL_REMOTE,COMPL_REMOTE}}, {help,cmd_help,[command] give help on a command,{COMPL_NONE,COMPL_NONE}}, {history,cmd_history,displays the command history,{COMPL_NONE,COMPL_NONE}}, + {iosize,cmd_iosize,iosize number (default 64512),{COMPL_NONE,COMPL_NONE}}, {lcd,cmd_lcd,[directory] change/report the local current working directory,{COMPL_LOCAL,COMPL_NONE}}, {link,cmd_link,oldname newname create a UNIX hard link,{COMPL_REMOTE,COMPL_REMOTE}}, {lock,cmd_lock,lock fnum [r|w] hex-start hex-len : set a POSIX lock,{COMPL_REMOTE,COMPL_REMOTE}}, diff --git a/source/include/client.h b/source/include/client.h index c4669db..e38017f 100644 --- a/source/include/client.h +++ b/source/include/client.h @@ -29,6 +29,7 @@ #define CLI_SAMBA_MAX_LARGE_READX_SIZE (127*1024) /* Works for Samba servers */ #define CLI_WINDOWS_MAX_LARGE_READX_SIZE ((64*1024)-2) /* Windows servers are broken */ #define CLI_SAMBA_MAX_POSIX_LARGE_READX_SIZE (0x00) /* 24-bit len. */ +#define CLI_SAMBA_MAX_POSIX_LARGE_WRITEX_SIZE (0x00) /* 24-bit len. */ /* * These definitions depend on smb.h diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 9af6345..0dfb596 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -193,8 +193,8 @@ buf[2] = (len0xFF00)8; buf[3] = len0xFF; } while (0) #define smb_len_large(buf) (PVAL(buf,3)|(PVAL(buf,2)8)|(PVAL(buf,1)16)) -#define _smb_setlen_large(buf,len) do { buf[0] = 0; buf[1] = (len0xFF)16; \ -buf[2] = (len0xFF00)8; buf[3] = len0xFF; } while (0) +#define _smb_setlen_large(buf,len) do { buf[0] = 0; buf[1] = ((len)0xFF)16; \ +buf[2] = ((len)0xFF00)8; buf[3] = (len)0xFF; } while (0) /*** find the difference in milliseconds between two struct timeval diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-168-g6b7ccd3
The branch, v3-2-test has been updated via 6b7ccd3efb05291f3b8779845a3842a09bb9aa07 (commit) from 81ca5853b2475f123faab3b550f0a7b24ae3c208 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 6b7ccd3efb05291f3b8779845a3842a09bb9aa07 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 12:56:21 2007 -0700 Fix typos in calc_sa_size, noticed by [EMAIL PROTECTED] Jeremy. --- Summary of changes: source/lib/interfaces.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c index 01481c5..1174bf8 100644 --- a/source/lib/interfaces.c +++ b/source/lib/interfaces.c @@ -701,9 +701,10 @@ static socklen_t calc_sa_size(struct sockaddr *psa) socklen_t sl = sizeof(struct sockaddr_in); #if defined(HAVE_IPV6) if (psa-sa_family == AF_INET6) { - salen = sizeof(struct sockaddr_in6); + sl = sizeof(struct sockaddr_in6); } #endif + return sl; } int main() -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-170-g494bf62
The branch, v3-2-test has been updated via 494bf6293bedbda4b10aa2eae452377b8130cd01 (commit) via 638579d75a2aa00836dc4c0c772381b775944b16 (commit) from 6b7ccd3efb05291f3b8779845a3842a09bb9aa07 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 494bf6293bedbda4b10aa2eae452377b8130cd01 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 14:23:10 2007 -0700 Fix the snprintf checks, and fix a typo in pointer indirection. These fixes are needed for a working getaddrinfo etc. replacement. Fixes from Wayne Davison [EMAIL PROTECTED] from rsync. Jeremy. commit 638579d75a2aa00836dc4c0c772381b775944b16 Author: Jeremy Allison [EMAIL PROTECTED] Date: Fri Nov 2 14:22:19 2007 -0700 Ensure we use the correct socklen_t values for bind() for Solaris. Jeremy. --- Summary of changes: source/lib/replace/getaddrinfo.c | 10 +- source/lib/util_sock.c |4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/replace/getaddrinfo.c b/source/lib/replace/getaddrinfo.c index 063bacd..c5cd52b 100644 --- a/source/lib/replace/getaddrinfo.c +++ b/source/lib/replace/getaddrinfo.c @@ -222,7 +222,7 @@ static int getaddr_info_name(const char *node, } for(pptr = hp-h_addr_list; *pptr; pptr++) { - struct in_addr ip = *(struct in_addr *)pptr; + struct in_addr ip = *(struct in_addr *)*pptr; struct addrinfo *ai = alloc_entry(hints, ip, port); if (!ai) { @@ -407,7 +407,7 @@ static int gethostnameinfo(const struct sockaddr *sa, if (ret == 0) { /* Name looked up successfully. */ ret = snprintf(node, nodelen, %s, hp-h_name); - if (ret == -1 || ret nodelen) { + if (ret 0 || (size_t)ret = nodelen) { return EAI_MEMORY; } if (flags NI_NOFQDN) { @@ -428,7 +428,7 @@ static int gethostnameinfo(const struct sockaddr *sa, } p = inet_ntoa(((struct sockaddr_in *)sa)-sin_addr); ret = snprintf(node, nodelen, %s, p); - if (ret == -1 || ret nodelen) { + if (ret 0 || (size_t)ret = nodelen) { return EAI_MEMORY; } return 0; @@ -449,7 +449,7 @@ static int getservicenameinfo(const struct sockaddr *sa, if (se se-s_name) { /* Service name looked up successfully. */ ret = snprintf(service, servicelen, %s, se-s_name); - if (ret == -1 || ret servicelen) { + if (ret 0 || (size_t)ret = servicelen) { return EAI_MEMORY; } return 0; @@ -457,7 +457,7 @@ static int getservicenameinfo(const struct sockaddr *sa, /* Otherwise just fall into the numeric service code... */ } ret = snprintf(service, servicelen, %d, port); - if (ret == -1 || ret servicelen) { + if (ret 0 || (size_t)ret = servicelen) { return EAI_MEMORY; } return 0; diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index b4fda54..4a73f92 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -1325,12 +1325,14 @@ int open_socket_in(int type, { struct sockaddr_storage sock; int res; + socklen_t slen = sizeof(struct sockaddr_in); sock = *psock; #if defined(HAVE_IPV6) if (sock.ss_family == AF_INET6) { ((struct sockaddr_in6 *)sock)-sin6_port = htons(port); + slen = sizeof(struct sockaddr_in6); } #endif if (sock.ss_family == AF_INET) { @@ -1374,7 +1376,7 @@ int open_socket_in(int type, } /* now we've got a socket - we need to bind it */ - if( bind( res, (struct sockaddr *)sock, sizeof(sock) ) == -1 ) { + if (bind(res, (struct sockaddr *)sock, slen) == -1 ) { if( DEBUGLVL(dlevel) (port == SMB_PORT1 || port == SMB_PORT2 || port == NMB_PORT) ) { char addr[INET6_ADDRSTRLEN]; -- Samba Shared Repository
svn commit: samba-docs r1202 - in trunk/smbdotconf/protocol: .
Author: jra Date: 2007-11-02 21:54:22 + (Fri, 02 Nov 2007) New Revision: 1202 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1202 Log: Add min receivefile size docs. Jeremy. Added: trunk/smbdotconf/protocol/minreceivefilesize.xml Changeset: Added: trunk/smbdotconf/protocol/minreceivefilesize.xml === --- trunk/smbdotconf/protocol/minreceivefilesize.xml2007-11-01 13:45:31 UTC (rev 1201) +++ trunk/smbdotconf/protocol/minreceivefilesize.xml2007-11-02 21:54:22 UTC (rev 1202) @@ -0,0 +1,22 @@ +samba:parameter name=min receivefile size + type=integer + context=G + advanced=1 developer=1 + xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; +description +paraThis option changes the behavior of citerefentryrefentrytitlesmbd/refentrytitle +manvolnum8/manvolnum/citerefentry when processing SMBwriteX calls. Any incoming +SMBwriteX call on a non-signed SMB/CIFS connection greater than this value will not be processed in the normal way but will +be passed to any underlying kernel recvfile or splice system call (if there is no such +call Samba will emulate in user space). This allows zero-copy writes directly from network +socket buffers into the filesystem buffer cache, if available. It may improve performance +but user testing is recommended. If set to zero Samba processes SMBwriteX calls in the +normal way. To enable POSIX large write support (SMB/CIFS writes up to 16Mb) this option must be +nonzero./para +paraNote this option will have NO EFFECT if set on a SMB signed connection./para +paraThe default is zero, which diables this option./para +/description + +relatedmin receivefile size/related +value type=default0/value +/samba:parameter
svn commit: samba-docs r1203 - in trunk/manpages-3: .
Author: jra Date: 2007-11-02 22:45:37 + (Fri, 02 Nov 2007) New Revision: 1203 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1203 Log: Make the smbclient man page match the internal command list. Jeremy. Modified: trunk/manpages-3/smbclient.1.xml Changeset: Sorry, the patch is too large (648 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1203
Build status as of Sat Nov 3 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-11-02 00:00:34.0 + +++ /home/build/master/cache/broken_results.txt 2007-11-03 00:00:59.0 + @@ -1,4 +1,4 @@ -Build status as of Fri Nov 2 00:00:02 2007 +Build status as of Sat Nov 3 00:00:02 2007 Build counts: Tree Total Broken Panic @@ -16,9 +16,9 @@ rsync29 13 0 samba-docs 0 0 0 samba-gtk2 2 0 -samba4 25 20 1 +samba4 26 19 5 samba_3_20 0 0 -samba_3_2_test 28 19 0 +samba_3_2_test 28 18 0 smb-build28 28 0 talloc 29 2 0 tdb 29 3 0