Re: [Samba] Strange problem with my new PDC
Hallo, Marc, Du meintest am 19.05.11: You can find two Logfiles in the attached archive. One's named Success.log and the other one Failing.log. No - this mailing list doesn't support such attachments. Try inline copies. Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] failed to set times with rsync or smbclient
hi, When copying a file to a cifs mounted share, the times are not preserved when I use rsync -a or smbclient. It is not a problem of rights on the target directory, because the same copy works with scp or cp -p, and the times are then preserved. Even the command touch -r source_file target_file works. This looks like a bug, but I'd like to know whether anybody has an explanation about this difference of behaviour. -- Pierre Frenkiel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Mapping drive
Hello, which version of samba? Is there a domain (samba or Windows?)? Did you made a net use delete and with xp, did you do execute control keymgr.dll and deleted all passwords saved? Then mapped new? --- EDV Daniel Müller Leitung EDV Tropenklinik Paul-Lechler-Krankenhaus Paul-Lechler-Str. 24 72076 Tübingen Tel.: 07071/206-463, Fax: 07071/206-499 eMail: muel...@tropenklinik.de Internet: www.tropenklinik.de --- -Ursprüngliche Nachricht- Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im Auftrag von Brian Gesendet: Donnerstag, 19. Mai 2011 15:40 An: samba@lists.samba.org Betreff: [Samba] Mapping drive We have a server running linux with a samba shared directory. We have sever windows xp machines that map the samba shared directory using the same user name and password. All has gone well for a couple of years. Now, on some of the machines, it won't allow the mapping of the samba share reporting Access denied I have made sure that the proper user name and password is used. There has been no recent updates on the server or user's computer...that we know of. One hint of a problem is that the windows machines appears to be trying to send the windows machine's group name as part of the log in which I know it didn't do before. Any ideas? Thanks to all that answer Brian Brian Germann Wayne Enterprises Inc. Linden, CA 209-887-2008 mailto:br...@revolution911.com http://www.revolution911.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] No Access after enabling SMB2
Hello, i have a Samba Server running on CentOS 5.6 with samba package 3.5.8 from SerNet. Shares can accessed until I enable max protocol = smb2, after that no access is possible. In the samba logfiles such an access is logged with: Failed to parse NTLMSSP packet, could not extract NTLMSSP command Followed by a dump_data. Any ideas? Cheers, Daniel -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] No Access after enabling SMB2
On Fri, May 20, 2011 at 11:00:38AM +0200, Zabel, Daniel wrote: i have a Samba Server running on CentOS 5.6 with samba package 3.5.8 from SerNet. Shares can accessed until I enable max protocol = smb2, after that no access is possible. For SMB2, please try 3.6.0rc1. Volker -- SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-37-0, fax: +49-551-37-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Strange problem with my new PDC
Hi Helmut, the logs are 2,6 MB uncompressed, each. So inline would make ~5MB , multiplied by the number of recipients ;) So I thought a ~400 KB great attachment would be the better way ... Am 20.05.2011 07:22, schrieb Helmut Hullen: Hallo, Marc, Du meintest am 19.05.11: You can find two Logfiles in the attached archive. One's named Success.log and the other one Failing.log. No - this mailing list doesn't support such attachments. Try inline copies. Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] No Access after enabling SMB2
On 2011-05-20 at 11:09 +0200 Volker Lendecke sent off: On Fri, May 20, 2011 at 11:00:38AM +0200, Zabel, Daniel wrote: i have a Samba Server running on CentOS 5.6 with samba package 3.5.8 from SerNet. Shares can accessed until I enable max protocol = smb2, after that no access is possible. For SMB2, please try 3.6.0rc1. we plan to publish RPMs for testing on ftp.sernet.de in a couple of days. Cheers Björn -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Printer settings not saved
Dear Thilo, Did you manage to solve this issue? I'm having the same problem for some time now and I have not any clue yet how to solve this. On Wed, Apr 20, 2011 at 04:40:28PM +0200, Thilo Uttendorfer wrote: Hi, I have problems to save printer settings like changing the size from letter to A4. This happens for user settings and default printer settings. The settings are always resetted to default values like letter. The system uses samba 3.4.11, I also did some tests with samba 3.5.8, but nothing changed. After downgrading to 3.3.2 everything worked as expected. I didn't change any samba configuration while up- and downgrading. Bug #6727 sounds a little bit like my problem: [...] Also if I change the configuration (e. g. configure 4 cartridges instead of 2), it is not be saved). But this bug should be fixed with 3.5.8, see: https://bugzilla.samba.org/show_bug.cgi?id=6727 Can somebody confirm this bug? Thank you, Thilo Uttendorfer -- Thilo Uttendorfer Linux Information Systems AG Putzbrunner Str. 71, 81739 München t.uttendor...@linux-ag.com, http://www.linux-ag.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- Met vriendelijke groeten, With kind regards, Mit freundlichen Gruessen, Willy * W.K. Offermans e-mail: wi...@offermans.rompen.nl Powered by (__) \\\'',) \/ \ ^ .\._/_) www.FreeBSD.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Problems with group assignments
Dear All, We are trying to transfer a SaMBa installation from an old server to a newer more up-to-date one. The original server was sharing files to Windows XP systems in Active Directory (Windows Server 2003 R2 version), but as we move to Windows 7 and Active Directory (Windows Server 2008 R2 version) we need to upgrade the service. The old server was part of a NIS domain, with the valid users, write list, etc entries in its smb.conf referring to the NIS groups using the @ sign (which the documentation says it means is interpreted as an NIS netgroup first (if your system supports NIS), and then as a UNIX group if the name was not found in the NIS netgroup database; see http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html#INVALIDUSERS). It all worked fine as it picked users' group membership from NIS. The new server is a Solaris 10 box running SaMBa 3.5.5, and we are having problems with it picking up the group memberships. The old server's smb.conf was transplanted to the new server (with a few path changes), and the new server was successfully added to our Active Directory domain. As the new server is NOT a member of NIS, we made a copy of all the smb.conf-relevant groups to its local /etc/group and added all the users to the /etc/passwd file. With these changes we can access the shares using the AD usernames and passwords as long as they are not access-limited by valid users, so the integration of the server into AD is working. But if we add a valid users = @group line to the share in smb.conf, it will completely refuse access to all users, even the ones belonging to the group. Leaving the share accessible to all, but adding a write list = @group line to smb.conf, will allow access, but no one will be able to write to it, even the members of the group. If we chan ge the write list and valid users lines to list the usernames directly instead of through a group membership, it works. To avoid even attempting to talk to NIS, we changed the @ signs for +, but it still kept refusing to recognize group memberships (NIS or local UNIX ones). So it seems our new SaMBa is having problems recognizing group memberships. What am I doing wrong? Have SUN/Oracle done something to stop SaMBa accessing its local UNIX groups? Thank you for your help. Yours, David del Campo -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Problems with group assignments
Dear Michal, The user authentication must be being handled by AD; the local accounts on the new server have been added to the /etc/passwd and /etc/shadow files, but the passwords in the /etc/shadow file are set to locked (which means that though the account exists and can own files, people cannot actually log in to the system; root can su to them though). As a result AD must be providing the authentication. The usernames in AD and the local files are the same. The /etc/nsswitch.conf file is as follows (comments removed): passwd: files group: files hosts: files dns ipnodes: files dns networks: files protocols: files rpc:files ethers: files netmasks: files bootparams: files publickey: files netgroup: files automount: files aliases:files services: files printers: user files auth_attr: files prof_attr: files project:files tnrhtp: files tnrhdb: files As you can see anything should be handled by the local files. The /etc/samba/smb.conf file is as follows (comments and private removed): [global] workgroup = removed server string = Samba Server on %h netbios name = removed security = ADS hosts allow = removed guest account = nobody log file = /var/samba/log/log.%m max log size = 500 password server = removed, removed realm = removed passdb backend= smbpasswd interfaces= removed local master = no os level = 33 domain master = no preferred master= no dns proxy = no [transit] comment = Temporary Backup for Windows 7 Upgrades path = removed browseable= no read only = yes valid users = user1, user2, user3, user4 # valid users = @group write list= users1, user2, user3, user4 # write list = +sysman As is, the share works, but as you can see I have to specify the usernames and cannot use +group or @group notation as I did on the old server. The old server was also part of the AD domain, so as far as I can see the only differences between the two setups is the SaMBa version and the fact the new server is not part of NIS; that is why I tried the +group notation, to no avail. I also have a Linux (Fedora 14) machine acting as a temporary SaMBa server (version 3.5.8); it is part of the NIS and AD domains and the @group assignments work fine from NIS. Thank you for your help. Yours, David -Original Message- From: Michal Belica [mailto:beli+...@beli.sk] Sent: 20 May 2011 14:46 To: F. David del Campo Hill Subject: Re: [Samba] Problems with group assignments Hi, - Original Message - From: F. David del Campo Hill delca...@stats.ox.ac.uk Sent: Friday, May 20, 2011 2:43:49 PM [...snip...] path changes), and the new server was successfully added to our Active Directory domain. As the new server is NOT a member of NIS, we made a copy of all the smb.conf-relevant groups to its local /etc/group and added all the users to the /etc/passwd file. With these changes we can access the shares using the AD usernames and passwords as long as they are not access-limited by valid users, so the integration of the server into AD is working. But if we add a valid users = @group line to the share in smb.conf, it will Are you using local or AD users and groups or are you mixing them? You say you have joined the server to AD and also added users and groups to /etc/passwd and /etc/group. But when a user connects to the Samba server from Win, (probably) his AD account is used, but in /etc/group, the members are the local users, which need not be the same (depends on more factors, like your NS switch settings for example). Try to check that you're using the AD/local users/groups consistently, or give more info related to this (e.g. from /etc/nsswitch.conf, /etc/smb.conf ...). -- Michal Belica - IT consultant beli+...@beli.sk | www.beli.sk -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba 3.6.0rc1 in Debian experimental
I have the pleasure to announce that the Debian experimental archive now carries packages for samba 3.6.0rc1. This happened 53 hours and 26 minutes after Karolin announced the availability of this new version..:-) Instead of re-explaining how the Debian experimental archive is working, please allow me to point to a quite complete Wiki page about it: http://wiki.debian.org/DebianExperimental 3.6.* packages will remain in Debian experimental until the release of the final version of 3.6.0. Then, packages will be uploaded to Debian unstable, thus targeting the next Debian version (and indirectly flowing to Ubuntu, of course). -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 4 and gpo in win7
Hello Kalle, It looks better but according to what I see I think that you didn't update the code of samba4. Did you pull the latest changes ? and then compile and install it ? Matthieu. Hello! Attached a trace file while running gpupdate. Accessing sysvol works through: \\ip\sysvol and \\dc.domain_name\sysvol Doesn´t work through \\domainname\sysvol - Ursprungligt meddelande - Från: Matthieu Patoum...@samba.org Till: samba@lists.samba.org, samba-technicalsamba-techni...@lists.samba.org Skickat: torsdag, 19 maj 2011 15:31:34 Ämne: Re: [Samba] Samba 4 and gpo in win7 On 12/05/2011 11:21, tae...@bredband.net wrote: Hello! Having an issue with getting gpo to apply for my win7 clients. Running samba4. Creating gpo with gpmc and they are created under var/locks/sysvol/mydomain/policies They applies just perfect on win xp clients but when trying on win7 clients they just won´t apply. When runnin gpupdate /force we get this(summary): So I pushed a few fixes in the Git tree of samba and made a lot of tests about this. First you need: host msdfs = yes in the [global] part of your configuration. Then reboot XP / windows7. Try to access \\domain.tld\sysvol and also navigate inside it. If it works it means that dfs for sysvol is working in most the case it will solve Windows7 problems with fetching the GPO. If not make trace from the samba server and send us for analysis, trace can be done like this: tcpdump -i any host ip_of_the_client -s 16000 -w /tmp/trace.pcap. Matthieu. -- Matthieu Patou Samba Teamhttp://samba.org Private repo http://git.samba.org/?p=mat/samba.git;a=summary -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba 3.6.0rc1 in Debian experimental
Hi Christian, On Fri, May 20, 2011 at 07:30:51PM +0200, Christian PERRIER wrote: I have the pleasure to announce that the Debian experimental archive now carries packages for samba 3.6.0rc1. This happened 53 hours and 26 minutes after Karolin announced the availability of this new version..:-) Instead of re-explaining how the Debian experimental archive is working, please allow me to point to a quite complete Wiki page about it: http://wiki.debian.org/DebianExperimental 3.6.* packages will remain in Debian experimental until the release of the final version of 3.6.0. Then, packages will be uploaded to Debian unstable, thus targeting the next Debian version (and indirectly flowing to Ubuntu, of course). thanks a *lot*! :-) That makes testing pretty easy. Cheers, Karolin -- Samba http://www.samba.org SerNet http://www.sernet.de sambaXP http://www.sambaxp.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a2f4309 torture-dfs: fix a typo that was causing the test to be flacky from 642c6ba Fix Bug 8152 - smbd crash in release_ip() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a2f430911271ed3d9a681e64d250facb8e66f3f2 Author: Matthieu Patou m...@matws.net Date: Fri May 20 10:30:54 2011 +0400 torture-dfs: fix a typo that was causing the test to be flacky Autobuild-User: Matthieu Patou m...@samba.org Autobuild-Date: Fri May 20 09:39:12 CEST 2011 on sn-devel-104 --- Summary of changes: source4/torture/dfs/domaindfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/dfs/domaindfs.c b/source4/torture/dfs/domaindfs.c index 4914217..89e9cc1 100644 --- a/source4/torture/dfs/domaindfs.c +++ b/source4/torture/dfs/domaindfs.c @@ -371,7 +371,7 @@ static bool test_getsysvolreferral(struct torture_context *tctx, resp3.referral_entries[0].referral.v3.referrals.r1.DFS_path, str+1)); torture_assert_int_equal(tctx, strlen( - resp2.referral_entries[0].referral.v3.referrals.r1.netw_address) 0, + resp3.referral_entries[0].referral.v3.referrals.r1.netw_address) 0, 1, Length of first referral is less than 0); torture_assert_int_equal(tctx, strstr(resp3.referral_entries[0].referral.v3.referrals.r1.netw_address, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d432c7e s3: Remove unused cli_setup_packet() from a2f4309 torture-dfs: fix a typo that was causing the test to be flacky http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d432c7e27866c4b3f53bb4c2b2e8cc9bf48b9e3d Author: Volker Lendecke v...@samba.org Date: Fri May 20 08:36:46 2011 +0200 s3: Remove unused cli_setup_packet() Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Fri May 20 10:51:36 CEST 2011 on sn-devel-104 --- Summary of changes: source3/libsmb/clientgen.c |5 - source3/libsmb/proto.h |1 - 2 files changed, 0 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index ec0965f..5a1ac82 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -417,11 +417,6 @@ void cli_setup_packet_buf(struct cli_state *cli, char *buf) SSVAL(buf,smb_flg2, flags2); } -void cli_setup_packet(struct cli_state *cli) -{ - cli_setup_packet_buf(cli, cli-outbuf); -} - / Setup the bcc length of the packet from a pointer to the end of the data. / diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 4ac767c..03f3ed9 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -157,7 +157,6 @@ bool cli_state_seqnum_remove(struct cli_state *cli, bool cli_receive_smb(struct cli_state *cli); bool cli_send_smb(struct cli_state *cli); void cli_setup_packet_buf(struct cli_state *cli, char *buf); -void cli_setup_packet(struct cli_state *cli); void cli_setup_bcc(struct cli_state *cli, void *p); NTSTATUS cli_set_domain(struct cli_state *cli, const char *domain); NTSTATUS cli_set_username(struct cli_state *cli, const char *username); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1e472f1 s3:testparm: don't return an error for a warning message from 7ab9e26 s3-epmapper: Fixed endpoint registration. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1e472f1534985a9e70a2bed45723e08fe8dee078 Author: Stefan Metzmacher me...@samba.org Date: Fri May 20 08:31:16 2011 +0200 s3:testparm: don't return an error for a warning message metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Fri May 20 13:14:39 CEST 2011 on sn-devel-104 --- Summary of changes: source3/utils/testparm.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index edb11a6..f8b8c7f 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -154,7 +154,6 @@ to the default value * or a valid password server.\n, sec_setting ); sec_setting = ; fprintf(stderr, WARNING: The setting 'security=%s' is should NOT be combined with the 'password server' parameter.\n (by default Samba will discover the correct DC to contact automatically).\n, sec_setting ); - ret = 1; } /* -- Samba Shared Repository
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via 8997f02 Added Paulo Dias company to Portugal index. from 2ec6c01 add myself to the team list http://gitweb.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit 8997f021c1623999ac1491566e87ec880883d9d4 Author: John H Terpstra j...@samba.org Date: Fri May 20 07:09:26 2011 -0500 Added Paulo Dias company to Portugal index. --- Summary of changes: support/portugal.html | 20 1 files changed, 20 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/support/portugal.html b/support/portugal.html index 6370c3c..b3dcdaf 100644 --- a/support/portugal.html +++ b/support/portugal.html @@ -32,5 +32,25 @@ Samba solutions, most commonly: pWe offer installation and support for virtually any Samba scenario./p +!-- Added 20110521 at req. of Rui Moreira -- +hr / +h3Paulo Dias Soluccedil;otilde;es para Informaacute;tica Unipessoal Lda/h3 +presmall +Paulo Dias Soluccedil;otilde;es para Informaacute;tica Unipessoal Lda +Rua de Santo Antoacute;nio de Contumil, 265 +4350-289 Porto Portugal + +a href=http://www.pdsinformatica.com;http://www.pdsinformatica.com/a +a href=mailto:ge...@pdsinformatica.com;ge...@pdsinformatica.com/a +/small/pre +p +We are a small IT company based in Porto, we install, support and +manage, Linux Servers based on OpenLdap and Samba integration. We +provide our customers with File Sharing, Authentication, Voice over IP +and other linux based services and servers like web servers, database +and email. +/p + + !--#include virtual=footer_support.html-- -- Samba Website Repository
Re: [SCM] Samba Shared Repository - branch master updated
On 2010-05-25 at 07:41 +0200 Stefan (metze) Metzmacher sent off: I think we also need -qhalt=e here, to match -Werror. I'm wondering if --errwarn is the correct thing for the sun case... -qhalt=w and -errwarn=%all are the equivalent options for -Werror. Some configure checks need to bail out errors even on warnings, that's all what this is needed for. Cheers Björn
Re: [SCM] Samba Shared Repository - branch master updated
Hi Metze, On 2010-06-10 at 20:50 +0200 Stefan (metze) Metzmacher sent off: + * h_errno is defined as function call macro for multithreaded applications + * in HP-UX. *this* h_errno is not used in the HP-UX codepath of our nss + * modules, so let's simply comment it out here: + * int h_errno; + */ nss_status_t status; } nss_XbyY_args_t; Aren't this structures of fixed predefined size? Don't we use this to cast a given buffer into something we use? you may very well be right. I didn't see this - the solaris/hpux shared nss code is quite a pain to read If so args-status is wrong now and we better keep an 'int _not_used'. alright, I'll change it this way, thanks! Cheers Björn -- SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-37-0, fax: +49-551-37-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen pgpDGaPi6RKhX.pgp Description: PGP signature
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Sat, 2010-04-17 at 13:12 -0500, Matthias Dieter Wallnöfer wrote: - Log - commit c678563efec82e84c9c86309cbf9495950a02b8c Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de Date: Sat Apr 17 20:08:15 2010 +0200 s4:kdc/db-glue.c - use TALLOC_FREE insteal of talloc_free for the priv context Also after a free priv could be != NULL and may be freed again. This should fix bug #7365. We tend to avoid TALLOC_FREE in Samba 4, opting for explicitly setting variable to NULL explicitly. This way valgrind will tell us about double frees. If you think we should consider using TALLOC_FREE, I think we should discuss that first - for now, please use talloc_free() and assignments to NULL. Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
On Fri, 2010-12-10 at 22:35 +0100, Matthieu Patou wrote: commit 6875a611a71bf6d1623fc62361fc8b145b1f6559 Author: Matthieu Patou m...@matws.net Date: Fri Dec 10 23:16:28 2010 +0300 build: add a function to test if -lc is needed This is needed on openbsd as some linking flags makes mandatory to specify the libc for the linking Urgh, there is something seriously broken if a C compiler doesn't link to libc by default (I can understand a -nostdlib option). Is this default OpenBSD behaviour or something specific to this host? Cheers, Jelmer
Re: talloc dep for talloc.h
On Tue, 2011-01-04 at 21:27 +1100, Andrew Bartlett wrote: On Tue, 2011-01-04 at 09:55 +0100, Jelmer Vernooij wrote: On Tue, 2011-01-04 at 05:40 +0100, Andrew Bartlett wrote: commit 640028d158583825ea5ffd1266f099cf8776db5d Author: Andrew Bartlett abart...@samba.org Date: Tue Jan 4 14:41:38 2011 +1100 nsswitch Add talloc depencency for nsstest nsstest does not use talloc, but it includes talloc.h via includes.h, and so without this it cannot find the right internal header. This wasn't noticed before, as most linux developer boxes have a talloc.h. The issue was reported by Adam Tauno Williams awilliam at whitemice.org I'm a bit puzzled by this, as e.g. sn doesn't have talloc.h installed either and neither have most of the build farm hosts. Perhaps it happens if talloc.h is installed but not in /usr/include ? That is odd, but I reproduced it locally, by removing libtalloc-devel from my Fedora 12 laptop. I've tested it before and after this commit (including a waf configure). That is odd indeed. Is talloc.pc perhaps part of the the libtalloc package on RedHat instead of libtalloc-devel ? Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
On Tue, 2011-01-04 at 05:40 +0100, Andrew Bartlett wrote: commit 640028d158583825ea5ffd1266f099cf8776db5d Author: Andrew Bartlett abart...@samba.org Date: Tue Jan 4 14:41:38 2011 +1100 nsswitch Add talloc depencency for nsstest nsstest does not use talloc, but it includes talloc.h via includes.h, and so without this it cannot find the right internal header. This wasn't noticed before, as most linux developer boxes have a talloc.h. The issue was reported by Adam Tauno Williams awilliam at whitemice.org I'm a bit puzzled by this, as e.g. sn doesn't have talloc.h installed either and neither have most of the build farm hosts. Perhaps it happens if talloc.h is installed but not in /usr/include ? Cheers, Jelmer
Re: talloc dep for talloc.h
On Tue, 2011-01-04 at 11:30 +0100, Jelmer Vernooij wrote: On Tue, 2011-01-04 at 21:27 +1100, Andrew Bartlett wrote: On Tue, 2011-01-04 at 09:55 +0100, Jelmer Vernooij wrote: On Tue, 2011-01-04 at 05:40 +0100, Andrew Bartlett wrote: commit 640028d158583825ea5ffd1266f099cf8776db5d Author: Andrew Bartlett abart...@samba.org Date: Tue Jan 4 14:41:38 2011 +1100 nsswitch Add talloc depencency for nsstest nsstest does not use talloc, but it includes talloc.h via includes.h, and so without this it cannot find the right internal header. This wasn't noticed before, as most linux developer boxes have a talloc.h. The issue was reported by Adam Tauno Williams awilliam at whitemice.org I'm a bit puzzled by this, as e.g. sn doesn't have talloc.h installed either and neither have most of the build farm hosts. Perhaps it happens if talloc.h is installed but not in /usr/include ? That is odd, but I reproduced it locally, by removing libtalloc-devel from my Fedora 12 laptop. I've tested it before and after this commit (including a waf configure). That is odd indeed. Is talloc.pc perhaps part of the the libtalloc package on RedHat instead of libtalloc-devel ? talloc.pc is in libtalloc-devel in fedora and in RHEL. Simo. -- Simo Sorce Samba Team GPL Compliance Officer s...@samba.org Principal Software Engineer at Red Hat, Inc. s...@redhat.com
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8a2eff8 s3: Fork the echo handler only after SMB1 negprot is done via af9afe9 s3: Fix Coverity ID 2573: UNUSED_VALUE via f043bab s3: Fix an uninitialized variable from 1e472f1 s3:testparm: don't return an error for a warning message http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8a2eff871f990aaaf1e11b333035097f5e6d3268 Author: Volker Lendecke v...@samba.org Date: Fri May 20 13:07:17 2011 +0200 s3: Fork the echo handler only after SMB1 negprot is done This enables activating the echo responder also if SMB2 is enabled, albeit it will only be used for SMB1 at this moment. Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Fri May 20 15:06:03 CEST 2011 on sn-devel-104 commit af9afe9f4fc21b9c800bb14c65cbfecb155d3519 Author: Volker Lendecke v...@samba.org Date: Fri May 20 13:25:31 2011 +0200 s3: Fix Coverity ID 2573: UNUSED_VALUE Andrew B., please check! commit f043babcbdef26980a607de517be05092bf037a9 Author: Volker Lendecke v...@samba.org Date: Fri May 20 15:21:43 2011 +0200 s3: Fix an uninitialized variable --- Summary of changes: source3/lib/netapi/netapi.c |5 +++-- source3/smbd/negprot.c |5 + source3/smbd/process.c |9 ++--- source3/smbd/proto.h|1 + source3/smbd/reply.c|2 +- 5 files changed, 12 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 06e353d..1d34934 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -293,9 +293,10 @@ char *libnetapi_errstr(NET_API_STATUS status) if (status 0xc000) { ret = talloc_strdup(NULL, get_friendly_nt_error_msg(NT_STATUS(status))); + } else { + ret = talloc_strdup(NULL, + get_friendly_werror_msg(W_ERROR(status))); } - - ret = talloc_strdup(NULL, get_friendly_werror_msg(W_ERROR(status))); TALLOC_FREE(frame); return ret; } diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 9f201b8..aa10563 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -716,6 +716,11 @@ void reply_negprot(struct smb_request *req) } TALLOC_FREE(cliprotos); + + if (lp_async_smb_echo_handler() !fork_echo_handler(sconn)) { + exit_server(Failed to fork echo handler); + } + END_PROFILE(SMBnegprot); return; } diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 5f9845c..7f04a7b 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2798,7 +2798,7 @@ static void smbd_echo_loop(struct smbd_server_connection *sconn, /* * Handle SMBecho requests in a forked child process */ -static bool fork_echo_handler(struct smbd_server_connection *sconn) +bool fork_echo_handler(struct smbd_server_connection *sconn) { int listener_pipe[2]; int res; @@ -2912,8 +2912,7 @@ void smbd_process(struct smbd_server_connection *sconn) const char *remaddr = NULL; int ret; - if (lp_maxprotocol() == PROTOCOL_SMB2 - !lp_async_smb_echo_handler()) { + if (lp_maxprotocol() == PROTOCOL_SMB2) { /* * We're not making the decision here, * we're just allowing the client @@ -3034,10 +3033,6 @@ void smbd_process(struct smbd_server_connection *sconn) exit_server(Failed to init smb_signing); } - if (lp_async_smb_echo_handler() !fork_echo_handler(sconn)) { - exit_server(Failed to fork echo handler); - } - /* Setup oplocks */ if (!init_oplocks(sconn-msg_ctx)) exit_server(Failed to init oplocks); diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 1f2b1a9..589d45d 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -750,6 +750,7 @@ size_t req_wct_ofs(struct smb_request *req); void chain_reply(struct smb_request *req); bool req_is_in_chain(struct smb_request *req); void smbd_process(struct smbd_server_connection *sconn); +bool fork_echo_handler(struct smbd_server_connection *sconn); /* The following definitions come from smbd/quotas.c */ diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index fc381d8..99ab4ca 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -5815,7 +5815,7 @@ static void rename_open_files(connection_struct *conn, files_struct *fsp; bool did_rename = False; NTSTATUS status; - uint32_t new_name_hash; + uint32_t new_name_hash = 0; for(fsp = file_find_di_first(conn-sconn, lck-id); fsp; fsp =
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Fri, 2010-05-28 at 12:08 -0500, Matthias Dieter Wallnöfer wrote: Summary of changes: source4/web_server/wsgi.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c index 7a23ae4..db1a5f2 100644 --- a/source4/web_server/wsgi.c +++ b/source4/web_server/wsgi.c @@ -301,7 +301,8 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header PyDict_SetItemString(env, CONTENT_TYPE, PyString_FromString(hdr-value)); } else { if (asprintf(name, HTTP_%s, hdr-name) 0) { - continue; + PyErr_NoMemory(); + return NULL; } This will leak the 'env' python object. You probably also want to call Py_DECREF here. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
On Mon, 2010-05-31 at 09:46 +0200, Stefan (metze) Metzmacher wrote: diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 3a87506..61930f6 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -60,14 +60,14 @@ def build(bld): abi_file='ABI/talloc-%s.sigs' % VERSION, abi_match='talloc* _talloc*', hide_symbols=True, - vnum=VERSION) + vnum=VERSION, is_bundled=True) # should we also install the symlink to libtalloc1.so here? bld.SAMBA_LIBRARY('talloc-compat1', 'compat/talloc_compat1.c', deps='talloc', enabled = bld.env.TALLOC_COMPAT1, - vnum=VERSION) + vnum=VERSION, is_bundled=True) shouldn't we use 'not bld.env.standalone_talloc' instead of 'True' here too? That's a good point, thanks. Fixed in master. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
On Mon, 2010-05-31 at 19:49 +0200, Stefan (metze) Metzmacher wrote: Am 31.05.2010 19:23, schrieb Jelmer Vernooij: The branch, master has been updated via 7f75ee0... ldb: Install ldb_handlers.h header. via fe8302b... ldb: Remove Samba-specific symbols. via 1bc53f0... ldb: Move utility functions to separate file. via 82d56b9... ldb: Fix dependencies when building with system ldb. from 471ed70... s3:smbd map_username() doesn't need sconn anymore http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7f75ee025ff9c02763fb9201d94af4b2739c8e03 Author: Jelmer Vernooij jel...@samba.org Date: Mon May 31 18:29:11 2010 +0200 ldb: Install ldb_handlers.h header. commit fe8302b235197e359a20ba0489eb72b54793963e Author: Jelmer Vernooij jel...@samba.org Date: Mon May 31 18:28:09 2010 +0200 ldb: Remove Samba-specific symbols. commit 1bc53f0213b04e30ebf2ac60695c84c5781e4e72 Author: Jelmer Vernooij jel...@samba.org Date: Mon May 31 18:12:05 2010 +0200 ldb: Move utility functions to separate file. commit 82d56b937445585b9e60451daf660aee5ace0523 Author: Jelmer Vernooij jel...@samba.org Date: Mon May 31 16:05:41 2010 +0200 ldb: Fix dependencies when building with system ldb. I'm getting this again: [1862/1965] abi_check: source4/bin/default/source4/lib/ldb/libldb-samba4.so libldb-samba4.so: symbol ldb_wrap_connect has been added - please mark it _PRIVATE_ or update minor version signature: struct ldb_context *(TALLOC_CTX *, struct tevent_context *, struct loadparm_context *, const char *, struct auth_session_info *, struct cli_credentials *, unsigned int) libldb-samba4.so: symbol ldb_register_samba_handlers has been added - please mark it _PRIVATE_ or update minor version signature: int (struct ldb_context *) libldb-samba4.so: symbol ldb_wrap_fork_hook has been added - please mark it _PRIVATE_ or update minor version signature: void (void) libldb-samba4.so: symbol ldb_samba_syntax_by_lDAPDisplayName has been added - please mark it _PRIVATE_ or update minor version signature: const struct ldb_schema_syntax *(struct ldb_context *, const char *) libldb-samba4.so: symbol ldb_samba_syntax_by_name has been added - please mark it _PRIVATE_ or update minor version signature: const struct ldb_schema_syntax *(struct ldb_context *, const char *) Waf: Leaving directory `/home/metze/master4/source4/bin' Build failed: ABI for libldb-samba4.so has changed - please fix library version then build with --abi-update See http://wiki.samba.org/index.php/Waf#ABI_Checking for more information make: *** [all] Fehler 1 Have you tried a git clean -f -x -d ? I can't reproduce the issue with that, and as far as I can tell the buildfarm is happy too. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via df650fa s3:smbd remove unused code from 8a2eff8 s3: Fork the echo handler only after SMB1 negprot is done http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit df650fa8cf4954245eced7eccb26388c24acee82 Author: Christian Ambach a...@samba.org Date: Fri May 20 14:17:36 2011 +0200 s3:smbd remove unused code in the early CTDB days, the RELEASE_IP message was defined and some code was added to react on such a message to make smbd exit if the IP address it was using for the server socket is removed by CTDB. Later, it was discovered that we need to stop smbd immediately and logic was added to ctdb_conn to call release_ip() without going through the messaging system. So this code is not used and can be removed Autobuild-User: Christian Ambach a...@samba.org Autobuild-Date: Fri May 20 16:18:24 CEST 2011 on sn-devel-104 --- Summary of changes: source3/librpc/idl/messaging.idl |1 - source3/smbd/process.c | 11 --- 2 files changed, 0 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl index 8618d53..0c0672c 100644 --- a/source3/librpc/idl/messaging.idl +++ b/source3/librpc/idl/messaging.idl @@ -75,7 +75,6 @@ interface messaging /* cluster reconfigure events */ MSG_SMB_BRL_VALIDATE= 0x0311, - MSG_SMB_RELEASE_IP = 0x0312, /*Close a specific file given a share entry. */ MSG_SMB_CLOSE_FILE = 0x0313, diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 7f04a7b..dc637de 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2375,15 +2375,6 @@ static void release_ip(const char *ip, void *priv) } } -static void msg_release_ip(struct messaging_context *msg_ctx, void *private_data, - uint32_t msg_type, struct server_id server_id, DATA_BLOB *data) -{ - struct smbd_server_connection *sconn = talloc_get_type_abort( - private_data, struct smbd_server_connection); - - release_ip((char *)data-data, sconn-client_id.addr); -} - #ifdef CLUSTER_SUPPORT static int client_get_tcp_info(int sock, struct sockaddr_storage *server, struct sockaddr_storage *client) @@ -3040,8 +3031,6 @@ void smbd_process(struct smbd_server_connection *sconn) /* register our message handlers */ messaging_register(sconn-msg_ctx, NULL, MSG_SMB_FORCE_TDIS, msg_force_tdis); - messaging_register(sconn-msg_ctx, sconn, - MSG_SMB_RELEASE_IP, msg_release_ip); messaging_register(sconn-msg_ctx, NULL, MSG_SMB_CLOSE_FILE, msg_close_file); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 95a55e2 Fix bug 8133 - strange behavior for the file (whose filename first character is period ) in SMB2 case. via 38c77db Optimization. If the attributes passed to can_rename() include both FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM then there's no point in reading the source DOS attribute, as we're not going to deny the rename on attribute match. from df650fa s3:smbd remove unused code http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 95a55e2feabfae3b0874ae9aa2ce716ca0a9ae39 Author: Jeremy Allison j...@samba.org Date: Thu May 19 16:39:18 2011 -0700 Fix bug 8133 - strange behavior for the file (whose filename first character is period ) in SMB2 case. When doing SMB2 renames, we need to match all filetypes (no attributes field in the SMB2 call). By default a file starting with a period is returned as FILE_ATTRIBUTE_HIDDEN in Samba. Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Fri May 20 19:26:04 CEST 2011 on sn-devel-104 commit 38c77db9892b5d607a7a05fab563f5f6977794e1 Author: Jeremy Allison j...@samba.org Date: Thu May 19 16:38:11 2011 -0700 Optimization. If the attributes passed to can_rename() include both FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM then there's no point in reading the source DOS attribute, as we're not going to deny the rename on attribute match. --- Summary of changes: source3/smbd/reply.c | 13 - source3/smbd/trans2.c |5 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 99ab4ca..31f596c 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2381,15 +2381,18 @@ void reply_ctemp(struct smb_request *req) static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp, uint16 dirtype) { - uint32 fmode; - if (!CAN_WRITE(conn)) { return NT_STATUS_MEDIA_WRITE_PROTECTED; } - fmode = dos_mode(conn, fsp-fsp_name); - if ((fmode ~dirtype) (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { - return NT_STATUS_NO_SUCH_FILE; + if ((dirtype (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != + (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { + /* Only bother to read the DOS attribute if we might deny the + rename on the grounds of attribute missmatch. */ + uint32_t fmode = dos_mode(conn, fsp-fsp_name); + if ((fmode ~dirtype) (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) { + return NT_STATUS_NO_SUCH_FILE; + } } if (S_ISDIR(fsp-fsp_name-st.st_ex_mode)) { diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index f5b87c7..cc21b32 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6050,8 +6050,9 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, SMB_FILE_RENAME_INFORMATION (fnum %d) %s - %s\n, fsp-fnum, fsp_str_dbg(fsp), smb_fname_str_dbg(smb_fname_dst))); - status = rename_internals_fsp(conn, fsp, smb_fname_dst, 0, - overwrite); + status = rename_internals_fsp(conn, fsp, smb_fname_dst, + (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM), + overwrite); out: TALLOC_FREE(smb_fname_dst); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 19bbd0a s3/configure: fix GNU ld version detection with old gcc releases from c8ba5d4 tdb_expand: limit the expansion with huge records http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 19bbd0a4f0c39aaf6f0f3ecdcce7c52bb8264a5a Author: Björn Jacke b...@sernet.de Date: Fri Nov 26 15:14:14 2010 +0100 s3/configure: fix GNU ld version detection with old gcc releases needed as old gcc releases output everything to stderr, even stdout output from ld Fixes #7825 Autobuild-User: Björn Jacke b...@sernet.de Autobuild-Date: Fri Nov 26 20:15:24 CET 2010 on sn-devel-104 (cherry picked from commit 70a7da0e101910e3ceb08b86d4b840b219e24d7d) --- Summary of changes: source3/configure.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/configure.in b/source3/configure.in index b21e261..2c9fe1e 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -215,7 +215,7 @@ dnl Certain versions of GNU ld the default is not to have the dnl --allow-shlib-undefined flag defined. This causes a stackload of dnl warnings when building modules. if test $ac_cv_prog_gnu_ld = yes; then - ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2/dev/null | head -1` + ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 21 /dev/null | grep GNU ld` AC_MSG_CHECKING(GNU ld release date) changequote(,)dnl ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 9c75728 s3-net: make sure we dont crash when publishing a single printer. from 19bbd0a s3/configure: fix GNU ld version detection with old gcc releases http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 9c75728c62cccb8da606ece2d9df08b592e7c7c0 Author: Günther Deschner g...@samba.org Date: Fri Oct 1 06:08:12 2010 +0200 s3-net: make sure we dont crash when publishing a single printer. Guenther (cherry picked from commit 21576e3f8c32878910460bf9575c200ad93d682a) Part of a fix for bug #7993 (net rpc printer MIGRATE command fails). --- Summary of changes: source3/utils/net_rpc_printer.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index dfc150f..8b6d73e 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -1091,6 +1091,11 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd, hnd)) return false; + *info_p = talloc_zero(mem_ctx, union spoolss_PrinterInfo); + if (*info_p == NULL) { + return false; + } + if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, hnd, level, *info_p)) { rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, hnd, NULL); return false; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 7304370 talloc: splitout _talloc_free_children_internal() via e3ff6f5 talloc: fixed a use after free error in talloc_free_children() via d54493b talloc: use _talloc_free_internal() in talloc_free_children() via ac6bb22 talloc: test talloc_steal out of a talloc_pool via ade2fe7 talloc: add memset() calls to test_pool() via 75ce3de talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc() via 8e95d32 talloc: make really sure only optimize realloc if there's only one pool chunk via dc8b297 talloc: make use of _talloc_free_poolmem() in _talloc_realloc() via 4cf761b talloc: split the handling of FLAG_POOL/FLAG_POOLMEM in _talloc_free_internal from eb15457 Fix typos in LDAP schema files http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 7304370a2423230120a9ceebd1016966658f713f Author: Stefan Metzmacher me...@samba.org Date: Tue May 17 08:50:45 2011 +0200 talloc: splitout _talloc_free_children_internal() metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Tue May 17 10:49:13 CEST 2011 on sn-devel-104 (cherry picked from commit df2cb2f672569e5d113fe2e77fdc1ee16c8b646d) The last 9 patches address bug #8140 (talloc: valgrind false positives and other backports). commit e3ff6f5bbe09913b45ea1aef613c8790b25a978c Author: Stefan Metzmacher me...@samba.org Date: Fri Apr 8 12:30:46 2011 +0200 talloc: fixed a use after free error in talloc_free_children() This is similar to commit 6f51a1f45bf4de062cce7a562477e8140630a53d. metze (cherry picked from commit 38633c9f0b7f86673f08903999583ad5b62c3548) commit d54493b4b43cc0d299486e571d813f90a7b22059 Author: Stefan Metzmacher me...@samba.org Date: Fri Apr 8 12:27:05 2011 +0200 talloc: use _talloc_free_internal() in talloc_free_children() metze (cherry picked from commit f3b855d2ff9576715afe50d75678829c6bc0842d) commit ac6bb22a8c054e5949e07f563bf9fba46d22358d Author: Stefan Metzmacher me...@samba.org Date: Mon May 16 19:25:47 2011 +0200 talloc: test talloc_steal out of a talloc_pool metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Tue May 17 09:43:01 CEST 2011 on sn-devel-104 (cherry picked from commit 37b2130ed9612a7334888ecd2fee26b0b45ac271) commit ade2fe7e8fc299e01ba13a08c95598eefa5b99b5 Author: Stefan Metzmacher me...@samba.org Date: Tue May 17 08:20:13 2011 +0200 talloc: add memset() calls to test_pool() This way we the pool based valgrind code. metze (cherry picked from commit 16cc52cf70a9918843f9761baf483338c80bf1d0) commit 75ce3de1eb2e7042c7a4ffcb6f0f6aa2a41c19b5 Author: Stefan Metzmacher me...@samba.org Date: Tue May 17 08:19:04 2011 +0200 talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc() metze (cherry picked from commit c281f2fc1a359d0d3b91b94438f11bb7c88170b5) commit 8e95d3201adc546000ca29816c83aba6fab52b1a Author: Stefan Metzmacher me...@samba.org Date: Mon May 16 20:15:59 2011 +0200 talloc: make really sure only optimize realloc if there's only one pool chunk *talloc_pool_objectcount(pool_tc) == 2 doesn't mean the one of the objects is the pool itself! So we better check for == 1 and calculate the chunk count. metze (cherry picked from commit 7102105c8954627dc30a851327cf2642ac0783d5) commit dc8b2979168c6688c647cdc39d321eb54bd0aa5b Author: Stefan Metzmacher me...@samba.org Date: Mon May 16 20:23:13 2011 +0200 talloc: make use of _talloc_free_poolmem() in _talloc_realloc() This should follow the same logic... metze (cherry picked from commit 14b662ee4f278764b9dfd620851e908d29f29fc4) commit 4cf761bb5a030340625172a51212b11613efea02 Author: Stefan Metzmacher me...@samba.org Date: Mon May 16 19:06:07 2011 +0200 talloc: split the handling of FLAG_POOL/FLAG_POOLMEM in _talloc_free_internal The optimization of the object_count == 1 case should only happen for when we're not destroying the pool itself. And it should only happen if the pool itself is still valid. If the pool isn't valid (it has TALLOC_FLAG_FREE), object_count == 1 does not mean that the pool is the last object, which can happen if you use talloc_steal/move() on memory from the pool and then free the pool itself. Thanks to Volker for noticing this! metze (cherry picked from commit 2d514be1ed3b8245157a0a51186ec7f9db828202) --- Summary of changes: lib/talloc/talloc.c| 216 ++-- lib/talloc/testsuite.c | 86 +++ 2 files changed, 203 insertions(+), 99 deletions(-)
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via ba6f63ca s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np with 0700 via 6e89c23 ncalrpc: Force ncalrpc dir to be mode 755 in all users from 7304370 talloc: splitout _talloc_free_children_internal() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit ba6f63ca67fc9e0b2bfa54ccf2cf0b78c53db74b Author: Stefan Metzmacher me...@samba.org Date: Tue May 17 10:32:38 2011 +0200 s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np with 0700 metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Tue May 17 13:01:14 CEST 2011 on sn-devel-104 (cherry picked from commit cb227d6d1492247d8aff03807cac0b7266202a38) The last 2 patches address bug #8141 (wrong permissions on lp_ncalrpc_dir()). commit 6e89c230046f1b7300ba5f76dfbc81c57af69fe5 Author: Andrew Bartlett abart...@samba.org Date: Sun May 8 10:29:27 2011 +0200 ncalrpc: Force ncalrpc dir to be mode 755 in all users This allows this directory to be shared between Samba3 and Samba4 in a Franky-style setup easily. Andrew Bartlett (cherry picked from commit aae9353ecf56323b63da66aa84d8a0a4f219d94d) --- Summary of changes: source3/rpc_server/rpc_server.c | 15 +-- source4/smbd/service_named_pipe.c |7 +++ 2 files changed, 20 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 681898d..8ec55bb 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -263,6 +263,17 @@ bool setup_named_pipe_socket(const char *pipe_name, } state-fd = -1; + /* +* As lp_ncalrpc_dir() should have 0755, but +* lp_ncalrpc_dir()/np should have 0700, we need to +* create lp_ncalrpc_dir() first. +*/ + if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) { + DEBUG(0, (Failed to create pipe directory %s - %s\n, + lp_ncalrpc_dir(), strerror(errno))); + goto out; + } + np_dir = talloc_asprintf(state, %s/np, lp_ncalrpc_dir()); if (!np_dir) { DEBUG(0, (Out of memory\n)); @@ -889,13 +900,13 @@ bool setup_dcerpc_ncalrpc_socket(struct tevent_context *ev_ctx, return false; } - if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0700)) { + if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) { DEBUG(0, (Failed to create pipe directory %s - %s\n, lp_ncalrpc_dir(), strerror(errno))); goto out; } - state-fd = create_pipe_sock(lp_ncalrpc_dir(), name, 0700); + state-fd = create_pipe_sock(lp_ncalrpc_dir(), name, 0755); if (state-fd == -1) { DEBUG(0, (Failed to create pipe socket! [%s/%s]\n, lp_ncalrpc_dir(), name)); diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c index 086a037..a1e013d 100644 --- a/source4/smbd/service_named_pipe.c +++ b/source4/smbd/service_named_pipe.c @@ -200,6 +200,13 @@ NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx, goto fail; } + if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), geteuid(), 0755)) { + status = map_nt_error_from_unix(errno); + DEBUG(0,(__location__ : Failed to create ncalrpc pipe directory '%s' - %s\n, +lpcfg_ncalrpc_dir(lp_ctx), nt_errstr(status))); + goto fail; + } + dirname = talloc_asprintf(pipe_sock, %s/np, lpcfg_ncalrpc_dir(lp_ctx)); if (dirname == NULL) { goto fail; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 72e50d3 Fix Bug 8152 - smbd crash in release_ip() from ba6f63ca s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np with 0700 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 72e50d34eeac4cd72ec2f6b3609b5373f1f1ec15 Author: Christian Ambach a...@samba.org Date: Thu May 19 18:13:40 2011 +0200 Fix Bug 8152 - smbd crash in release_ip() release_ip() needs the private_data, but it was never saved away to feed it into release_ip() later Autobuild-User: Christian Ambach a...@samba.org Autobuild-Date: Thu May 19 21:21:14 CEST 2011 on sn-devel-104 (cherry picked from commit 642c6ba2b9c581bacfcb9a6cb4c5c95d446263ce) --- Summary of changes: source3/lib/ctdbd_conn.c |5 + source3/smbd/process.c |3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index b928ed9..1d01da6 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1361,6 +1361,11 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn, } conn-release_ip_handler = release_ip_handler; + /* +* store the IP address of the server socket for later +* comparison in release_ip() +*/ + conn-release_ip_priv = private_data; /* * We want to be told about IP releases diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 5d0acd7..ea4c36b 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2357,6 +2357,9 @@ static void release_ip(const char *ip, void *priv) p = addr + 7; } + DEBUG(10, (Got release IP message for %s, + our address is %s\n, ip, p)); + if ((strcmp(p, ip) == 0) || ((p != addr) strcmp(addr, ip) == 0)) { /* we can't afford to do a clean exit - that involves database writes, which would potentially mean we -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 8546896 Fix bug 8153 found when building on an IPv6-only system by Kai Blin. from 72e50d3 Fix Bug 8152 - smbd crash in release_ip() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 85468960ebdb3d813bd863e57f6dca6bab61bec2 Author: Jeremy Allison j...@samba.org Date: Thu May 19 12:32:15 2011 -0700 Fix bug 8153 found when building on an IPv6-only system by Kai Blin. When building on IPv6-only, doing: hints.ai_family = AF_INET; getaddrinfo(0.0.0.0, NULL, hints, ppres) fails as AF_INET is unavailable on an IPv6-only system. This causes us to fallback to our replacement getaddrinfo code which is IPv4-only. As we're only trying to detect a specific AIX bug here, broaden the tests to find that bug, and also test for working getaddrinfo in an IPv6-only safe way. --- Summary of changes: lib/replace/libreplace_network.m4 | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/libreplace_network.m4 b/lib/replace/libreplace_network.m4 index f9bca40..eadcc6b 100644 --- a/lib/replace/libreplace_network.m4 +++ b/lib/replace/libreplace_network.m4 @@ -240,12 +240,25 @@ if test x$libreplace_cv_HAVE_GETADDRINFO = xyes; then { struct addrinfo hints = {0,}; struct addrinfo *ppres; - const char hostname[] = 0.0.0.0; + const char hostname1[] = 0.0.0.0; + const char hostname2[] = 127.0.0.1; + const char hostname3[] = ::; hints.ai_socktype = SOCK_STREAM; - hints.ai_family = AF_INET; + hints.ai_family = AF_UNSPEC; hints.ai_flags = AI_NUMERICHOST|AI_PASSIVE|AI_ADDRCONFIG; - return getaddrinfo(hostname, NULL, hints, ppres) != 0 ? 1 : 0; + /* Test for broken flag combination on AIX. */ + if (getaddrinfo(hostname1, NULL, hints, ppres) == EAI_BADFLAGS) { + /* This fails on an IPv6-only box, but not with + the EAI_BADFLAGS error. */ + return 1; + } + if (getaddrinfo(hostname2, NULL, hints, ppres) == 0) { + /* IPv4 lookup works - good enough. */ + return 0; + } + /* Uh-oh, no IPv4. Are we IPv6-only ? */ + return getaddrinfo(hostname3, NULL, hints, ppres) != 0 ? 1 : 0; }], libreplace_cv_HAVE_GETADDRINFO=yes, libreplace_cv_HAVE_GETADDRINFO=no) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via aba30a8 s3-epmapper: Fixed endpoint registration. from 8546896 Fix bug 8153 found when building on an IPv6-only system by Kai Blin. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit aba30a8d502f0a425672205734bfb91d4286fc14 Author: Andreas Schneider a...@samba.org Date: Wed May 18 12:10:42 2011 +0200 s3-epmapper: Fixed endpoint registration. Autobuild-User: Andreas Schneider a...@cryptomilk.org Autobuild-Date: Fri May 20 12:03:18 CEST 2011 on sn-devel-104 (cherry picked from commit 7ab9e26b601e4e51736ce6eace46e6588fa1148f) Fix bug #8155 (Registering only named pipes on EPM for a service doesn't work). --- Summary of changes: source3/rpc_server/rpc_ep_setup.c |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/rpc_ep_setup.c b/source3/rpc_server/rpc_ep_setup.c index d00b351..2d4c7e9 100644 --- a/source3/rpc_server/rpc_ep_setup.c +++ b/source3/rpc_server/rpc_ep_setup.c @@ -133,7 +133,7 @@ static NTSTATUS rpc_ep_setup_try_register(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct messaging_context *msg_ctx, const struct ndr_interface_table *iface, - const char *name, + const char *ncalrpc, uint16_t port, struct dcerpc_binding_handle **pbh); @@ -256,7 +256,7 @@ static NTSTATUS rpc_ep_setup_try_register(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct messaging_context *msg_ctx, const struct ndr_interface_table *iface, - const char *name, + const char *ncalrpc, uint16_t port, struct dcerpc_binding_handle **pbh) { @@ -266,7 +266,7 @@ static NTSTATUS rpc_ep_setup_try_register(TALLOC_CTX *mem_ctx, status = dcerpc_binding_vector_create(mem_ctx, iface, port, - name, + ncalrpc, v); if (!NT_STATUS_IS_OK(status)) { return status; @@ -276,7 +276,7 @@ static NTSTATUS rpc_ep_setup_try_register(TALLOC_CTX *mem_ctx, iface, v, iface-syntax_id.uuid, - name, + iface-name, pbh); talloc_free(v); if (!NT_STATUS_IS_OK(status)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 9231770 Make protocol version 2 the default protocol, and only run on version 1 if V1 is explcitly given as a module option. from aba30a8 s3-epmapper: Fixed endpoint registration. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 9231770df9189701da7020c77ebd672942f25773 Author: Holger Hetterich hhet...@novell.com Date: Wed May 18 15:24:23 2011 +0200 Make protocol version 2 the default protocol, and only run on version 1 if V1 is explcitly given as a module option. I haven't received a single line of feedback on protocol v1 for at least 1 1/2 years, whereas protocol v2 has an active userbase and more people developing around it. This patch includes a manpage update, describing the new version handling, as well as documenting the recent changes making the module transfer the IP address of the client machine as submitted with 464c69609aa7e582f484c1d357b7c6d3eb2bcbe3. Bug #8148 (Default to protocol version 2 for SMB Traffic Analyzer in Samba 3.6.0). --- Summary of changes: docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml | 10 ++ source3/modules/vfs_smb_traffic_analyzer.c | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml index 882ee6a..9450703 100644 --- a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml +++ b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml @@ -45,6 +45,8 @@ protocol, supporting only a small list of VFS operations, and had several drawbacks. The protocol version 2 is a try to solve the problems version 1 had while at the same time adding new features. + With the release of Samba 3.6.0, the module will run protocol version 2 + by default. /para /refsect1 @@ -77,6 +79,7 @@ listitemparacommandSHARE/command - the name of the share on which the VFS operation occured/para/listitem listitemparacommandFILENAME/command - the name of the file that was used by the VFS operation/para/listitem listitemparacommandTIMESTAMP/command - a timestamp, formatted as -mm-dd hh-mm-ss.ms indicating when the VFS operation occured/para/listitem + listitemparacommandIP/command - The IP Address (v4 or v6) of the client machine that initiated the VFS operation./para/listitem /itemizedlist /para @@ -224,9 +227,9 @@ varlistentry termsmb_traffic_analyzer:protocol_version = STRING/term listitem - paraIf STRING matches to V1 or is not given at all, the module - will use version 1 of the protocol. If STRING matches to V2 - the module will use version 2 of the protocol. + paraIf STRING matches to V1, the module will use version 1 of the + protocol. If STRING is not given, the module will use version 2 of the + protocol, which is the default. /para /listitem /varlistentry @@ -241,7 +244,6 @@ smbconfsection name=[example_share]/ smbconfoption name=path/data/example/smbconfoption smbconfoption name=vfs_objectssmb_traffic_analyzer/smbconfoption - smbconfoption name=smb_traffic_analyzer:protocol_versionV2/smbconfoption smbconfoption name=smb_traffic_analyzer:hostexamplehost/smbconfoption smbconfoption name=smb_traffic_analyzer:port3491/smbconfoption /programlisting diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c index e8aa385..e441f9c 100644 --- a/source3/modules/vfs_smb_traffic_analyzer.c +++ b/source3/modules/vfs_smb_traffic_analyzer.c @@ -452,7 +452,7 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle, protocol_version, NULL ); - if ( protocol_version == NULL || strcmp( protocol_version,V1) == 0) { + if (protocol_version != NULL strcmp(protocol_version,V1) == 0) { struct rw_data *s_data = (struct rw_data *) data; @@ -489,7 +489,10 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle, return; } - } else if ( strcmp( protocol_version, V2) == 0) { + } else { + /** +* Protocol 2 is used by default. +*/ switch( vfs_operation ) { case vfs_id_open: ; @@ -557,10 +560,6 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle, return; } - } else { - DEBUG(1,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9f14d10 Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly. from 95a55e2 Fix bug 8133 - strange behavior for the file (whose filename first character is period ) in SMB2 case. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9f14d10366e291ef635c80f55c095b5c34b6dd73 Author: Jeremy Allison j...@samba.org Date: Fri May 20 12:27:02 2011 -0700 Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly. The parsing code made some strange assumptions about what is a printer name, and what is a comment. Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Fri May 20 22:52:23 CEST 2011 on sn-devel-104 --- Summary of changes: source3/printing/print_standard.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/print_standard.c b/source3/printing/print_standard.c index 6a86d84..c4f9c5b 100644 --- a/source3/printing/print_standard.c +++ b/source3/printing/print_standard.c @@ -93,6 +93,10 @@ bool std_pcap_cache_reload(const char *pcap_name) has_punctuation = (strchr_m(p, ' ') || strchr_m(p, '\t') || + strchr_m(p, '') || + strchr_m(p, '\'') || + strchr_m(p, ';') || + strchr_m(p, ',') || strchr_m(p, '(') || strchr_m(p, ')')); @@ -101,11 +105,7 @@ bool std_pcap_cache_reload(const char *pcap_name) continue; } - if (strlen(p) = MAXPRINTERLEN - strlen(p) strlen(name) !has_punctuation) { - if (!*comment) { - strlcpy(comment, name, sizeof(comment)); - } + if (strlen(p) = MAXPRINTERLEN *name == '\0' !has_punctuation) { strlcpy(name, p, sizeof(name)); continue; } @@ -117,9 +117,6 @@ bool std_pcap_cache_reload(const char *pcap_name) } } - comment[60] = 0; - name[MAXPRINTERLEN] = 0; - if (*name !pcap_cache_add(name, comment, NULL)) { x_fclose(pcap_file); return false; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4360c5b Patch for bug #8156 - net ads join fails to use the user's kerberos ticket. via e0b2f6b The workgroup parameter is not used at all in cli_session_setup_kerberos(). Remove it. from 9f14d10 Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4360c5bf276aa958864254ee22b3a3d4a4560381 Author: Jeremy Allison j...@samba.org Date: Fri May 20 14:43:50 2011 -0700 Patch for bug #8156 - net ads join fails to use the user's kerberos ticket. If kerberos_get_realm_from_hostname() or kerberos_get_default_realm_from_ccache() fails due to a misconfigured krb5.conf, try the realm = from smb.conf as a fallcback before going back to NTLMSSP (which we'll do anyway). Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Sat May 21 00:58:09 CEST 2011 on sn-devel-104 commit e0b2f6bd267e19986d31275ff3bf88600eaaeaf3 Author: Jeremy Allison j...@samba.org Date: Fri May 20 14:34:18 2011 -0700 The workgroup parameter is not used at all in cli_session_setup_kerberos(). Remove it. --- Summary of changes: source3/libsmb/cliconnect.c | 48 +++--- 1 files changed, 31 insertions(+), 17 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 374dd97..69d5ce6 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1412,7 +1412,7 @@ static void cli_session_setup_kerberos_done(struct tevent_req *subreq); static struct tevent_req *cli_session_setup_kerberos_send( TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, - const char *principal, const char *workgroup) + const char *principal) { struct tevent_req *req, *subreq; struct cli_session_setup_kerberos_state *state; @@ -1500,8 +1500,7 @@ static ADS_STATUS cli_session_setup_kerberos_recv(struct tevent_req *req) } static ADS_STATUS cli_session_setup_kerberos(struct cli_state *cli, -const char *principal, -const char *workgroup) +const char *principal) { struct tevent_context *ev; struct tevent_req *req; @@ -1514,8 +1513,7 @@ static ADS_STATUS cli_session_setup_kerberos(struct cli_state *cli, if (ev == NULL) { goto fail; } - req = cli_session_setup_kerberos_send(ev, ev, cli, principal, - workgroup); + req = cli_session_setup_kerberos_send(ev, ev, cli, principal); if (req == NULL) { goto fail; } @@ -1873,6 +1871,9 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, host = strchr_m(cli-desthost, '.'); if (dest_realm) { realm = SMB_STRDUP(dest_realm); + if (!realm) { + return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); + } strupper_m(realm); } else { if (host) { @@ -1884,25 +1885,38 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, } } - if (realm *realm) { - principal = talloc_asprintf(talloc_tos(), - cifs/%s@%s, - cli-desthost, - realm); - if (!principal) { - SAFE_FREE(realm); + if (realm == NULL || *realm == '\0') { + realm = SMB_STRDUP(lp_realm()); + if (!realm) { return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); } - DEBUG(3,(cli_session_setup_spnego: guessed - server principal=%s\n, - principal ? principal : null)); + strupper_m(realm); + DEBUG(3,(cli_session_setup_spnego: cannot + get realm from dest_realm %s, + desthost %s. Using default + smb.conf realm %s\n, +