Re: [Samba] Failing to join NT 4.0 Server to a Samba 3.4.0 Domain
Am 16.03.2010 17:51, schrieb Gaiseric Vandal: On 03/16/2010 10:09 AM, Jochen Eggemann wrote: HI, we had a server crash and luckily no backup. So our samba domain is gone, so I had to set up a new server with a new domain. Except for one NT 4.0 Server all XP clients where able to join this new domain. When trying to put NT4 into the domain I get following error: make_connection: refusing to connect with no session setup. What changes in samba could be the reason for this message? This NT Server had no problem joining the former domain. Jochen What version of samba was the previous DC running?I would run testparm -v and see which versions of NTLM are enabled. I am pretty sure you need ntlm auth = Yes. Also, NT4 might not support some of the signing options. By default server signing = No is set - at least on my machines. However I don't have an NT4 server so I can't say for sure if this helps. Presumably you have at least SP4 installed on your NT4 machine? I would also guess that Samba 3.4 was not heavily tested against with NT4 clients. I believe it was samba 2.x.x, but I'm not sure since I had nothing to do with it before and nobody else remembers. My settings: ntml auth = yes server signing = no NT4 has SP6a installed Any other ideas? Jochen -- IT-Management Nordwestdeutsche Forstliche Versuchsanstalt Grätzelstr. 2 37079 Göttingen Tel: 0551 69 40 11 64 Fax: 0551 69 40 11 60 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba issues with Solaris 10
Hi, try 'smbclient -L //netbios name (-U uid) (on the unix machine) to see if there are any shares on the samba server... cheers christoph On Tue, 16 Mar 2010, Dancy, Reginald wrote: Hello, I am configuring Samba for the first time and I have configured it on a Solaris 10 server. I believe I have everything setup correctly. The smbd daemon is running and I performed a test with the smbclient. The problem I'm now having is from the windows client. From the Windows client I map a drive, I log in with the user account and passwd, when I click to connect, I don't get an indication that I have connected to the share or not. I haven't received an error that it didn't work but I haven't received access to the Samba share either. Any ideas? Thanks! Reg This message and any attachments are confidential. If you are not the intended recipient, please notify the sender immediately and destroy this email. Any unauthorized use or dissemination is prohibited. All email sent to or from our system is subject to review and retention. Cowen and Company, LLC -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba best regards ~christoph -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY|Phone: 040-8998-2317* * - IT - | Fax: 040-8998-4060* \* 22603 Hamburg | http://www.desy.de */ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba Version required for Win7 Clients
Hi, On Tue, Mar 16, 2010 at 06:28:38PM +0100, csirt wrote: Now i am confused about the different tribes 3.3x, 3.4x. 3.5x of samba. I could not find something about it on samba.org. Which one i should go for ? What are the major-differences between the three? please see http://wiki.samba.org/index.php/Samba3_Release_Planning for more information on the current Samba release branches. Major changes in can be found in the release notes of the first major release of the branch, e.g. http://samba.org/samba/history/samba-3.5.0.html. Usually, using the latest stable release (now 3.5.1) is recommended. Hope that helps. Cheers, Karolin -- Samba http://www.samba.org SerNet http://www.sernet.de sambaXP http://www.sambaxp.org pgpbpnfFNFqzl.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba Version required for Win7 Clients
Karolin, thank you very much! That's exactly the information i have been looking for. cheers 2010/3/17 Karolin Seeger ksee...@samba.org Hi, On Tue, Mar 16, 2010 at 06:28:38PM +0100, csirt wrote: Now i am confused about the different tribes 3.3x, 3.4x. 3.5x of samba. I could not find something about it on samba.org. Which one i should go for ? What are the major-differences between the three? please see http://wiki.samba.org/index.php/Samba3_Release_Planning for more information on the current Samba release branches. Major changes in can be found in the release notes of the first major release of the branch, e.g. http://samba.org/samba/history/samba-3.5.0.html. Usually, using the latest stable release (now 3.5.1) is recommended. Hope that helps. 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
[Samba] 3.5.1 64 bit windows printing is working a bit
Hi, although I don't expect any answers (like most of the times) , here is my experience so far: I run a samba printserver for +3.000 hosts and 600 printers with a correct setup successfully. So be sure, everything is plugged in, I tried to turn it off and on again, I RTFM'ed and so on. Here is my most successfull attempt to get the printservice going on 3.5.1 and windows 7 46 bit in an AD 2008R3 environment: I installed the driver (Konica Minolta bizhub 250) using the print management console on a windows 7 client host - success: the driver-files are visible on the samba machine in the x64 directory. The printerdriver does not show up in the advanced tab of the printer properties. [printserver] # rpcclient -Uuid -c 'setdriver itmfp1 KONICA MINOLTA 350/250/200 VPS' printserver - Successfully set itmfp1 to driver KONICA MINOLTA 350/250/200 VPS. Works, driver is visible now in tab, testpage prints out OK :) Reopening the properties tab gives error message: C:\\mmc.exe Function adress 0xff38117a caused a protection fault (exception code 0xc05) some or all properties pages may not be displayed In the samba logfile I see one error, don't now if it is realted though: [2010/03/17 10:57:22.771269, 3] smbd/error.c:76(error_packet_set) error packet at smbd/trans2.c(4130) cmd=50 (SMBtrans2) NT_STATUS_INVALID_LEVEL [2010/03/17 10:57:22.771592, 5] lib/util.c:617(show_msg) [2010/03/17 10:57:22.771727, 5] lib/util.c:620(show_msg) size=35 smb_com=0x32 smb_rcls=72 smb_reh=1 smb_err=49152 smb_flg=136 smb_flg2=51203 smb_tid=1 smb_pid=1044 smb_uid=101 smb_mid=74 smt_wct=0 smb_bcc=0 [2010/03/17 10:57:22.773226, 10] lib/util_sock.c:726(read_smb_length_return_keepalive) got smb length of 224 All this is done on a 'windows 7 only' samba machine, I had no luck to install the driver in an environment with x86 drivers already installed, there was no way to get 'rpcclient' to associate the printqueue with teh driver. So as far as I see it windows 64 bit printing is working in principle but not in a way someone could use it as a service. If there is any interest in debug logging output or experiences with other drivers and/or configurations don't hesitate to send me e-mail I am mor then willing to be of any use to drive this further, don' expect any reactions from the list though - surprise me ;) cheers ~christoph -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY|Phone: 040-8998-2317* * - IT - | Fax: 040-8998-4060* \* 22603 Hamburg | http://www.desy.de */ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba4 join existing domain
Hello, I get this error message when i try to join my Samba4 server to an existing domain: ./net vampire domain.local -Uadmin --realm=domain.local Password for [WORKGROUP\admin]: Become DC [(null)] of Domain[DOMAIN]/[domain.local] Promotion Partner is Server[dc1.domain.local] from Site[Default-First-Site-Name] Options:crossRef behavior_version[2] schema object_version[30] domain behavior_version[2] domain w2k3_update_revision[8] Failed to bind uuid uuid-number - NT_STATUS_INVALID_PARAMETER libnet_BecomeDC() failed - NT_STATUS_INVALID_PARAMETER Vampire of domain failed: NT_STATUS_INVALID_PARAMETER return code = -1 The primary DC is a Windows Server 2003 and it also acts as DNS server. What could be the cause of this? Has it something to do with me using Windows as DNS server? Regards Andreas -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Windows 7 Issues
I've already made this changes, but i'm still having the same problems to login windows7 in a samba domain. Something else?? 2010/3/17 Daniel Müller muel...@tropenklinik.de Hello, First of all Windows7 considers your Domain-Server is your DNS-Server. In Windows7 you have to do a registry hack to join. I did it this way with a samba 3.2.5 suse 10.2: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Para meters] DomainCompatibilityMode=dword:0001 DNSNameResolutionRequired=dword: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters] Update=no DisablePasswordChange=dword: MaximumPasswordAge=dword:001e RequireSignOrSeal=dword:0001 RequireStrongKey=dword:0001 SealSecureChannel=dword:0001 SignSecureChannel=dword:0001 Then be aware of time since between samba and your Win7 client. It must be the same time. Daniel --- 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 Edson Tadeu Almeida da Silveira Gesendet: Mittwoch, 17. März 2010 00:54 An: samba@lists.samba.org Betreff: [Samba] Windows 7 Issues i have been trying to join my windows 7 machines in a samba domain, but it aways fails. I can join a windows 7 machine in a Samba domain. Then i have an error: _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ But the machine joined. Then, when i will log in with an user, i cant do it, and the same error is showed in the log file. _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ I don't know what to do to this work fine... thanks! -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Microsoft Office File Converter Problem
Hi, I have a samba server 3.4.0 running on a ubuntu karmic and there is a problem with the File Converter of Microsoft Office. When someone opens a .docx or .xlsx file with Office 2003 + File Converter, does some changes and tries to save the changes an error occurs: (something like) The file is locked for editing by another user. Afterwards the file is deleted. Here is a part of the smb.conf: [global] workgroup = work unix extensions = no server string = %h server (Samba, Ubuntu) # wins support = no ; wins server = w.x.y.z dns proxy = no ; interfaces = 127.0.0.0/8 eth0 interfaces = eth0 ; bind interfaces only = yes security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n pam password change = yes map to guest = bad user [share1] comment = share1 writeable = yes path = /srv/files/share1 create mask = 770 directory mask = 770 valid users = +share1 browseable = yes guest ok = no Any ideas for solving the problem? Thanks and with kind regards, markus PS: Same Problem on samba 3.0.14/ dabian sarge with a different config. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] profile terror after passdb loss
Hi, I'm running samba 3.4.0 as PDC with a bunch of Windows boxes (XP, Vista, 7) on the domain. Unfortunately, I lost my passdb.tdb and secrets.tdb files and had to create the domain again on a new setup. Consequently, all domain computers had to be rejoined and all users had to re-enter their passwords. This must have caused major confusion on the clients / controller (I don't know which one) when trying to load the user profiles created under the old domain (when they login to the domain). Windows 7 complains about Group Policies that deny access. Windows XP just quietly loads a fresh profile and doesn't allow any changes to it. I found out that deleting the profile AND recreating the user in the samba database at the same time solves the problem but that's not acceptable. I tried deleting the user profile on a Win7 machine with the result that it logs in with a temp profile, which isn't saved back to the server. Even deleting the profile on the PDC AND the client at the same time has the same result. For that case the event log on that computer contains several messages but none of them seem very helpful to me: Event Viewer / Windows Logs: - Application / Error: * Windows has backed up this user profile. Windows will automatically try to use the backup profile the next time this user logs on. * Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off. - Security / Audit Success: * A logon was attempted using explicit credentials. * An account was successfully logged on. - System / Information: * The Group Policy settings for the user were processed successfully. New settings from 1 Group Policy objects were detected and applied. Strangely, after logging in/out with the TEMP profile, a profile.V2 directory is created on the PDC if it didn't already exist. Logging in after this was created still results in a temp profile. Now, before I delete all user profiles, and completely setup everything from scratch I thought I should ask if there's a less painful way of getting everything back to work. Suggestions? Thanks, Tom -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Windows 7 Issues
On 03/16/2010 07:53 PM, Edson Tadeu Almeida da Silveira wrote: i have been trying to join my windows 7 machines in a samba domain, but it aways fails. I can join a windows 7 machine in a Samba domain. Then i have an error: _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ But the machine joined. Then, when i will log in with an user, i cant do it, and the same error is showed in the log file. _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ I don't know what to do to this work fine... thanks! what version of samba? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Windows 7 Issues
I am pretty sure you want Samba 3.3.x or higher. On 03/17/2010 09:51 AM, Edson Tadeu Almeida da Silveira wrote: I'm using Samba Version 3.2.3 2010/3/17 Gaiseric Vandal gaiseric.van...@gmail.com mailto:gaiseric.van...@gmail.com On 03/16/2010 07:53 PM, Edson Tadeu Almeida da Silveira wrote: i have been trying to join my windows 7 machines in a samba domain, but it aways fails. I can join a windows 7 machine in a Samba domain. Then i have an error: _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ But the machine joined. Then, when i will log in with an user, i cant do it, and the same error is showed in the log file. _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ I don't know what to do to this work fine... thanks! what version of samba? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba issues with Solaris 10
Which Windows client version? Solaris 10 has samba 3.0.x as the default version which won't work with Windows 7 (I think it works with Vista with registry tweeks.) Is the nmbd daemon also running? What does net use should from the command line of the windows machine? You could also try using the net use ... command to map the drive from the command line on Windows- it may be more obvious if it fails. Did the windows machine join the samba domain or is it still in workgroup mode? When in domain mode you should be able to logon to the PC but then not have to provide the info again to access shares on the server (assuming the share and file perms are setup correctly.) On 03/17/2010 03:57 AM, christoph.be...@desy.de wrote: Hi, try 'smbclient -L //netbios name (-U uid) (on the unix machine) to see if there are any shares on the samba server... cheers christoph On Tue, 16 Mar 2010, Dancy, Reginald wrote: Hello, I am configuring Samba for the first time and I have configured it on a Solaris 10 server. I believe I have everything setup correctly. The smbd daemon is running and I performed a test with the smbclient. The problem I'm now having is from the windows client. From the Windows client I map a drive, I log in with the user account and passwd, when I click to connect, I don't get an indication that I have connected to the share or not. I haven't received an error that it didn't work but I haven't received access to the Samba share either. Any ideas? Thanks! Reg This message and any attachments are confidential. If you are not the intended recipient, please notify the sender immediately and destroy this email. Any unauthorized use or dissemination is prohibited. All email sent to or from our system is subject to review and retention. Cowen and Company, LLC -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba best regards ~christoph -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Failing to join NT 4.0 Server to a Samba 3.4.0 Domain
On 03/17/2010 04:04 AM, Jochen Eggemann wrote: Am 16.03.2010 17:51, schrieb Gaiseric Vandal: On 03/16/2010 10:09 AM, Jochen Eggemann wrote: HI, we had a server crash and luckily no backup. So our samba domain is gone, so I had to set up a new server with a new domain. Except for one NT 4.0 Server all XP clients where able to join this new domain. When trying to put NT4 into the domain I get following error: make_connection: refusing to connect with no session setup. What changes in samba could be the reason for this message? This NT Server had no problem joining the former domain. Jochen What version of samba was the previous DC running?I would run testparm -v and see which versions of NTLM are enabled. I am pretty sure you need ntlm auth = Yes. Also, NT4 might not support some of the signing options. By default server signing = No is set - at least on my machines. However I don't have an NT4 server so I can't say for sure if this helps. Presumably you have at least SP4 installed on your NT4 machine? I would also guess that Samba 3.4 was not heavily tested against with NT4 clients. I believe it was samba 2.x.x, but I'm not sure since I had nothing to do with it before and nobody else remembers. My settings: ntml auth = yes server signing = no NT4 has SP6a installed Any other ideas? Jochen I would say good bye to the NT server unless you have some apps that won't work on Windows 200x or XP. Or possibly move to Samba 3.0.x line (which you then just cause problems for your self if you want to add Win 7 machines.) I did have NT4sp6a working with Samba 3.0.x. Replacing the NT machine may be a management/funding challenge- but I would point out to whomever needs convincing that Microsoft stopped providing security patches for it a long time ago and that from a corporate liability perspective it should be replaced. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Permissions problem with Windows Vista / 7 clients, Debian Samba 3.4.7 server
On Mon, Mar 15, 2010 at 3:24 PM, Josh Kelley josh...@gmail.com wrote: I'm having a very strange permissions problem with Samba 3.4.7 (installed via backports.org) running on Debian Lenny: If a Windows 7 or Windows Vista client tries to use Windows Explorer to access a user's home directory with permissions 0700, the client gets a permission denied error. If the directory is made world readable, it works. (For one user, group readable also works. For another user, it does not.) Accessing the same directory from the command prompt (dir \\server\username) instead of from Windows Explorer works. Accessing the same directory from Windows Explorer in Windows XP works. This problem started when we upgraded from Samba 3.2.5 to Samba 3.4.7. With Samba 3.2.5, our Vista users were fine, but Windows 7 was unable to connect (login failed, apparently due to the NTLMv2 / 128-bit encryption limitations that I read about online). I managed to fix this problem. I had been using a username map script since Samba 3.0.24 to change DOMAIN\username to username so that users wouldn't have to SSH in to the (Winbind plus) Samba system as DOMAIN\username. Apparently, with Samba 3.4.7, this kind of username map is no longer necessary, and it was keeping Samba from treating users as domain users and properly resolving their SIDs. The Samba logfile does say that this is happening (with references to the Unix User domain and use of a S-1-22-1-... SID), but I had not looked at that part of the logfile. I really don't understand why username map is acting differently now, but since disabling it seems to work, I'm happy. -- Josh Kelley -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] 3.5.1 64 bit windows printing is working a bit
On Wed, Mar 17, 2010 at 11:08:58AM +0100, christoph.be...@desy.de wrote: Hi, although I don't expect any answers (like most of the times) , here is my experience so far: I run a samba printserver for +3.000 hosts and 600 printers with a correct setup successfully. So be sure, everything is plugged in, I tried to turn it off and on again, I RTFM'ed and so on. Here is my most successfull attempt to get the printservice going on 3.5.1 and windows 7 46 bit in an AD 2008R3 environment: I installed the driver (Konica Minolta bizhub 250) using the print management console on a windows 7 client host - success: the driver-files are visible on the samba machine in the x64 directory. The printerdriver does not show up in the advanced tab of the printer properties. [printserver] # rpcclient -Uuid -c 'setdriver itmfp1 KONICA MINOLTA 350/250/200 VPS' printserver - Successfully set itmfp1 to driver KONICA MINOLTA 350/250/200 VPS. Works, driver is visible now in tab, testpage prints out OK :) Reopening the properties tab gives error message: C:\\mmc.exe Function adress 0xff38117a caused a protection fault (exception code 0xc05) some or all properties pages may not be displayed In the samba logfile I see one error, don't now if it is realted though: [2010/03/17 10:57:22.771269, 3] smbd/error.c:76(error_packet_set) error packet at smbd/trans2.c(4130) cmd=50 (SMBtrans2) NT_STATUS_INVALID_LEVEL [2010/03/17 10:57:22.771592, 5] lib/util.c:617(show_msg) [2010/03/17 10:57:22.771727, 5] lib/util.c:620(show_msg) size=35 smb_com=0x32 smb_rcls=72 smb_reh=1 smb_err=49152 smb_flg=136 smb_flg2=51203 smb_tid=1 smb_pid=1044 smb_uid=101 smb_mid=74 smt_wct=0 smb_bcc=0 [2010/03/17 10:57:22.773226, 10] lib/util_sock.c:726(read_smb_length_return_keepalive) got smb length of 224 All this is done on a 'windows 7 only' samba machine, I had no luck to install the driver in an environment with x86 drivers already installed, there was no way to get 'rpcclient' to associate the printqueue with teh driver. So as far as I see it windows 64 bit printing is working in principle but not in a way someone could use it as a service. If there is any interest in debug logging output or experiences with other drivers and/or configurations don't hesitate to send me e-mail I am mor then willing to be of any use to drive this further, don' expect any reactions from the list though - surprise me ;) Guenther Deschner g...@samba.org is busily working these issues. For specific problems like this, please log a bug so we can make sure it gets fixed. Thanks, Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Windows 7 Issues
Hi! Now i could join in a samba domain with windows7. I did the follow changes in my Win7: 0 - I had to upgrade my samba server to version 3.4.7 1- I did this changes in the registry [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters] DomainCompatibilityMode=dword:0001 DNSNameResolutionRequired=dword: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters] Update=no DisablePasswordChange=dword: MaximumPasswordAge=dword:001e RequireSignOrSeal=dword:0001 RequireStrongKey=dword:0001 SealSecureChannel=dword:0001 SignSecureChannel=dword:0001 2 - I changed this network adapter configurations: 2.a - Wins server should be the samba server address. 2.b - Primary DNS server should be the samba server address. 3.c - Configure the primary DNS Suffix with the same samba server address. This worked for me. thanks all. 2010/3/17 Edson Tadeu Almeida da Silveira edson.ta...@gmail.com i've already tried with 3.4.7, and i had the same problem. :-/ 2010/3/17 Gaiseric Vandal gaiseric.van...@gmail.com I am pretty sure you want Samba 3.3.x or higher. On 03/17/2010 09:51 AM, Edson Tadeu Almeida da Silveira wrote: I'm using Samba Version 3.2.3 2010/3/17 Gaiseric Vandal gaiseric.van...@gmail.com On 03/16/2010 07:53 PM, Edson Tadeu Almeida da Silveira wrote: i have been trying to join my windows 7 machines in a samba domain, but it aways fails. I can join a windows 7 machine in a Samba domain. Then i have an error: _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ But the machine joined. Then, when i will log in with an user, i cant do it, and the same error is showed in the log file. _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client USER machine account USER$ I don't know what to do to this work fine... thanks! what version of samba? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- --- Edson Tadeu Almeida Silveira http://sites.google.com/site/edsontadeu/ --- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Authentication mystery
List, things are strange here. We have a PDC (Windows based) that is out from our office and in our local network we have machines (windows xp, some with SP2 and others with SP3) that log in the domain and others don´t. We´ve been using samba just to share some directories in our internal development server. The mystery is that some users have access while others don´t, although they are all created using the same commands/configuration... useradd -d /home/someuser -g users -m -s /bin/bash someuser smbpasswd -L -a someuser We can check that they are created in both linux and samba: home directory is there, ssh logins are possible but mapping the shares...no way. Issuing a smbclient command like... smbclient -L fpwdev04 -U someuser ...shows the expected output (listing of shares defined). By how far we investigated, things do not seem much logical, since we have Windows XP SP2 in which things work and others not. The same for machines with SP3. This also applies to machines logging or not in the domain. Actually, we have 4 servers, all running their own samba, with a very similar configuration. The main differences are attributes like server string, force user, guest ok and the shares themselves. Let´s call it our main samba has its force user set to samba and guest ok to no. The others, have force user to %U and guest ok, some to yes and others to no. Since in the global section they are all set to... local master = no prefered master = no domain master = no domain logons = no wins proxy = no dns proxy = no os level = 0 ...and we specify the server when we map a share, I do not believe they are competing with each other and causing this behavior. Have you ever experienced something like that? Below I paste our smb.conf. If you can help us in anyway, it would be very appreciated! Thanks you all in advance. [global] workgroup = workgroup server string = Development 4 Server local master = no prefered master = no domain master = no domain logons = no wins proxy = no dns proxy = no os level = 0 smb ports = 139 security = user passdb backend = smbpasswd:/etc/samba/smbpasswd encrypt passwords = yes invalid users = root bin daemon adm lp sync shutdown halt mail news uucp operator games gopher ftp nobody rpm dbus nscd vcsa pcap rpc mailnull smmsp avahi sshd rpcuser nfsnobody haldaemon distcache apache postgres mysql webalizer squid ntp xfs gdm sabayon ais pegasus piranha luci ricci cvs oracle10 ldap ra ca_admin gpo avahi-autoipd csvn trainee vpndial oraclebpa intranet force user = samba force group = users guest ok = no create mode = 0770 directory mode = 0770 force create mode = 0770 force directory mode = 0770 wins server = 172.26.129.25 load printers = no guest account = nobody printcap name = /etc/printcap username map = /etc/samba/smbusers [VM] comment = Virtual Machines Files path = /data1/home/samba/repository/VM writeable = yes browseable = yes valid users = @users vfs object = vscan-clamav vscan-clamav: config-file = /etc/samba/vscan-clamav.conf [Projects] comment = Projects path = /data1/home/samba/repository/Projects writeable = yes browseable = yes valid users = @users vfs object = vscan-clamav vscan-clamav: config-file = /etc/samba/vscan-clamav.conf -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] domain member, how to change passwords?
Hello list, I'll give a detailed explanation below. The quick question is: How can I configure a workstation (running Linux) so it can change user password on the PDC? Details: At work we are migrating from Windows to Linux and we decided to have user's /home exported with NFS4 (no kerberos yet). User database is in LDAP. Some users have shared directories. Since NFS doesn't allow to force groups permission (or I've been unable to find a way) we export shared resources via Samba. The problem is, we also have a 180-day password policy. We have no problems with LDAP, but we're unable to change the samba password on the PDC from the workstations. The test workstation is configured like this: smb.conf: [global] security = domain workgroup = OURDOMAIN password server = * local master = no (note: I tried password server = PDCNETBIOSNAME, but I get the same results) /etc/pam.d/common-password: password [success=2 default=ignore] pam_unix.so obscure sha512 password [success=1 user_unknown=ignore default=die] pam_ldap.so use_authtok try_first_pass password sufficient pam_winbind.so use_authtok nullok try_first_pass password requisite pam_deny.so password required pam_permit.so password optional pam_gnome_keyring.so (note: the file was configured by ubuntu's pam-auth-update; I added the pam_winbind.so line) Now, when I try passwd I get: $ LC_ALL=C passwd Enter login(LDAP) password: passwd: Authentication token manipulation error passwd: password unchanged When I use smbpasswd: $ LC_ALL=C smbpasswd Old SMB password: New SMB password: Retype new SMB password: Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE But if I add -r: $ LC_ALL=C smbpasswd -r PDCNETBIOSNAME Old SMB password: New SMB password: Retype new SMB password: Password changed for user nbensa Note that changing passwords from a Windows workstation works. Yes, the Linux workstations were joined to the domain (net rpc join...) I don't know if this is the better way to do this. Maybe there's a better way using only LDAP. We're not considering deploying kerberos for now but I think it will be a much better solution if we could integrate our kerberos database with LDAP. Many thanks in advance for any suggestion, Norberto -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Is samba right for me?
I am currently a college student looking for ways to prepare myself for any Server Administration job once I get out of college. I've been going back and worth between Freenode IRC channels (#linux and ##windows) trying to decide what to learn. On one hand, we have Windows Server 2008 R2, people in #linux keep on telling me to just go ahead and use it because samba can't provide everything Server 2008 R2 does. The more and more I read up on Samba (especially Samba4; which I realize isn't going to be released stable for a while) it feels like it *can*provide all the features Server 2008 R2 does. Can you do a bit of myth debunking for me? Would you suggest samba for managing Windows clients (any other tools you can recommend in addition?) I really would like to use Samba + Linux because of the cost of ownership and the open-source community, I just want to make sure it's up to par with Server 2008 R2s offerings. Thank you so much for your time! -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Is samba right for me?
On Wed, Mar 17, 2010 at 04:08:38PM -0400, Chris wrote: I am currently a college student looking for ways to prepare myself for any Server Administration job once I get out of college. I've been going back and worth between Freenode IRC channels (#linux and ##windows) trying to decide what to learn. On one hand, we have Windows Server 2008 R2, people in #linux keep on telling me to just go ahead and use it because samba can't provide everything Server 2008 R2 does. The more and more I read up on Samba (especially Samba4; which I realize isn't going to be released stable for a while) it feels like it *can*provide all the features Server 2008 R2 does. Can you do a bit of myth debunking for me? If you want to be an admin of samba boxes, then play with samba. If you want to be a windows admin, then go play with windows (samba won't be any help learning that). Would you suggest samba for managing Windows clients (any other tools you can recommend in addition?) I really would like to use Samba + Linux because of the cost of ownership and the open-source community, I just want to make sure it's up to par with Server 2008 R2s offerings. Linux + samba is a great way to get a cheap and reliable fileserver (and to some extent a domain controller) for windows clients. Administrating it is nothing like administrating a windows server at all. It is simply an alternate choice of server. So if you want to learn to administrate a windows server, then that's what you will need to learn on. -- Len Sorensen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Is samba right for me?
As a career move I don't see any reason why you shouldn't / couldn't learn both. Couldn't hurt, would increase your knowledge base and extend your resume/options. On Mar 17, 2010, at 1:08 PM, Chris wrote: I am currently a college student looking for ways to prepare myself for any Server Administration job once I get out of college. I've been going back and worth between Freenode IRC channels (#linux and ##windows) trying to decide what to learn. On one hand, we have Windows Server 2008 R2, people in #linux keep on telling me to just go ahead and use it because samba can't provide everything Server 2008 R2 does. The more and more I read up on Samba (especially Samba4; which I realize isn't going to be released stable for a while) it feels like it *can*provide all the features Server 2008 R2 does. Can you do a bit of myth debunking for me? Would you suggest samba for managing Windows clients (any other tools you can recommend in addition?) I really would like to use Samba + Linux because of the cost of ownership and the open-source community, I just want to make sure it's up to par with Server 2008 R2s offerings. Thank you so much for your time! -- 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] user authenticating then not getting a profile
Evening, samba on fedora core 5 samba 3.3.3 client vista, fully patched openldap as the backend for samba samba in the pdc role Trying to help a user sign on and off more quickly I deleted the user's profile in \\samba\$USER\profile, created a directory at \\samba\profiles\$USER. I created both the $USER and the $USER.V2 directories, changed the permissions, and also deleted the user's directory in \\client\c$\Users\$USER. Now when the user logs on the user is properly authenticated through samba and ldap, but the user only gets a temporary profile. I've put the ldap profile parameter back to \\samba\$USER\profile and restored the files (I save files before deleting them). My user is still not able to log on. Any ideas what's going on or where I can look? Mike -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] printer device settings not saved for normal domain users on ubuntu 9.10
Hi, We recently upgraded our print server from ubuntu 9.04 to 9.10 and the print server does not work properly. We are running samba 3.4.0 as PDC, file server and print server with open ldap. The problem that the default printer settings like duplex unit and memory size are not applied to the normal users with read permission. I login as an administrator from a windows client machine and set the device settings and default printing preferences. Then I login as a normal domain user, the device settings remains unchanged and all grey out. As I am a normal user with read permission set up, I can not change the printer settings. But these settings are meant to be set properly when I login last time. Then I login as administrator again and I can see these device settings are properly set and saved. It used to work in ubuntu 9.04 but I do not know what I can do to fix this issue. Anyone has experienced the same or similar issue? How did you fix it?? Thanks. Ming -- | Judicial Commission of NSW | Ph: +61 2 9299 4421 | Fax: +61 2 9290 3194 | This Message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender and not necessarily the views of the Judicial Commission of NSW. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Build status as of Wed Mar 17 06:00:05 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-03-16 00:00:05.0 -0600 +++ /home/build/master/cache/broken_results.txt 2010-03-17 00:00:06.0 -0600 @@ -0,0 +1,21 @@ +Build status as of Wed Mar 17 06:00:05 2010 + +Build counts: +Tree Total Broken Panic +build_farm 0 0 0 +ccache 34 12 0 +ldb 34 34 0 +libreplace 33 12 0 +lorikeet 0 0 0 +pidl 24 23 0 +ppp 17 0 0 +rsync34 12 0 +samba-docs 0 0 0 +samba-web0 0 0 +samba_3_current 32 32 2 +samba_3_master 32 32 2 +samba_3_next 29 29 4 +samba_4_0_test 34 32 0 +talloc 34 11 0 +tdb 32 22 0 +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 50cc29b... s4:torture/rpc/lsa*: make use of dcerpc_binding_handle stubs via ba3b9fa... s4:torture/rpc/remote_pac.c: make use of dcerpc_binding_handle stubs from f48fb0d... s3-vfs: fix some buildwarnings in traffic analyzer, there are many more. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 50cc29b3cb234f71f7fbbef47fe36bf9d85a313b Author: Stefan Metzmacher me...@samba.org Date: Thu Mar 11 12:00:34 2010 +0100 s4:torture/rpc/lsa*: make use of dcerpc_binding_handle stubs metze commit ba3b9fa36b0ffcb2cfcee34dab6d9a544a8cd9fd Author: Stefan Metzmacher me...@samba.org Date: Tue Mar 16 11:24:25 2010 +0100 s4:torture/rpc/remote_pac.c: make use of dcerpc_binding_handle stubs metze --- Summary of changes: source4/torture/rpc/alter_context.c |8 +- source4/torture/rpc/lsa.c | 404 ++- source4/torture/rpc/lsa_lookup.c| 57 +++--- source4/torture/rpc/remote_pac.c| 11 +- source4/torture/rpc/samr.c |4 +- source4/torture/rpc/session_key.c | 15 +- 6 files changed, 258 insertions(+), 241 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c index cfd56f7..08d938e 100644 --- a/source4/torture/rpc/alter_context.c +++ b/source4/torture/rpc/alter_context.c @@ -38,7 +38,7 @@ bool torture_rpc_alter_context(struct torture_context *torture) status = torture_rpc_connection(torture, p, ndr_table_lsarpc); torture_assert_ntstatus_ok(torture, status, connecting); - if (!test_lsa_OpenPolicy2(p, torture, handle)) { + if (!test_lsa_OpenPolicy2(p-binding_handle, torture, handle)) { ret = false; } @@ -57,7 +57,7 @@ bool torture_rpc_alter_context(struct torture_context *torture) ret = test_DsRoleGetPrimaryDomainInformation(torture, p2); if (handle) { - ret = test_lsa_Close(p, torture, handle); + ret = test_lsa_Close(p-binding_handle, torture, handle); } syntax = p-syntax; @@ -70,10 +70,10 @@ bool torture_rpc_alter_context(struct torture_context *torture) torture_comment(torture, testing DSSETUP pipe operations - should fault\n); ret = test_DsRoleGetPrimaryDomainInformation_ext(torture, p, NT_STATUS_NET_WRITE_FAULT); - ret = test_lsa_OpenPolicy2(p, torture, handle); + ret = test_lsa_OpenPolicy2(p-binding_handle, torture, handle); if (handle) { - ret = test_lsa_Close(p, torture, handle); + ret = test_lsa_Close(p-binding_handle, torture, handle); } torture_comment(torture, testing DSSETUP pipe operations\n); diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index e2a4411..4353f4b 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -37,7 +37,7 @@ static void init_lsa_String(struct lsa_String *name, const char *s) name-string = s; } -static bool test_OpenPolicy(struct dcerpc_pipe *p, +static bool test_OpenPolicy(struct dcerpc_binding_handle *b, struct torture_context *tctx) { struct lsa_ObjectAttribute attr; @@ -66,7 +66,7 @@ static bool test_OpenPolicy(struct dcerpc_pipe *p, r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = handle; - status = dcerpc_lsa_OpenPolicy(p, tctx, r); + status = dcerpc_lsa_OpenPolicy_r(b, tctx, r); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) || NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) { @@ -81,7 +81,7 @@ static bool test_OpenPolicy(struct dcerpc_pipe *p, } -bool test_lsa_OpenPolicy2(struct dcerpc_pipe *p, +bool test_lsa_OpenPolicy2(struct dcerpc_binding_handle *b, struct torture_context *tctx, struct policy_handle **handle) { @@ -114,7 +114,7 @@ bool test_lsa_OpenPolicy2(struct dcerpc_pipe *p, r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.handle = *handle; - status = dcerpc_lsa_OpenPolicy2(p, tctx, r); + status = dcerpc_lsa_OpenPolicy2_r(b, tctx, r); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) || NT_STATUS_EQUAL(status, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) { @@ -148,7 +148,7 @@ static const char *sid_type_lookup(enum lsa_SidType r) return Invalid sid type\n; } -static bool test_LookupNames(struct dcerpc_pipe *p, +static bool test_LookupNames(struct dcerpc_binding_handle *b, struct torture_context *tctx, struct
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d41b8c3... s4-smbtorture: skip security descriptor tests against Samba in RPC-WINREG. via 3db9729... s4-smbtorture: re-arrange tests in RPC-WINREG. via 75a4dff... s4-smbtorture: add test to check different keytypes. via 89eaa9e... s4-smbtorture: add test_DeleteKey_opts to RPC-WINREG. via 80ba129... s4-smbtorture: add test_OpenKey_opts() to RPC-WINREG. via c33a7ca... s4-smbtorture: add test_CreateKey_opts() to RPC-WINREG test. via f075720... s4-smbtorture: put HKLM current_version test into an own function. via 8fd4375... s4-smbtorture: use binding handle for simple SetValue winreg test. from 50cc29b... s4:torture/rpc/lsa*: make use of dcerpc_binding_handle stubs http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d41b8c305342de0795dd49dac588b5c0b8f00bfe Author: Günther Deschner g...@samba.org Date: Wed Mar 17 11:31:43 2010 +0100 s4-smbtorture: skip security descriptor tests against Samba in RPC-WINREG. Guenther commit 3db9729240dedd74cdf3d404b68ac45ef0fe0bca Author: Günther Deschner g...@samba.org Date: Wed Mar 17 01:25:42 2010 +0100 s4-smbtorture: re-arrange tests in RPC-WINREG. Mostly choping test_Open() into smaller parts. Guenther commit 75a4dffac1e25293e67fc1b471fb8d74c2f40e61 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 00:57:22 2010 +0100 s4-smbtorture: add test to check different keytypes. This test will be skipped for samba. Guenther commit 89eaa9ed8e52ff9447285974d2acd586257e4319 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 11:36:09 2010 +0100 s4-smbtorture: add test_DeleteKey_opts to RPC-WINREG. Guenther commit 80ba1295ec39692821b0f2af1c53124f80ae8866 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 00:55:41 2010 +0100 s4-smbtorture: add test_OpenKey_opts() to RPC-WINREG. Guenther commit c33a7ca84cc313299af746b60a7cf94c4589c44b Author: Günther Deschner g...@samba.org Date: Wed Mar 17 00:53:21 2010 +0100 s4-smbtorture: add test_CreateKey_opts() to RPC-WINREG test. Guenther commit f07572063dcc84d0f91284ecbf03b4319fe37a60 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 00:05:52 2010 +0100 s4-smbtorture: put HKLM current_version test into an own function. Guenther commit 8fd4375803c4cdebd7e68053c8b62e78b887eec8 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 00:05:02 2010 +0100 s4-smbtorture: use binding handle for simple SetValue winreg test. Guenther --- Summary of changes: source4/torture/rpc/winreg.c | 656 +++--- 1 files changed, 431 insertions(+), 225 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index a5a3812..14abd51 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -37,6 +37,9 @@ #define TEST_SUBKEY_SD TEST_KEY4 \\subkey_sd #define TEST_SUBSUBKEY_SD TEST_KEY4 \\subkey_sd\\subsubkey_sd #define TEST_VALUE torture_value_name +#define TEST_KEY_VOLATILE torture_volatile_key +#define TEST_SUBKEY_VOLATILE torture_volatile_subkey +#define TEST_KEY_SYMLINK torture_symlink_key #define TEST_SID S-1-5-21-1234567890-1234567890-1234567890-500 @@ -64,6 +67,8 @@ static bool test_GetVersion(struct dcerpc_binding_handle *b, struct winreg_GetVersion r; uint32_t v; + torture_comment(tctx, Testing GetVersion\n); + ZERO_STRUCT(r); r.in.handle = handle; r.out.version = v; @@ -104,33 +109,63 @@ static bool test_NotifyChangeKeyValue(struct dcerpc_binding_handle *b, return true; } -static bool test_CreateKey(struct dcerpc_binding_handle *b, - struct torture_context *tctx, - struct policy_handle *handle, const char *name, - const char *kclass) +static bool test_CreateKey_opts(struct torture_context *tctx, + struct dcerpc_binding_handle *b, + struct policy_handle *handle, + const char *name, + const char *kclass, + enum winreg_KeyType options, + uint32_t access_mask, + struct winreg_SecBuf *secdesc, + WERROR expected_result, + enum winreg_CreateAction *action_taken_p, + struct policy_handle *new_handle_p) { struct winreg_CreateKey r; struct policy_handle newhandle; enum winreg_CreateAction action_taken = 0; + torture_comment(tctx,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4ca2cc3... s4-smbtorture: workaround broken REG_MULTI_SZ from winreg in s3 during SetPrinterDataEx SPOOLSS test. via 481402b... s4-smbtorture: workaround the fact that you cannot fully rename a printer in samba. via c05a061... s4-smbtorture: only use friendly data in extended SetPrinterDataEx test. from d41b8c3... s4-smbtorture: skip security descriptor tests against Samba in RPC-WINREG. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4ca2cc348e3412fd1851cd8512a10d0d0b1acf99 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 15:55:23 2010 +0100 s4-smbtorture: workaround broken REG_MULTI_SZ from winreg in s3 during SetPrinterDataEx SPOOLSS test. Guenther commit 481402bae557b174b38a965d209d417728c7562f Author: Günther Deschner g...@samba.org Date: Wed Mar 17 15:45:54 2010 +0100 s4-smbtorture: workaround the fact that you cannot fully rename a printer in samba. Guenther commit c05a06187d6a9b2f065dfc65112ab5188d2f11b7 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 15:32:42 2010 +0100 s4-smbtorture: only use friendly data in extended SetPrinterDataEx test. Passes against windows but not against samba yet :-( Guenther --- Summary of changes: source4/torture/rpc/spoolss.c | 37 + 1 files changed, 33 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 1f143a3..db7d5ab 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3691,6 +3691,7 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, }; enum winreg_Type types[] = { REG_SZ, + REG_MULTI_SZ, REG_DWORD, REG_BINARY }; @@ -3714,12 +3715,27 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, uint32_t ecount; struct spoolss_PrinterEnumValues *einfo; + if (types[t] == REG_DWORD) { + s = 0x; + } + + if (torture_setting_bool(tctx, samba3, false)) { + if ((types[t] == REG_MULTI_SZ) s == 0) { + torture_warning(tctx, samba3 does not handle 4 byte emtpy REG_MULTI_SZ buffers); + continue; + } + } + switch (types[t]) { case REG_BINARY: - case REG_DWORD: data = blob; offered = blob.length; break; + case REG_DWORD: + data = data_blob_talloc(tctx, NULL, 4); + SIVAL(data.data, 0, 0x12345678); + offered = 4; + break; case REG_SZ: torture_assert(tctx, reg_string_to_val(tctx, lp_iconv_convenience(tctx-lp_ctx), @@ -3727,6 +3743,14 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, offered = data.length; /*strlen_m_term(data.string)*2;*/ break; + case REG_MULTI_SZ: + torture_assert(tctx, + reg_string_to_val(tctx, lp_iconv_convenience(tctx-lp_ctx), + REG_SZ, string, type, data), ); + torture_assert(tctx, data_blob_realloc(tctx, data, data.length + 2), ); + memset(data.data[data.length - 2], '\0', 2); + offered = data.length; + break; default: torture_fail(tctx, talloc_asprintf(tctx, type %d untested\n, types[t])); } @@ -4247,9 +4271,14 @@ static bool test_printer_rename(struct torture_context *tctx, torture_assert_str_equal(tctx, printer_name, printer_name_new, new printer name was not set); - torture_assert(tctx, - test_OpenPrinter_badname(tctx, b, printer_name_orig), - still can open printer with oldname); + /* samba currently cannot fully rename printers */ + if (!torture_setting_bool(tctx, samba3, false)) { + torture_assert(tctx, + test_OpenPrinter_badname(tctx, b, printer_name_orig), + still can open printer with oldname after rename); + } else { + torture_warning(tctx, *not* checking for open with oldname after rename for samba3); + } torture_assert(tctx,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4b80e14... s4:torture/rpc/samba3rpc.c: make use of dcerpc_binding_handle stubs via 2d897be... s4:torture/rpc/samsync.c: make use of dcerpc_binding_handle stubs via 532e034... s4:torture/rpc/samr_accessmask.c: make use of dcerpc_binding_handle stubs via f400fc5... s4:torture/rpc/dssetup.c: make use of dcerpc_binding_handle stubs via 6e8fd4d... s4:torture/rpc/bench.c: make use of dcerpc_binding_handle stubs via aecd9dd... s4:torture/rpc/samlogon.c: make use of dcerpc_binding_handle stubs via 9639afa... s4:torture/rpc/netlogon.c: make use of dcerpc_binding_handle stubs via c05a0f7... s4:torture/rpc/schannel.c: make use of dcerpc_binding_handle stubs via 2d31379... s4:torture/rpc/testjoin.c: make use of dcerpc_binding_handle stubs via a91647d... s4:torture/rpc/samr.c: make use of dcerpc_binding_handle stubs via 0422151... s4:librpc/rpc: initialize p-binding_handle in dcerpc_secondary_context() from 4ca2cc3... s4-smbtorture: workaround broken REG_MULTI_SZ from winreg in s3 during SetPrinterDataEx SPOOLSS test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4b80e145b402a198ff7da2458cb4cebd9232bce2 Author: Stefan Metzmacher me...@samba.org Date: Wed Mar 17 12:09:53 2010 +0100 s4:torture/rpc/samba3rpc.c: make use of dcerpc_binding_handle stubs metze commit 2d897beb7ad5f6abc19b8c4dcaafaf897af9fd1f Author: Stefan Metzmacher me...@samba.org Date: Wed Mar 17 12:05:10 2010 +0100 s4:torture/rpc/samsync.c: make use of dcerpc_binding_handle stubs metze commit 532e034e287705b34c84dc110dbf954d2e885972 Author: Stefan Metzmacher me...@samba.org Date: Mon Mar 15 09:01:17 2010 +0100 s4:torture/rpc/samr_accessmask.c: make use of dcerpc_binding_handle stubs metze commit f400fc54bce0f2fda5ce98238439f69283da91ac Author: Stefan Metzmacher me...@samba.org Date: Wed Mar 17 12:06:05 2010 +0100 s4:torture/rpc/dssetup.c: make use of dcerpc_binding_handle stubs metze commit 6e8fd4df6078cb426a1a9233f796532590c2387f Author: Stefan Metzmacher me...@samba.org Date: Wed Mar 17 12:05:42 2010 +0100 s4:torture/rpc/bench.c: make use of dcerpc_binding_handle stubs metze commit aecd9dd19573b2b27a301d3aca2ed201b9c3b8ce Author: Stefan Metzmacher me...@samba.org Date: Tue Mar 16 11:34:04 2010 +0100 s4:torture/rpc/samlogon.c: make use of dcerpc_binding_handle stubs metze commit 9639afae694621c63f35c3ff46939bae5c1606a9 Author: Stefan Metzmacher me...@samba.org Date: Tue Mar 16 11:22:28 2010 +0100 s4:torture/rpc/netlogon.c: make use of dcerpc_binding_handle stubs metze commit c05a0f78236e595642b62271570acf96e5bba69d Author: Stefan Metzmacher me...@samba.org Date: Tue Mar 16 11:10:16 2010 +0100 s4:torture/rpc/schannel.c: make use of dcerpc_binding_handle stubs metze commit 2d31379853716b25ee2a0dcc58edc0f584742d55 Author: Stefan Metzmacher me...@samba.org Date: Tue Mar 16 10:55:41 2010 +0100 s4:torture/rpc/testjoin.c: make use of dcerpc_binding_handle stubs metze commit a91647d494c43b4430a9f339907e50c14187a35a Author: Stefan Metzmacher me...@samba.org Date: Fri Mar 12 17:51:06 2010 +0100 s4:torture/rpc/samr.c: make use of dcerpc_binding_handle stubs metze commit 04221518dab1a36610752cd97ec560f285dc2090 Author: Stefan Metzmacher me...@sernet.private Date: Wed Mar 17 14:00:45 2010 +0100 s4:librpc/rpc: initialize p-binding_handle in dcerpc_secondary_context() metze --- Summary of changes: source4/librpc/rpc/dcerpc_util.c |7 + source4/torture/rpc/bench.c |3 +- source4/torture/rpc/dssetup.c |3 +- source4/torture/rpc/netlogon.c| 160 --- source4/torture/rpc/samba3rpc.c | 196 +--- source4/torture/rpc/samlogon.c| 22 +- source4/torture/rpc/samr.c| 938 ++--- source4/torture/rpc/samr_accessmask.c | 152 +++--- source4/torture/rpc/samsync.c | 68 ++- source4/torture/rpc/schannel.c| 21 +- source4/torture/rpc/testjoin.c| 31 +- 11 files changed, 909 insertions(+), 692 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 768a386..8fd17bd 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -755,6 +755,13 @@ _PUBLIC_ NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, p2-binding = talloc_reference(p2, p-binding); + p2-binding_handle = talloc(p2, struct dcerpc_binding_handle); + if (p2-binding_handle == NULL) { + talloc_free(p2); + return NT_STATUS_NO_MEMORY; +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3bc18d9... s3-selftest: run RPC-EVENTLOG against s3. via bb91bbb... s3-test: setup initial eventlog infrastructure. via 3efaf5e... s3-selftest: setup initial eventlog infrastructure. via 453fed4... s4-smbtorture: skip BackupLog test against samba in RPC-EVENTLOG. from 4b80e14... s4:torture/rpc/samba3rpc.c: make use of dcerpc_binding_handle stubs http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3bc18d9f67feea901cc9f8e254bf23429b03a4e7 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 22:56:15 2010 +0100 s3-selftest: run RPC-EVENTLOG against s3. Guenther commit bb91bbb413132c62066e77c95c6dc4f1d8444628 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 22:55:41 2010 +0100 s3-test: setup initial eventlog infrastructure. Guenther commit 3efaf5e6ba203df23151665baac821a7c09754d6 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 22:55:00 2010 +0100 s3-selftest: setup initial eventlog infrastructure. Guenther commit 453fed4efd08fccd2979d0faf31a67facf133778 Author: Günther Deschner g...@samba.org Date: Wed Mar 17 22:44:44 2010 +0100 s4-smbtorture: skip BackupLog test against samba in RPC-EVENTLOG. Guenther --- Summary of changes: selftest/target/Samba3.pm | 13 + source3/script/tests/selftest.sh |7 ++- source3/script/tests/test_posix_s3.sh |2 +- source4/torture/rpc/eventlog.c|4 4 files changed, 24 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index c3f696a..cc7713d 100644 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -412,6 +412,9 @@ sub provision($$) my $lockdir=$prefix_abs/lockdir; push(@dirs,$lockdir); + my $eventlogdir=$prefix_abs/lockdir/eventlog; + push(@dirs,$eventlogdir); + my $logdir=$prefix_abs/logs; push(@dirs,$logdir); @@ -438,6 +441,8 @@ sub provision($$) my $mod_printer_pl = $ENV{PERL} $RealBin/../source3/script/tests/printing/modprinter.pl; + my @eventlog_list = (dns server, application); + open(CONF, $conffile) or die(Unable to open $conffile); print CONF [global] @@ -474,6 +479,8 @@ sub provision($$) addprinter command =$mod_printer_pl -a -s $conffile -- deleteprinter command = $mod_printer_pl -d -s $conffile -- + eventlog list = application \dns server\ + kernel oplocks = no kernel change notify = no @@ -557,6 +564,12 @@ $unix_name-group:x:$unix_gids[0]: ; close(GROUP); + foreach my $evlog (@eventlog_list) { + my $evlogtdb = $eventlogdir/$evlog.tdb; + open(EVENTLOG, $evlogtdb) or die(Unable to open $evlogtdb); + close(EVENTLOG); + } + $ENV{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd; $ENV{NSS_WRAPPER_GROUP} = $nss_wrapper_group; diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh index e49bca8..e481c7e 100755 --- a/source3/script/tests/selftest.sh +++ b/source3/script/tests/selftest.sh @@ -95,6 +95,7 @@ COMMONCONFFILE=$LIBDIR/common.conf PRIVATEDIR=$PREFIX_ABS/private NCALRPCDIR=$PREFIX_ABS/ncalrpc LOCKDIR=$PREFIX_ABS/lockdir +EVENTLOGDIR=$LOCKDIR/eventlog LOGDIR=$PREFIX_ABS/logs SOCKET_WRAPPER_DIR=$PREFIX_ABS/sw CONFIGURATION=--configfile $CONFFILE @@ -158,7 +159,7 @@ if test x`smbd -b | grep NSS_WRAPPER` = x; then fi -mkdir -p $PRIVATEDIR $NCALRPCDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR +mkdir -p $PRIVATEDIR $NCALRPCDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR $EVENTLOGDIR mkdir -p $SOCKET_WRAPPER_DIR mkdir -p $WINBINDD_SOCKET_DIR chmod 755 $WINBINDD_SOCKET_DIR @@ -257,6 +258,7 @@ cat $SERVERCONFFILEEOF addprinter command =$PERL $SRCDIR/../source3/script/tests/printing/modprinter.pl -a -s $SERVERCONFFILE -- deleteprinter command = $PERL $SRCDIR/../source3/script/tests/printing/modprinter.pl -d -s $SERVERCONFFILE -- + eventlog list = dns server application kernel oplocks = no kernel change notify = no @@ -352,6 +354,9 @@ nogroup:x:65534:nobody EOF fi +touch $EVENTLOGDIR/dns\ server.tdb +touch $EVENTLOGDIR/application.tdb + MAKE_TEST_BINARY=bin/smbpasswd export MAKE_TEST_BINARY diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh index eb78de7..f1b5608 100755 --- a/source3/script/tests/test_posix_s3.sh +++ b/source3/script/tests/test_posix_s3.sh @@ -41,7 +41,7 @@ rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC rpc=$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC RPC-SAMBA3-WINREG rpc=$rpc
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b05f0db... s4-smbtorture: fix typo in RPC-SAMR-PASSWORDS-LOCKOUT test. via b170ebe... s3-eventlog: fix elog_tdbname(), we were always lower-casing entire lockdir path... from 3bc18d9... s3-selftest: run RPC-EVENTLOG against s3. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b05f0db957633454ad01598d084d883b8a3631fe Author: Günther Deschner g...@samba.org Date: Wed Mar 17 18:03:29 2010 +0100 s4-smbtorture: fix typo in RPC-SAMR-PASSWORDS-LOCKOUT test. Guenther commit b170ebe08b78c5240266578a19dae424802cda0e Author: Günther Deschner g...@samba.org Date: Wed Mar 17 23:16:53 2010 +0100 s3-eventlog: fix elog_tdbname(), we were always lower-casing entire lockdir path... Found by RPC-EVENTLOG torture test. Guenther --- Summary of changes: source3/lib/eventlog/eventlog.c | 24 +++- source4/torture/rpc/samr.c |2 +- 2 files changed, 20 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c index 1c0dba9..dc14214 100644 --- a/source3/lib/eventlog/eventlog.c +++ b/source3/lib/eventlog/eventlog.c @@ -65,14 +65,28 @@ TDB_CONTEXT *elog_init_tdb( char *tdbfilename ) char *elog_tdbname(TALLOC_CTX *ctx, const char *name ) { - char *path = talloc_asprintf(ctx, %s/%s.tdb, - state_path(eventlog), - name); + char *path; + char *file; + char *tdbname; + + path = talloc_strdup(ctx, state_path(eventlog)); if (!path) { return NULL; } - strlower_m(path); - return path; + + file = talloc_asprintf_strlower_m(path, %s.tdb, name); + if (!file) { + talloc_free(path); + return NULL; + } + + tdbname = talloc_asprintf(path, %s/%s, state_path(eventlog), file); + if (!tdbname) { + talloc_free(path); + return NULL; + } + + return tdbname; } diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 9e2c846..4f21d5a 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -3894,7 +3894,7 @@ static bool test_Password_lockout(struct dcerpc_pipe *p, info.info1 = *info1; - torture_comment(tctx, setting password history lenght.\n); + torture_comment(tctx, setting password history length.\n); info.info1.password_history_length = password_history_length; torture_assert(tctx, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 752b220... Fixed --ol-mmr-url helpline via 947560f... Fixed OL-MMR make test via 15172d3... Fixed MMR-URL-Split and changed RID-Range OpenLDAP ITS6394 from b05f0db... s4-smbtorture: fix typo in RPC-SAMR-PASSWORDS-LOCKOUT test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 752b2206cbb411e98e88efcfd1df9876a79d4a3d Author: Oliver Liebel oli...@itc.li Date: Wed Mar 17 20:11:11 2010 +0100 Fixed --ol-mmr-url helpline Signed-off-by: Andrew Bartlett abart...@samba.org commit 947560fe3754185cd6edf7e1cd7e5c5fe405fa39 Author: Oliver Liebel oli...@itc.li Date: Wed Mar 17 20:14:19 2010 +0100 Fixed OL-MMR make test Signed-off-by: Andrew Bartlett abart...@samba.org commit 15172d3055349ba1280d671a94794ccb1e787775 Author: Oliver Liebel oli...@itc.li Date: Wed Mar 17 20:08:08 2010 +0100 Fixed MMR-URL-Split and changed RID-Range OpenLDAP ITS6394 Signed-off-by: Andrew Bartlett abart...@samba.org --- Summary of changes: source4/scripting/python/samba/provisionbackend.py | 18 ++ source4/setup/provision|2 +- source4/setup/tests/blackbox_provision-backend.sh |2 +- 3 files changed, 12 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py index 1919c5d..e510486 100644 --- a/source4/scripting/python/samba/provisionbackend.py +++ b/source4/scripting/python/samba/provisionbackend.py @@ -356,15 +356,17 @@ class OpenLDAPBackend(LDAPBackend): # For now, make these equal mmr_pass = self.ldapadminpass -url_list=filter(None,self.ol_mmr_urls.split(' ')) +url_list=filter(None,self.ol_mmr_urls.split(',')) +for url in url_list: +self.message(Using LDAP-URL: +url) if (len(url_list) == 1): -url_list=filter(None,self.ol_mmr_urls.split(',')) - +raise ProvisioningError(At least 2 LDAP-URLs needed for MMR!) + -mmr_on_config = MirrorMode On -mmr_replicator_acl = by dn=cn=replicator,cn=samba read -serverid=0 -for url in url_list: +mmr_on_config = MirrorMode On +mmr_replicator_acl = by dn=cn=replicator,cn=samba read +serverid=0 +for url in url_list: serverid=serverid+1 mmr_serverids_config += read_and_sub_file(self.setup_path(mmr_serverids.conf), { SERVERID : str(serverid), @@ -400,7 +402,7 @@ class OpenLDAPBackend(LDAPBackend): olc_serverids_config = olc_syncrepl_seed_config = olc_mmr_config += read_and_sub_file(self.setup_path(olc_mmr.conf),{}) -rid=1000 +rid=500 for url in url_list: serverid=serverid+1 olc_serverids_config += read_and_sub_file(self.setup_path(olc_serverid.conf), diff --git a/source4/setup/provision b/source4/setup/provision index a04bc2a..9932759 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -109,7 +109,7 @@ parser.add_option(--partitions-only, parser.add_option(--targetdir, type=string, metavar=DIR, help=Set target directory) parser.add_option(--ol-mmr-urls, type=string, metavar=LDAPSERVER, -help=List of LDAP-URLS [ ldap://FQHN:PORT/ (where PORT has to be different than 389!) ] separated with whitespaces for use with OpenLDAP-MMR (Multi-Master-Replication)) +help=List of LDAP-URLS [ ldap://FQHN:PORT/ (where PORT has to be different than 389!) ] separated with comma (\,\) for use with OpenLDAP-MMR (Multi-Master-Replication), e.g.: \ldap://s4dc1:9000,ldap://s4dc2:9000\;) parser.add_option(--slapd-path, type=string, metavar=SLAPD-PATH, help=Path to slapd for LDAP backend [e.g.:'/usr/local/libexec/slapd']. Required for Setup with LDAP-Backend. OpenLDAP Version = 2.4.17 should be used.) parser.add_option(--setup-ds-path, type=string, metavar=SETUP_DS-PATH, diff --git a/source4/setup/tests/blackbox_provision-backend.sh b/source4/setup/tests/blackbox_provision-backend.sh index 305c87a..ef7819f 100755 --- a/source4/setup/tests/blackbox_provision-backend.sh +++ b/source4/setup/tests/blackbox_provision-backend.sh @@ -13,7 +13,7 @@ shift 1 . `dirname $0`/../../../testprogs/blackbox/subunit.sh testit openldap-backend $PYTHON ./setup/provision --domain=FOO --realm=foo.example.com --ldap-backend-type=openldap --targetdir=$PREFIX/openldap-backend --ldap-dryrun-mode
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 55c4511... charset: fixed a problem with the global use of the iconv_convenience structure from 752b220... Fixed --ol-mmr-url helpline http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 55c45110e6994fe95867f4df3243c6829116e093 Author: Andrew Tridgell tri...@samba.org Date: Thu Mar 18 14:06:13 2010 +1100 charset: fixed a problem with the global use of the iconv_convenience structure We had a crash bug where a cached copy of a iconv convenience pointer was used after being freed when loadparm asked for iconv to reload. This could happen if a python module used a iconv based function before loadparm was completed. The fix is to ensure that any use of this pointer remains valid, by reusing the pointer itself when it has already been initialised, but filling in the child elements with the updated values. --- Summary of changes: lib/util/charset/charcnv.c | 40 --- lib/util/charset/charset.h |9 --- lib/util/charset/util_unistr.c |3 +- librpc/ndr/ndr.c |6 +++- pidl/tests/ndr_string.pl | 12 +- source4/param/loadparm.c | 12 +++--- source4/param/param.h |5 ++- source4/param/util.c | 12 ++ source4/scripting/python/modules.h |3 +- 9 files changed, 69 insertions(+), 33 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c index a479f44..efdb3ed 100644 --- a/lib/util/charset/charcnv.c +++ b/lib/util/charset/charcnv.c @@ -39,6 +39,7 @@ */ struct smb_iconv_convenience { + TALLOC_CTX *child_ctx; const char *unix_charset; const char *dos_charset; bool native_iconv; @@ -83,22 +84,45 @@ static int close_iconv_convenience(struct smb_iconv_convenience *data) return 0; } -_PUBLIC_ struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx, -const char *dos_charset, -const char *unix_charset, -bool native_iconv) +/* + the old_ic is passed in here as the smb_iconv_convenience structure + is used as a global pointer in some places (eg. python modules). We + don't want to invalidate those global pointers, but we do want to + update them with the right charset information when loadparm + runs. To do that we need to re-use the structure pointer, but + re-fill the elements in the structure with the updated values + */ +_PUBLIC_ struct smb_iconv_convenience *smb_iconv_convenience_reinit(TALLOC_CTX *mem_ctx, + const char *dos_charset, + const char *unix_charset, + bool native_iconv, + struct smb_iconv_convenience *old_ic) { - struct smb_iconv_convenience *ret = talloc_zero(mem_ctx, - struct smb_iconv_convenience); + struct smb_iconv_convenience *ret; + if (old_ic != NULL) { + ret = old_ic; + close_iconv_convenience(ret); + talloc_free(ret-child_ctx); + ZERO_STRUCTP(ret); + } else { + ret = talloc_zero(mem_ctx, struct smb_iconv_convenience); + } if (ret == NULL) { return NULL; } + /* we use a child context to allow us to free all ptrs without + freeing the structure itself */ + ret-child_ctx = talloc_new(ret); + if (ret-child_ctx == NULL) { + return NULL; + } + talloc_set_destructor(ret, close_iconv_convenience); - ret-dos_charset = talloc_strdup(ret, dos_charset); - ret-unix_charset = talloc_strdup(ret, unix_charset); + ret-dos_charset = talloc_strdup(ret-child_ctx, dos_charset); + ret-unix_charset = talloc_strdup(ret-child_ctx, unix_charset); ret-native_iconv = native_iconv; return ret; diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index 2c8aa41..cc57b3e 100644 --- a/lib/util/charset/charset.h +++ b/lib/util/charset/charset.h @@ -163,10 +163,11 @@ codepoint_t tolower_m(codepoint_t val); int codepoint_cmpi(codepoint_t c1, codepoint_t c2); /* Iconv convenience functions */ -struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx, -const char *dos_charset, -