[Samba] wbinfo -u - do I need to worry?
Hi all, Will keep this brief :-) Just trying to clear some things up regarding winbind. wbinfo -u returns Error looking up domain users. I'm only using winbind for ntlm_auth which works fine. I'm not using AD or any Windows server-based domain. Samba only. There don't seem to be any obvious errors in the winbind log. Do I need to worry about that error? Should it list my full user list? I've recently upgraded to 3.0.26a from 3.0.14 and noticed Samba has added a couple of extra groups on my LDAP server: sambaSID=S-1-5-32-544 and sambaSID=S-1-5-32-545. One has displayName:Administrators and one has displayName:Users. These two groups are the only ones that appear when I do wbinfo -g. What are these and do I need to worry about them? wbinfo -D seems to work, wbinfo -t seems to work. Cheers, Phil -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Maximum number of files per folder
Sorry I haven't answered your question. I would go and check the docs or search the code. When you say accessing a folder do you really mean browsing in Explorer? If you're using Explorer, does it know they're text files? Do they have .txt extension? If it doesn't - if it has an extension which requires it - it could open each one to find out what it is - to generate a thumbnail etc. I've just created a directory containing 60,000 small text files with names of the form textfile${N}.txt and can navigate it with only momentary delays. I must admit, I'm using a dual xeon with fast scsi raid. The interesting thing for me was that when I hit 32768 files in my creation loop, there was a delay of about a second - possibly as an extra inode was allocated to the directory list. When you access a large directory in samba, one cpu intensive part of the process is likely to be the mapping of user names and permissions. Do you have many users? I've just doubled the size of my directory (120,000 small text files) and it still performs quite well - when accessing from Explorer over a samba share (3.0.24) I see a burst of activity on the Linux box and then a long delay as Windows arranges the list. Will the NAS manufacturer be able to give you more info? A common way around the problem of large directories is to use subdirectories based on the first letter or digit from the filename. This is only good to you if you can get to the code of your application and the files names do not change. Regards, Quinn On 12/11/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello list, we have a small NAS-Box here in our office, running Linux 2.6.13 and Samba 3 (exactly version string is not avalilable for me at moment). Is there a limit, how many files samba will store in one folder? We recognize a massive CPU-Load of the smbd-process, when accessing a folder which stores round about 60 000 small text-files. Is this a samba-Limit or a bug? The kernel and samba is compiled by the NAS-manufactur, so no cimpiler-options are available for me. So long, Markus -- Markus Neviadomski lists @ dieitexperten.de -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] sambaUserWorkstations (with LDAP) not working with Groups of Computers ?
Same problem with latest samba 3.0.26a stable. So I opened a bug report here : https://bugzilla.samba.org/show_bug.cgi?id=5076 We're stucked on following statement : Only CFLAGS=-DNO_LDAP_SECURITY build option can avoid this error. No more infos on the security issues this particular option might introduce. F. NASS. Frédéric Nass a écrit : Hi, I found more infos here : http://www.mail-archive.com/samba@lists.samba.org/msg33190.html This functionality seems to have been implemented in the samba source code (3.0.24 - auth_sam.c) : http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0_24/source/auth/auth_sam.c?rev=22815view=markup http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_3_0_24/source/auth/auth_sam.c?rev=22815view=markup if (*workstation_list) { BOOL invalid_ws = True; fstring tok; const char *s = workstation_list; const char *machine_name = talloc_asprintf(mem_ctx, %s$, user_info-wksta_name); if (machine_name == NULL) return NT_STATUS_NO_MEMORY; while (next_token(s, tok, ,, sizeof(tok))) { DEBUG(10,(sam_account_ok: checking for workstation match %s and %s\n, tok, user_info-wksta_name)); if(strequal(tok, user_info-wksta_name)) { invalid_ws = False; break; } here ///===if (tok[0] == '+') { DEBUG(10,(sam_account_ok: checking for workstation %s in group: %s\n, machine_name, tok + 1)); if (user_in_group(machine_name, tok + 1)) { invalid_ws = False; break; } } } if (invalid_ws) return NT_STATUS_INVALID_WORKSTATION; } So I used samba debug level 10 in smb.conf : This is the exact part of the samba workstation log file when auth fails on PC2 : (It should work, as PC2 is also part of salle1 workstation's group) smbldap_search_ext: base = [ou=Groups,dc=test,dc=org], filter = [((|(objectclass=sambaGroupMapping)(sambaGroupType=4))(|(sambaSIDList=S-1-5-21-747375223-3054175255-2287932516-3010)(sambaSIDList=S-1-5-21-747375223-3054175255-2287932516-515)(sambaSIDList=S-1-1-0)(sambaSIDList=S-1-5-2)(sambaSIDList=S-1-5-11)(sambaSIDList=S-1-5-21-747375223-3054175255-2287932516-9001)(sambaSIDList=S-1-22-2-515)(sambaSIDList=S-1-22-2-4000)))], scope = [2] [2007/11/08 15:07:18, 0] lib/smbldap.c:smbldap_open(1009) smbldap_open: cannot access LDAP when not root.. [2007/11/08 15:07:18, 10] auth/auth_util.c:add_aliases(653) pdb_enum_alias_memberships failed: NT_STATUS_UNSUCCESSFUL [2007/11/08 15:07:18, 10] auth/auth_util.c:user_in_group_sid(1277) could not create token for PC2$ [2007/11/08 15:07:18, 5] auth/auth.c:check_ntlm_password(273) check_ntlm_password: sam authentication for user [toto] FAILED with error NT_STATUS_INVALID_WORKSTATION [2007/11/08 15:07:18, 3] auth/auth_winbind.c:check_winbind_security(80) check_winbind_security: Not using winbind, requested domain [TEST] was for this SAM. [2007/11/08 15:07:18, 10] auth/auth.c:check_ntlm_password(261) check_ntlm_password: winbind had nothing to say [2007/11/08 15:07:18, 2] auth/auth.c:check_ntlm_password(319) check_ntlm_password: Authentication for user [toto] - [toto] FAILED with error NT_STATUS_INVALID_WORKSTATION [2007/11/08 15:07:18, 5] auth/auth_util.c:free_user_info(1867) attempting to free (and zero) a user_info structure [2007/11/08 15:07:18, 10] auth/auth_util.c:free_user_info(1871) structure was created for toto [2007/11/08 15:07:18, 5] rpc_server/srv_netlog_nt.c:_net_sam_logon_internal(934) _net_sam_logon: check_password returned status NT_STATUS_INVALID_WORKSTATION This is the same time slapd log in syslog file : Nov 8 15:07:18 debian slapd[3074]: conn=2 op=21 SRCH base=dc=test,dc=org scope=2 deref=0 filter=((uid=salle1)(objectClass=sambaSamAccount)) Nov 8 15:07:18 debian slapd[3074]: conn=2 op=21 SRCH attr=uid uidNumber gidNumber homeDirectory sambaPwdLastSet sambaPwdCanChange sambaPwdMustChange sambaLogonTime sambaLogoffTime sambaKickoffTime cn sn displayName sambaHomeDrive sambaHomePath sambaLogonScript sambaProfilePath description sambaUserWorkstations sambaSID sambaPrimaryGroupSID sambaLMPassword sambaNTPassword sambaDomainName objectClass sambaAcctFlags sambaMungedDial sambaBadPasswordCount sambaBadPasswordTime sambaPasswordHistory modifyTimestamp sambaLogonHours modifyTimestamp uidNumber Nov 8 15:07:18 debian slapd[3074]: conn=2 op=21 SEARCH RESULT tag=101 err=0 nentries=0 text= Nov 8 15:07:18 debian slapd[3074]: conn=2 op=22 SRCH base=ou=Groups,dc=test,dc=org scope=2 deref=0 filter=((objectClass=sambaGroupMapping)(|(displayName=salle1)(cn=salle1))) Nov 8 15:07:18 debian slapd[3074]: conn=2 op=22 SRCH attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn objectClass Nov 8 15:07:18 debian
[Samba] get_sam_group_entries: Failed to enumerate domain local groups!
Hi People: I run into a problem when I upgrade my sarge proxy to etch. My winbind now, with the same smb.conf that use to have, know tells me that can't find the groups with winbind. When I do a wbinfo -g gives me: Error looking up domain groups The debug says: get_sam_group_entries: Failed to enumerate domain local groups! I google a lot and I can't find a way to solve this. The problem is that if this dosen't work, It seems that the samba is unable to know the group of the users, and I have policies by group that I can't apply. Any light on these would be great... Tnxs in advance. PS: This is my smb.conf [global] workgroup = DOMAIN netbios name = PROXY security = DOMAIN passdb backend = tdbsam restrict anonymous = 1 syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 domain master = No dns proxy = No wins server = 10.200.0.2 idmap uid = 1-2 idmap gid = 1-2 winbind separator = \ load printers = no winbind enum users = Yes winbind enum groups = Yes winbind use default domain = Yes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] ACL changes on Samba NT 4.0 Member Server
Thank you for the advice. I tried the same setup Ubuntu 7.10 and it worked like a charm! Hans Eric Diven wrote: Try samba 3.0.23d. I just built if for Solaris, and it appears to be working beautifully. That's several days of my life I'll never get back. I just did built the new version, installed it, copied the libnss_winbind.so to where it lives and restarted samba. No config changes, nothing. ~Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Diven Sent: Monday, November 05, 2007 12:55 PM To: samba@lists.samba.org Subject: RE: [Samba] ACL changes on Samba NT 4.0 Member Server Not neccessarily, console login is controlled by PAM, not winbind. If you haven't set up PAM (and you shouldn't need to for just setting up a file share), you won't be able to log in at the console (or by ssh, etc). I'm still fighting this on my side as well, for what it's worth. If I figure it out, I'll let you know. When I try to add an entry to the ACL, I get the same error, but in the logs I see an error about not being able to set the access rights into the Unix security model. The error I get is Too many ACE entries for file to convert to posix perms. If you're seeing that too, we might be on to something. I am seeing it consistently across Solaris and CentOS, so I'm guessing this isn't a platform related issue for either of us. Good luck. ~Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans-Wilhelm Heisinger Sent: Monday, November 05, 2007 11:00 AM To: samba@lists.samba.org Subject: Re: [Samba] ACL changes on Samba NT 4.0 Member Server John, I seemed to have pinpointed the problem down to an authentication issue. wbinfo -a CPDOM+admin%password plaintext password authentication succeeded challenge/reponse password authentication succeeded su CPDOM+admin Password: su: incorrect password Any ideas? John Drescher wrote: On 11/2/07, Hans-Wilhelm Heisinger [EMAIL PROTECTED] wrote: I'm not really sure what I'm looking for or which log file the error would present it's self in. Anyways below is a my shot in the dark This is the right file but I don't see an error. Hopefully someone else can help. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba info/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] help with security
Hi colleagues I am trying to implement security for my network with samba, I am using poledit, but it has very few choices, I am using nitrobit group policy, but this needs a serial, and I do not have it. Someone I can recommend a software like nitrobit to implement security to the network. -- -- Roylan Suarez Reyes Admin. Redes JC. Vinales [EMAIL PROTECTED] Telef: 793210 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Kickoff time expired, how to change?
I am attempting to move my running Samba server from an old, inadequate machine, to one that is better suited to handle the load. Our office is very small, only 8 people, and the configuration is simple. I am running Samba 3.0.23c on the old server and 3.0.23d on the new. I am using the tdbsam for the backend. Basically I copied the entire /etc/samba directory from the old to the new server and used rsync to keep the users directories up to date with each other. The problem is, on the new machine, if I look at a users information using pdbedit -Lv username I see that the Kickoff time and Password Must Change fields are both set to Wed, 31 Dec 1969 16:59:59 MST. This results in the users account being expired and of course they cannot log in. I can change the Password Must change field easily enough, but I cannot find any reference to Kickoff Time that does not also talk about LDAP in the documentation, on this list or even via Google. I don't have the time, nor frankly the inclination, to try and set up an LDAP server at the moment. Is there some way to change the Kickoff Time? Or is there a different technique I should follow to migrate servers? Thank you. Tim Donnelly System/Network Administrator Colorado Alliance of Research Libraries (303)759-3399 x106 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] make_connection: connection to ipc$ denied due to security descriptor.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everybody, I'm a french sysadmin and i'm using Samba from a long date. Since my first use, i've write some usefull documentation, and usually, i've just to follow this documentation and Samba works by itself ;) Now, i'm trying to install Samba as the usuall but on a Debian-Etch AMD64 plateform. All my previous install were done on an Debian-i386 plateform, and certainly a woody distribution. This Samba version is 3.0.24, and uname -an gives me: Linux rhea 2.6.18-5-amd64 #1 SMP Tue Oct 2 20:37:02 UTC 2007 x86_64 GNU/Linux In all the case, i've install OpenLDAP, build my directory, parameter nsswitch and so on. When i type a getent passwd, all my LDAP record are seen and Samba authenticate well on LDAP; As the usual ;) But, when i'm trying to join some workstation to this Samba seen as a PDC server, sometime it works, and sometime not. I've search, changed a lot of things in my configuration, and now, most workstation well join the PDC, but i can't explore the network neighborhood, i've got an error message, and when i give \\MYSERVER in the url, i can see my Server Share. Another strange things, when two workstation join the domain, they can't explore themselves their shares or printers... In all the case, the most frequent error log message is: smbd/service.c:make_connection_snum(782) make_connection: connection to ipc$ denied due to security descriptor. For example, here is a portion of a log file: [2007/11/08 08:40:16, 2] smbd/sesssetup.c:setup_new_vc_session(799) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2007/11/08 08:40:16, 2] smbd/sesssetup.c:setup_new_vc_session(799) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2007/11/08 08:40:16, 2] lib/smbldap.c:smbldap_open_connection(788) smbldap_open_connection: connection opened [2007/11/08 08:40:16, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 514 [2007/11/08 08:40:16, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 514 [2007/11/08 08:40:17, 2] lib/access.c:check_access(323) Allowed connection from (192.168.1.212) [2007/11/08 08:40:17, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 513 [2007/11/08 08:40:17, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 513 [2007/11/08 08:40:17, 0] smbd/service.c:make_connection_snum(782) make_connection: connection to ipc$ denied due to security descriptor. [2007/11/08 08:43:21, 2] lib/smbldap.c:smbldap_open_connection(788) smbldap_open_connection: connection opened [2007/11/08 08:43:21, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 514 [2007/11/08 08:43:21, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 514 [2007/11/08 08:43:21, 2] lib/access.c:check_access(323) Allowed connection from (192.168.1.212) [2007/11/08 08:43:21, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 513 [2007/11/08 08:43:21, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 513 [2007/11/08 08:43:21, 0] smbd/service.c:make_connection_snum(782) make_connection: connection to ipc$ denied due to security descriptor. I think you want to see my smb.conf ? You've got it as smb.sample join to this message. My server IP is 192.168.1.2 and i've got an LDAP server on 127.0.0.1 and a replicat server on 192.168.1.3 I've define some group mapping, and all my users have for primary group the group named SmbDomUsers (gid=513). Sometime, when i'm using the pdbedit command i've got the following lines: Unix username:loic NT username: loic Account Flags:[UX ] User SID: S-1-5-21-3280060803-927162377-3199414824-3006 Primary Group SID:S-1-5-21-3280060803-927162377-3199414824-513 Full Name:Compte de Loic Home Directory: \\RHEA\loic HomeDir Drive:U: Logon Script: logon.cmd Profile Painit_sam_from_ldap: Entry found for user: ludovic init_group_from_ldap: Entry found for group: 513 init_group_from_ldap: Entry found for group: 513 init_sam_from_ldap: Entry found for user: pascal init_group_from_ldap: Entry found for group: 513 init_group_from_ldap: Entry found for group: 513 init_sam_from_ldap: Entry found for user: francois init_group_from_ldap: Entry found for group: 513 init_group_from_ldap: Entry found for group: 513 init_sam_from_ldap: Entry found for user: jerome init_group_from_ldap: Entry found for group: 513 init_group_from_ldap: Entry found for group: 513 th: \\RHEA\loic\.winprofile Domain: MYWORKGROUP Account desc: Compte Utilisateur du domaine MYWORKGROUP Workstations: Munged dial: Logon time: 0 Logoff
[Samba] Mac client
I'm trying to copy files to a Samba share that I have set up on a linux debian machine from a Mac running OS X, using samba 3.0.24. The Mac complains that there is something wrong with the file name, and then refuses to copy, and the operation leaves a zero-byte file with the same name on the samba share. It lets me log in nicely through the Mac File Finder. I've just spent a couple of hours searching the net but without any luck at all. Does anyone know what I should do in this situation? The samba share works fine from my other linux machine. Thanks Adam -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Mac client
Are the Mac files using any ILLEGAL Windows characters? The Mac pretty much allows any character in a filename, as long as it is escaped properly, while Windows can't handle things like... ? [ ] / \ = + : ; , The Mac will pretty much allow any of them to be used in a filename. Mike On 11/12/07, Adam Hardy [EMAIL PROTECTED] wrote: I'm trying to copy files to a Samba share that I have set up on a linux debian machine from a Mac running OS X, using samba 3.0.24. The Mac complains that there is something wrong with the file name, and then refuses to copy, and the operation leaves a zero-byte file with the same name on the samba share. It lets me log in nicely through the Mac File Finder. I've just spent a couple of hours searching the net but without any luck at all. Does anyone know what I should do in this situation? The samba share works fine from my other linux machine. Thanks Adam -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- Help the Environment, Plant a Bush back in Texas! I place economy among the first and most important republican virtues, and public debt as the greatest of the dangers to be feared. To preserve our independence, we must not let our rulers load us with perpetual debt. -- Thomas Jefferson, third US president, architect and author (1743-1826) Give Peace a Chance -- John Lennon (9 October 1940 – 8 December 1980) Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal. —Yehudi Menuhin (1916–1999), musician If you think you can, or you think you can't, you are probably right. —Mark Twain Art may imitate life, but life imitates TV. Ani DiFranco -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Maximum number of files per folder
On Mon, Nov 12, 2007 at 08:24:05AM +0100, [EMAIL PROTECTED] wrote: Hello list, we have a small NAS-Box here in our office, running Linux 2.6.13 and Samba 3 (exactly version string is not avalilable for me at moment). Is there a limit, how many files samba will store in one folder? We recognize a massive CPU-Load of the smbd-process, when accessing a folder which stores round about 60 000 small text-files. Is this a samba-Limit or a bug? The kernel and samba is compiled by the NAS-manufactur, so no cimpiler-options are available for me. There are no hard coded limits, only what the OS restricts. However, storing large numbers of files in a folder is a bad idea unless Samba is set up specially to do this. See here : http://us1.samba.org/samba/ftp/HOWTO/Samba-LargeDirectory-HOWTO for details. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Setting Samba to Listen on VMWare Interface
Hi All, am wanting to set up samba so that it only listens on the VMWare interface. I set interfaces as below, interfaces = 192.168.178.1/24 but I still don't see my share from XP. I for a username/password. Do I need to create the account on the XP machine on the Linux machine? [public] comment = Public Stuff path = /home/marks public = yes writable = yes I turned off the firestarter firewall to eliminate it as the issue. path on XP is \\192.168.178.1 in an Explorer window. No firewall enabled on XP machine. Linux distro where the share is, is Ubuntu (Feisty). I can ping the VMware host from the guest XP, so connectivity is fine. Anyone here who can steer me in the right direction? Cheers. Mark Sargent -- Tell me and I'll forget, show me and I may not remember, involve me, and I'll understand. Native American Proverb -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Maximum number of files per folder
On Mon, 2007-11-12 at 17:39 -0800, Jeremy Allison wrote: On Mon, Nov 12, 2007 at 08:24:05AM +0100, [EMAIL PROTECTED] wrote: Hello list, we have a small NAS-Box here in our office, running Linux 2.6.13 and Samba 3 (exactly version string is not avalilable for me at moment). Is there a limit, how many files samba will store in one folder? We recognize a massive CPU-Load of the smbd-process, when accessing a folder which stores round about 60 000 small text-files. Is this a samba-Limit or a bug? The kernel and samba is compiled by the NAS-manufactur, so no cimpiler-options are available for me. There are no hard coded limits, only what the OS restricts. However, storing large numbers of files in a folder is a bad idea unless Samba is set up specially to do this. See here : http://us1.samba.org/samba/ftp/HOWTO/Samba-LargeDirectory-HOWTO for details. IIRC ext3 has a (compile time changeable) limit of 32k files per dir by default ... Simo. -- Simo Sorce Samba Team GPL Compliance Officer [EMAIL PROTECTED] Senior Software Engineer at Red Hat Inc. [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] help with security
The standard templates that come with poledit are somewhat limited, but anything that you can configure via the registry can be set by a policy. There are several useful templates floating around the web, and you can always make your own. The other option of course is that if Nitrobit meets your requirements and would save you lots of time, you could buy it. -- Michael Roylan Suarez Reyes wrote: Hi colleagues I am trying to implement security for my network with samba, I am using poledit, but it has very few choices, I am using nitrobit group policy, but this needs a serial, and I do not have it. Someone I can recommend a software like nitrobit to implement security to the network. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] exporting an FUSE base file system to windows
Hi, I still need help to try and figure this out. On Tuesday 23 October 2007 16:52, doug wrote: Hi, What I wanted to do was to export an FUSE based filesystem mounted on linux to a windows box using samba. I can browse and navigate the fuse filesystem without problems on the linux box. With smbd running I can even navigate the filesystem using smbclient. Unfortunately when I try to access the exported file system from WinNT the mountpoint of the filesystem shows up as a zero size file rather than as a directory/folder. If I unmount the fuse filesystem the mountpoint becomes accessible again as a folder (but of course this is useless to me). I am hoping that from the following smbd debug messages someone may be able to tell me why. The mountpoint is a directory named srb_data in an exported home directory though it seems to be treated as a non-existant file. Pointers as to why it would be treated that way would be very helpful. When I do a directory listing on the windows SMB client my smbd server in debug mode always seems to return: [2007/11/13 15:00:05, 5] smbd/trans2.c:get_lanman2_dir_entry(1169) get_lanman2_dir_entry found srb_data/srb fname=srb [2007/11/13 15:00:05, 10] smbd/trans2.c:get_lanman2_dir_entry(1310) get_lanman2_dir_entry: SMB_FIND_FILE_BOTH_DIRECTORY_INFO [2007/11/13 15:00:05, 8] smbd/trans2.c:get_lanman2_dir_entry(1079) get_lanman2_dir_entry:readdir on dirptr 0x8d867d8 now at offset -1 [2007/11/13 15:00:05, 5] smbd/trans2.c:call_trans2findfirst(1798) call_trans2findfirst - (2) closing dptr_num 256 [2007/11/13 15:00:05, 4] smbd/dir.c:dptr_close_internal(238) closing dptr key 256 i.e. offset = -1 for my fuse mounted file system. (its also always last in the file list for some reason) (and I changed the fuse mount point from my previous email) maybe those two things are correlated, or could the offset=-1 be a pointer to some bug in my fuse based virtual filesystem? thanks for any guidance Doug [2007/10/02 16:22:12, 10] lib/util.c:dump_data(2080) [000] 00 5C 00 73 00 72 00 62 00 5F 00 64 00 61 00 74 .\.s.r.b ._.d.a.t [010] 00 61 00 00 00.a... [2007/10/02 16:22:12, 3] smbd/process.c:switch_message(993) switch message SMBntcreateX (pid 3791) conn 0x8f998a8 [2007/10/02 16:22:12, 4] smbd/uid.c:change_to_user(222) change_to_user: Skipping user change - already user [2007/10/02 16:22:12, 10] smbd/nttrans.c:reply_ntcreate_and_X(506) reply_ntcreateX: flags = 0x16, access_mask = 0x20189 file_attributes = 0x0, share_access = 0x3, create_disposition = 0x1 create_options = 0x40 root_dir_fid = 0x0 [2007/10/02 16:22:12, 5] smbd/filename.c:unix_convert(108) unix_convert called on file srb_data [2007/10/02 16:22:12, 10] smbd/statcache.c:stat_cache_lookup(248) stat_cache_lookup: lookup succeeded for name [SRB_DATA] - [srb_data] [2007/10/02 16:22:12, 3] smbd/dosmode.c:unix_mode(121) unix_mode(srb_data) returning 0744 [2007/10/02 16:22:12, 10] smbd/open.c:open_file_ntcreate(1091) open_file_ntcreate: fname=srb_data, dos_attrs=0x0 access_mask=0x20189 share_access=0x3 create_disposition = 0x1 create_options=0x40 unix mode=0744 oplock_request=3 [2007/10/02 16:22:12, 5] smbd/open.c:open_file_ntcreate(1178) open_file_ntcreate: FILE_OPEN requested for file srb_data and file doesn't exist. [2007/10/02 16:22:12, 10] smbd/trans2.c:set_bad_path_error(2623) set_bad_path_error: err = 2 bad_path = 0 [2007/10/02 16:22:12, 3] smbd/error.c:error_packet(146) error packet at smbd/trans2.c(2629) cmd=162 (SMBntcreateX) NT_STATUS_OBJECT_NAME_NOT_FOUND [2007/10/02 16:22:12, 5] lib/util.c:show_msg(476) [2007/10/02 16:22:12, 5] lib/util.c:show_msg(486) Any pointers would be most helpful. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Using idmap backend = ad
The problem solved! I'v changed winbind nss info = template sfu to winbind nss info = template rfc2307 and added: idmap config CENTAURA:schema_mode = rfc2307 Best regards Anton Brinyov. Anton Brinyov пишет: I'm sorry, I forgot to mention OS where Samba server is running. It's FreeBSD 6.2 Best regards Anton Brinyov. Anton Brinyov пишет: Good day! I have AD on Win2003 Server with Services For UNIX 3.5. When I try to set idmap backend = ad and type # id domain_user_name I get in log.winbindd-idmap following: [2007/11/07 18:09:18, 1] nsswitch/idmap_ad.c:idmap_ad_sids_to_unixids(613) Could not get unix ID AD user has SFU UID 2000. wbinfo -u prints correct lists of domain users, and when using idmap bakend = tdb winbind assign UID for users. Best regards Anton Brinyov. P.S. Some configs: smb.conf [global] dos charset = cp866 unix charset = koi8-r display charset = koi8-r workgroup = MYDOMAIN realm = MYDOMAIN.RU server string = myserv security = ADS password server = ALPHA.MYDOMAIN.RU BETA.MYDOMAIN.RU log file = /var/log/samba/log.%m max log size = 50 socket options = SO_RCVBUF=8192 SO_SNDBUF=8192 local master = No ldap ssl = no idmap uid = 16777216-33554431 idmap gid = 16777216-33554431 template shell = /bin/csh winbind separator = + winbind use default domain = Yes winbind nss info = template sfu idmap backend = ad inherit acls = Yes map acl inherit = Yes store dos attributes = Yes # debug level = 10 [homes] comment = Home Directories read only = No browseable = No nsswitch.conf --- group: files winbind group_compat: nis hosts: files dns networks: files passwd: files winbind passwd_compat: nis shells: files -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Rev 664: fixed the tsmsm module for non-root users on RHEL5 in http://samba.org/~tridge/3_0-ctdb
revno: 664 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: s3-ctdb-tridge timestamp: Mon 2007-11-12 21:55:44 +1100 message: fixed the tsmsm module for non-root users on RHEL5 modified: source/modules/vfs_tsmsm.c vfs_tsmsm.c-20070827024912-m3pirz28sej5g6pz-1 === modified file 'source/modules/vfs_tsmsm.c' --- a/source/modules/vfs_tsmsm.c2007-08-27 02:51:20 + +++ b/source/modules/vfs_tsmsm.c2007-11-12 10:55:44 + @@ -155,12 +155,10 @@ return 0; } - /* AIX has DMAPI but no POSIX capablities support. In this case, -* we need to be root to do DMAPI manipulations. -*/ -#ifndef HAVE_POSIX_CAPABILITIES + /* using POSIX capabilities does not work here. It's a slow path, so + become_root() is just as good anyway (tridge) */ become_root(); -#endif + /* go the slow DMAPI route */ if (dm_path_to_handle((char*)path, dmhandle, dmhandle_len) != 0) { ret = -1; @@ -178,10 +176,9 @@ ret = 0; dm_handle_free(dmhandle, dmhandle_len); + done: -#ifndef HAVE_POSIX_CAPABILITIES unbecome_root(); -#endif return ret; }
svn commit: samba r25932 - in branches/SAMBA_4_0: . source/lib/registry/tests
Author: jelmer Date: 2007-11-12 17:22:12 + (Mon, 12 Nov 2007) New Revision: 25932 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25932 Log: Remove unnecessary include - should fix the build on hosts without popt. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/registry/tests/diff.c branches/SAMBA_4_0/source/lib/registry/tests/generic.c branches/SAMBA_4_0/source/lib/registry/tests/hive.c branches/SAMBA_4_0/source/lib/registry/tests/registry.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/registry/tests/diff.c === --- branches/SAMBA_4_0/source/lib/registry/tests/diff.c 2007-11-12 00:05:10 UTC (rev 25931) +++ branches/SAMBA_4_0/source/lib/registry/tests/diff.c 2007-11-12 17:22:12 UTC (rev 25932) @@ -21,7 +21,6 @@ #include includes.h #include lib/registry/registry.h -#include lib/cmdline/popt_common.h #include torture/torture.h #include librpc/gen_ndr/winreg.h Modified: branches/SAMBA_4_0/source/lib/registry/tests/generic.c === --- branches/SAMBA_4_0/source/lib/registry/tests/generic.c 2007-11-12 00:05:10 UTC (rev 25931) +++ branches/SAMBA_4_0/source/lib/registry/tests/generic.c 2007-11-12 17:22:12 UTC (rev 25932) @@ -21,7 +21,6 @@ #include includes.h #include lib/registry/registry.h -#include lib/cmdline/popt_common.h #include torture/torture.h #include librpc/gen_ndr/winreg.h Modified: branches/SAMBA_4_0/source/lib/registry/tests/hive.c === --- branches/SAMBA_4_0/source/lib/registry/tests/hive.c 2007-11-12 00:05:10 UTC (rev 25931) +++ branches/SAMBA_4_0/source/lib/registry/tests/hive.c 2007-11-12 17:22:12 UTC (rev 25932) @@ -22,7 +22,6 @@ #include includes.h #include lib/registry/registry.h -#include lib/cmdline/popt_common.h #include torture/torture.h #include librpc/gen_ndr/winreg.h #include system/filesys.h Modified: branches/SAMBA_4_0/source/lib/registry/tests/registry.c === --- branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-11-12 00:05:10 UTC (rev 25931) +++ branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-11-12 17:22:12 UTC (rev 25932) @@ -22,7 +22,6 @@ #include includes.h #include lib/registry/registry.h -#include lib/cmdline/popt_common.h #include torture/torture.h #include librpc/gen_ndr/winreg.h #include libcli/security/security.h
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-304-g5d1d650
The branch, v3-2-test has been updated via 5d1d650d192d4782421b5c3c2be1b632d4318279 (commit) from c15819b75751a1e15cfed2ef94dae10ee72d769c (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 5d1d650d192d4782421b5c3c2be1b632d4318279 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Nov 12 11:39:35 2007 -0800 Fix bug #5073. Allow delete readonly = yes to correctly override deletion of a file. Fix from David Shaw [EMAIL PROTECTED] Jeremy. --- Summary of changes: source/smbd/nttrans.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 4bd4571..f07d64e 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -788,7 +788,8 @@ void reply_ntcreate_and_X(connection_struct *conn, (create_disposition != FILE_CREATE) (share_access FILE_SHARE_DELETE) (access_mask DELETE_ACCESS)) { - if ((dos_mode(conn, fname, sbuf) FILE_ATTRIBUTE_READONLY) || + if (((dos_mode(conn, fname, sbuf) FILE_ATTRIBUTE_READONLY) +!lp_delete_readonly(SNUM(conn))) || !can_delete_file_in_directory(conn, fname)) { TALLOC_FREE(case_state); reply_nterror(req, NT_STATUS_ACCESS_DENIED); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-305-geaf14c7
The branch, v3-2-test has been updated via eaf14c701b08e9eff5b94bf57af68cb29142d7fc (commit) from 5d1d650d192d4782421b5c3c2be1b632d4318279 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit eaf14c701b08e9eff5b94bf57af68cb29142d7fc Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Nov 12 15:02:50 2007 -0800 Remove all pstrings from smbd/chgpasswd.c. Jeremy. --- Summary of changes: source/lib/util_str.c | 64 +++- source/libsmb/smbencrypt.c | 36 ++--- source/rpc_server/srv_samr_nt.c | 58 --- source/smbd/chgpasswd.c | 157 ++- 4 files changed, 191 insertions(+), 124 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/util_str.c b/source/lib/util_str.c index f1078c6..6d429e3 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1254,22 +1254,27 @@ char *realloc_string_sub(char *string, const char *pattern, return string; } -/* Same as string_sub, but returns a talloc'ed string */ +/* + * Internal guts of talloc_string_sub and talloc_all_string_sub. + * 'filter' differentiates between them. + */ -char *talloc_string_sub(TALLOC_CTX *mem_ctx, const char *src, - const char *pattern, const char *insert) +static char *talloc_string_sub_internal(TALLOC_CTX *mem_ctx, const char *src, + const char *pattern, const char *insert, bool filter) { char *p, *in; char *s; char *string; ssize_t ls,lp,li,ld, i; - if (!insert || !pattern || !*pattern || !src || !*src) + if (!insert || !pattern || !*pattern || !src || !*src) { return NULL; + } string = talloc_strdup(mem_ctx, src); if (string == NULL) { - DEBUG(0, (talloc_strdup failed\n)); + DEBUG(0, (talloc_string_sub_internal: + talloc_strdup failed\n)); return NULL; } @@ -1277,27 +1282,30 @@ char *talloc_string_sub(TALLOC_CTX *mem_ctx, const char *src, in = SMB_STRDUP(insert); if (!in) { - DEBUG(0, (talloc_string_sub: out of memory!\n)); + DEBUG(0, (talloc_string_sub_internal: ENOMEM\n)); return NULL; } ls = (ssize_t)strlen(s); lp = (ssize_t)strlen(pattern); li = (ssize_t)strlen(insert); ld = li - lp; - for (i=0;ili;i++) { - switch (in[i]) { - case '`': - case '': - case '\'': - case ';': - case '$': - case '%': - case '\r': - case '\n': - in[i] = '_'; - default: - /* ok */ - break; + + if (filter) { + for (i=0;ili;i++) { + switch (in[i]) { + case '`': + case '': + case '\'': + case ';': + case '$': + case '%': + case '\r': + case '\n': + in[i] = '_'; + default: + /* ok */ + break; + } } } @@ -1325,6 +1333,14 @@ char *talloc_string_sub(TALLOC_CTX *mem_ctx, const char *src, return string; } +/* Same as string_sub, but returns a talloc'ed string */ + +char *talloc_string_sub(TALLOC_CTX *mem_ctx, const char *src, + const char *pattern, const char *insert) +{ + return talloc_string_sub_internal(mem_ctx, src, pattern, insert, true); +} + /** Similar to string_sub() but allows for any character to be substituted. Use with caution! @@ -1367,6 +1383,14 @@ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len) } } +char *talloc_all_string_sub(TALLOC_CTX *ctx, + const char *src, + const char *pattern, + const char *insert) +{ + return talloc_string_sub_internal(ctx, src, pattern, insert, false); +} + /** Similar to all_string_sub but for unicode strings. Return a new allocated unicode string. diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 20eddff..77ff063 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -522,12 +522,17 @@ bool
Rev 678: make election handling much more scalable in http://samba.org/~tridge/ctdb
revno: 678 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2007-11-13 10:27:44 +1100 message: make election handling much more scalable modified: server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 === modified file 'server/ctdb_recoverd.c' --- a/server/ctdb_recoverd.c2007-10-22 02:34:08 + +++ b/server/ctdb_recoverd.c2007-11-12 23:27:44 + @@ -47,6 +47,8 @@ bool need_takeover_run; bool need_recovery; uint32_t node_flags; + struct timed_event *send_election_te; + struct timed_event *election_timeout; }; #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb-tunable.recover_timeout, 0) @@ -714,6 +716,29 @@ } } +/* + called when an election times out (ends) + */ +static void ctdb_election_timeout(struct event_context *ev, struct timed_event *te, + struct timeval t, void *p) +{ + struct ctdb_recoverd *rec = talloc_get_type(p, struct ctdb_recoverd); + rec-election_timeout = NULL; +} + + +/* + wait for an election to finish. It finished election_timeout seconds after + the last election packet is received + */ +static void ctdb_wait_election(struct ctdb_recoverd *rec) +{ + struct ctdb_context *ctdb = rec-ctdb; + while (rec-election_timeout) { + event_loop_once(ctdb-ev); + } +} + /* update our local flags from all remote connected nodes. @@ -1099,7 +1124,7 @@ /* send out an election request */ -static int send_election_request(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx, uint32_t pnn) +static int send_election_request(struct ctdb_recoverd *rec, uint32_t pnn) { int ret; TDB_DATA election_data; @@ -1156,6 +1181,24 @@ talloc_free(tmp_ctx); } + +/* + we think we are winning the election - send a broadcast election request + */ +static void election_send_request(struct event_context *ev, struct timed_event *te, struct timeval t, void *p) +{ + struct ctdb_recoverd *rec = talloc_get_type(p, struct ctdb_recoverd); + int ret; + + ret = send_election_request(rec, ctdb_get_pnn(rec-ctdb)); + if (ret != 0) { + DEBUG(0,(Failed to send election request!\n)); + } + + talloc_free(rec-send_election_te); + rec-send_election_te = NULL; +} + /* handler for recovery master elections */ @@ -1167,6 +1210,12 @@ struct election_message *em = (struct election_message *)data.dptr; TALLOC_CTX *mem_ctx; + /* we got an election packet - update the timeout for the election */ + talloc_free(rec-election_timeout); + rec-election_timeout = event_add_timed(ctdb-ev, ctdb, + timeval_current_ofs(ctdb-tunable.election_timeout, 0), + ctdb_election_timeout, rec); + mem_ctx = talloc_new(ctdb); /* someone called an election. check their election data @@ -1174,14 +1223,19 @@ send a new election message to all other nodes */ if (ctdb_election_win(rec, em)) { - ret = send_election_request(rec, mem_ctx, ctdb_get_pnn(ctdb)); - if (ret!=0) { - DEBUG(0, (__location__ failed to initiate recmaster election)); + if (!rec-send_election_te) { + rec-send_election_te = event_add_timed(ctdb-ev, rec, + timeval_current_ofs(0, 50), + election_send_request, rec); } talloc_free(mem_ctx); /*unban_all_nodes(ctdb);*/ return; } + + /* we didn't win */ + talloc_free(rec-send_election_te); + rec-send_election_te = NULL; /* release the recmaster lock */ if (em-pnn != ctdb-pnn @@ -1225,15 +1279,20 @@ DEBUG(0, (__location__ Unable to set recovery mode to active on cluster\n)); return; } - - ret = send_election_request(rec, mem_ctx, pnn); + + talloc_free(rec-election_timeout); + rec-election_timeout = event_add_timed(ctdb-ev, ctdb, + timeval_current_ofs(ctdb-tunable.election_timeout, 0), + ctdb_election_timeout, rec); + + ret = send_election_request(rec, pnn); if (ret!=0) { DEBUG(0, (__location__ failed to initiate recmaster election)); return; } /* wait for a few seconds to collect all responses */ - ctdb_wait_timeout(ctdb, ctdb-tunable.election_timeout); + ctdb_wait_election(rec); } @@ -1551,6 +1610,11 @@
Rev 679: make it easier to test starting large numbers of virtual nodes in http://samba.org/~tridge/ctdb
revno: 679 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2007-11-13 10:28:06 +1100 message: make it easier to test starting large numbers of virtual nodes modified: tests/ctdbd.sh ctdbd.sh-20070411085038-phusiewluwzyqjpc-2 tests/fetch.sh fetch.sh-20070405031756-lomzqpjyqg3xd1kv-1 tests/persistent.shpersistent.sh-20070921022335-ytbefhrr45n2mc3j-1 tests/start_daemons.sh start_daemons.sh-20070604074603-fbb8x90srun04xn0-1 === modified file 'tests/ctdbd.sh' --- a/tests/ctdbd.sh2007-06-04 09:53:19 + +++ b/tests/ctdbd.sh2007-11-12 23:28:06 + @@ -2,7 +2,7 @@ killall -q ctdbd -tests/start_daemons.sh 2 tests/nodes.txt || exit 1 +tests/start_daemons.sh 2 || exit 1 echo Testing ping $VALGRIND bin/ctdb ping || exit 1 === modified file 'tests/fetch.sh' --- a/tests/fetch.sh2007-06-04 07:46:37 + +++ b/tests/fetch.sh2007-11-12 23:28:06 + @@ -5,12 +5,7 @@ NUMNODES=$1 fi -rm -f nodes.txt -for i in `seq 1 $NUMNODES`; do - echo 127.0.0.$i nodes.txt -done - -tests/start_daemons.sh $NUMNODES nodes.txt || exit 1 +tests/start_daemons.sh $NUMNODES || exit 1 killall -9 -q ctdb_fetch === modified file 'tests/persistent.sh' --- a/tests/persistent.sh 2007-09-21 02:24:02 + +++ b/tests/persistent.sh 2007-11-12 23:28:06 + @@ -5,12 +5,7 @@ NUMNODES=$1 fi -rm -f nodes.txt -for i in `seq 1 $NUMNODES`; do - echo 127.0.0.$i nodes.txt -done - -tests/start_daemons.sh $NUMNODES nodes.txt || exit 1 +tests/start_daemons.sh $NUMNODES || exit 1 killall -9 -q ctdb_persistent === modified file 'tests/start_daemons.sh' --- a/tests/start_daemons.sh2007-09-21 02:24:02 + +++ b/tests/start_daemons.sh2007-11-12 23:28:06 + @@ -1,9 +1,17 @@ #!/bin/sh -NUMNODES=$1 -NODES=$2 -shift -shift +NUMNODES=2 +if [ $# -gt 0 ]; then +NUMNODES=$1 +fi +NODES=nodes.txt +shift +shift + +rm -f nodes.txt +for i in `seq 1 $NUMNODES`; do + echo 127.0.0.$i nodes.txt +done killall -q ctdbd
Build status as of Tue Nov 13 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-11-12 00:00:37.0 + +++ /home/build/master/cache/broken_results.txt 2007-11-13 00:01:00.0 + @@ -1,4 +1,4 @@ -Build status as of Mon Nov 12 00:00:02 2007 +Build status as of Tue Nov 13 00:00:02 2007 Build counts: Tree Total Broken Panic @@ -16,7 +16,7 @@ rsync29 15 0 samba-docs 0 0 0 samba-gtk2 2 0 -samba4 26 20 0 +samba4 26 25 0 samba_3_20 0 0 samba_3_2_test 28 18 0 smb-build28 28 0
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-306-g7bfd25c
The branch, v3-2-test has been updated via 7bfd25c75602e25da73710261a54da8e0feea133 (commit) from eaf14c701b08e9eff5b94bf57af68cb29142d7fc (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 7bfd25c75602e25da73710261a54da8e0feea133 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Nov 12 17:59:18 2007 -0800 Remove pstrings from lanman.c Jeremy. --- Summary of changes: source/smbd/lanman.c | 202 - 1 files changed, 148 insertions(+), 54 deletions(-) Changeset truncated at 500 lines: diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index 440b928..4bd59a7 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -77,26 +77,43 @@ static bool api_TooSmall(connection_struct *conn, uint16 vuid, char *param, char int *rdata_len, int *rparam_len); -static int CopyExpanded(connection_struct *conn, - int snum, char **dst, char *src, int *n) +static int CopyExpanded(connection_struct *conn, + int snum, char **dst, char *src, int *p_space_remaining) { - pstring buf; + TALLOC_CTX *ctx = talloc_tos(); + char *buf = NULL; int l; - if (!src || !dst || !n || !(*dst)) { + if (!src || !dst || !p_space_remaining || !(*dst) || + *p_space_remaining = 0) { return 0; } - StrnCpy(buf,src,sizeof(buf)/2); - pstring_sub(buf,%S,lp_servicename(snum)); - standard_sub_advanced(lp_servicename(SNUM(conn)), conn-user, - conn-connectpath, conn-gid, - get_current_username(), - current_user_info.domain, - buf, sizeof(buf)); - l = push_ascii(*dst,buf,*n, STR_TERMINATE); + buf = talloc_strdup(ctx, src); + if (!buf) { + *p_space_remaining = 0; + return 0; + } + buf = talloc_string_sub(ctx, buf,%S,lp_servicename(snum)); + if (!buf) { + *p_space_remaining = 0; + return 0; + } + buf = talloc_sub_advanced(ctx, + lp_servicename(SNUM(conn)), + conn-user, + conn-connectpath, + conn-gid, + get_current_username(), + current_user_info.domain, + buf); + if (!buf) { + *p_space_remaining = 0; + return 0; + } + l = push_ascii(*dst,buf,*p_space_remaining, STR_TERMINATE); (*dst) += l; - (*n) -= l; + (*p_space_remaining) -= l; return l; } @@ -114,32 +131,57 @@ static int CopyAndAdvance(char **dst, char *src, int *n) static int StrlenExpanded(connection_struct *conn, int snum, char *s) { - pstring buf; + TALLOC_CTX *ctx = talloc_tos(); + char *buf = NULL; if (!s) { return 0; } - StrnCpy(buf,s,sizeof(buf)/2); - pstring_sub(buf,%S,lp_servicename(snum)); - standard_sub_advanced(lp_servicename(SNUM(conn)), conn-user, - conn-connectpath, conn-gid, - get_current_username(), - current_user_info.domain, - buf, sizeof(buf)); + buf = talloc_strdup(ctx,s); + if (!buf) { + return 0; + } + buf = talloc_string_sub(ctx,buf,%S,lp_servicename(snum)); + if (!buf) { + return 0; + } + buf = talloc_sub_advanced(ctx, + lp_servicename(SNUM(conn)), + conn-user, + conn-connectpath, + conn-gid, + get_current_username(), + current_user_info.domain, + buf); + if (!buf) { + return 0; + } return strlen(buf) + 1; } static char *Expand(connection_struct *conn, int snum, char *s) { - pstring buf; + TALLOC_CTX *ctx = talloc_tos(); + char *buf = NULL; + if (!s) { return NULL; } - StrnCpy(buf,s,sizeof(buf)/2); - pstring_sub(buf,%S,lp_servicename(snum)); - return talloc_sub_advanced(talloc_tos(), lp_servicename(SNUM(conn)), - conn-user, conn-connectpath, conn-gid, - get_current_username(), - current_user_info.domain, buf); + buf = talloc_strdup(ctx,s); + if (!buf) { + return 0; + }
svn commit: samba r25934 - in branches/SAMBA_4_0/source/lib/ldb/common: .
Author: abartlet Date: 2007-11-13 04:32:36 + (Tue, 13 Nov 2007) New Revision: 25934 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25934 Log: Handle a LDB_ERR_NO_SUCH_OBJECT return value when looking for the modules. This will be useful when we start enforcing validity in base DNs. Andrew Bartlett Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-11-13 04:31:28 UTC (rev 25933) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-11-13 04:32:36 UTC (rev 25934) @@ -323,24 +323,27 @@ ret = ldb_search(ldb, mods_dn, LDB_SCOPE_BASE, , attrs, res); - if (ret != LDB_SUCCESS) { + if (ret == LDB_ERR_NO_SUCH_OBJECT) { + ldb_debug(ldb, LDB_DEBUG_TRACE, no modules required by the db); + } else if (ret != LDB_SUCCESS) { ldb_debug(ldb, LDB_DEBUG_FATAL, ldb error (%s) occurred searching for modules, bailing out\n, ldb_errstring(ldb)); talloc_free(mem_ctx); return -1; - } - talloc_steal(mods_dn, res); - if (res-count == 0 || res-msgs[0]-num_elements == 0) { - ldb_debug(ldb, LDB_DEBUG_TRACE, no modules required by the db); } else { - if (res-count 1) { - ldb_debug(ldb, LDB_DEBUG_FATAL, Too many records found (%d), bailing out\n, res-count); - talloc_free(mem_ctx); - return -1; + talloc_steal(mods_dn, res); + if (res-count == 0 || res-msgs[0]-num_elements == 0) { + ldb_debug(ldb, LDB_DEBUG_TRACE, no modules required by the db); + } else { + if (res-count 1) { + ldb_debug(ldb, LDB_DEBUG_FATAL, Too many records found (%d), bailing out\n, res-count); + talloc_free(mem_ctx); + return -1; + } + + modules = ldb_modules_list_from_string(ldb, mem_ctx, + (const char *)res-msgs[0]-elements[0].values[0].data); + } - - modules = ldb_modules_list_from_string(ldb, mem_ctx, - (const char *)res-msgs[0]-elements[0].values[0].data); - } talloc_free(mods_dn);
svn commit: samba r25935 - in branches/SAMBA_4_0: . source/lib/registry source/lib/registry/tests source/torture/local
Author: jelmer Date: 2007-11-13 04:57:09 + (Tue, 13 Nov 2007) New Revision: 25935 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25935 Log: Fix registry tests. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/registry/config.mk branches/SAMBA_4_0/source/lib/registry/tests/generic.c branches/SAMBA_4_0/source/torture/local/config.mk branches/SAMBA_4_0/source/torture/local/local.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/registry/config.mk === --- branches/SAMBA_4_0/source/lib/registry/config.mk2007-11-13 04:32:36 UTC (rev 25934) +++ branches/SAMBA_4_0/source/lib/registry/config.mk2007-11-13 04:57:09 UTC (rev 25935) @@ -92,10 +92,9 @@ # End BINARY regtree -[MODULE::TORTURE_REGISTRY] -SUBSYSTEM = torture -INIT_FUNCTION = torture_registry_init +[SUBSYSTEM::torture_registry] PRIVATE_DEPENDENCIES = registry +PRIVATE_PROTO_HEADER = tests/proto.h OBJ_FILES = \ tests/generic.o \ tests/hive.o \ Modified: branches/SAMBA_4_0/source/lib/registry/tests/generic.c === --- branches/SAMBA_4_0/source/lib/registry/tests/generic.c 2007-11-13 04:32:36 UTC (rev 25934) +++ branches/SAMBA_4_0/source/lib/registry/tests/generic.c 2007-11-13 04:57:09 UTC (rev 25935) @@ -111,9 +111,9 @@ return true; } -_PUBLIC_ NTSTATUS torture_registry_init(void) +_PUBLIC_ struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx) { - struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), LOCAL-REGISTRY); + struct torture_suite *suite = torture_suite_create(mem_ctx, REGISTRY); torture_suite_add_simple_test(suite, str_regtype, test_str_regtype); torture_suite_add_simple_test(suite, reg_val_data_string dword, @@ -133,7 +133,5 @@ torture_suite_add_suite(suite, torture_registry_registry(suite)); torture_suite_add_suite(suite, torture_registry_diff(suite)); - torture_register_suite(suite); - - return NT_STATUS_OK; + return suite; } Modified: branches/SAMBA_4_0/source/torture/local/config.mk === --- branches/SAMBA_4_0/source/torture/local/config.mk 2007-11-13 04:32:36 UTC (rev 25934) +++ branches/SAMBA_4_0/source/torture/local/config.mk 2007-11-13 04:57:09 UTC (rev 25935) @@ -41,6 +41,7 @@ TORTURE_AUTH \ TORTURE_UTIL \ TORTURE_NDR \ - share + share \ + torture_registry # End SUBSYSTEM TORTURE_LOCAL # Modified: branches/SAMBA_4_0/source/torture/local/local.c === --- branches/SAMBA_4_0/source/torture/local/local.c 2007-11-13 04:32:36 UTC (rev 25934) +++ branches/SAMBA_4_0/source/torture/local/local.c 2007-11-13 04:57:09 UTC (rev 25935) @@ -24,6 +24,7 @@ #include torture/ndr/proto.h #include torture/auth/proto.h #include lib/crypto/test_proto.h +#include lib/registry/tests/proto.h /* ignore me */ static struct torture_suite * (*suite_generators[]) (TALLOC_CTX *mem_ctx) = @@ -51,6 +52,7 @@ torture_local_event, torture_local_torture, torture_local_dbspeed, + torture_registry, NULL };