[Samba] Logon drive
Hi. In my smb.conf file I configured the value logon drive on h:, but I don't have the H: drive on no clients after the logon to the PDC. And in the netlogon script the variable %U isn't recognised, if I wish to connect my home directory by hand. Where is the mistake? Thank you very much! Bye. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Create/Modified stamp issue
Dear all, At present when viewing file properties in windows of a file on my samba share both the created and modified time stamps change to exactly the same time whenever a file edit takes place. Is this default samba behaviour, a problem with filesystem attrib mapping in samba, or a problem with my config? Has anyone else seen this? Best Regards, Mark -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] the system cannot find message text for message number 0x%1 in the message file for %2
Hi! I've got some problem logging in to my Samba primary domain. I'm using LDAP for authentication and Samba for PDC. After I've populated my LDAP with Samba schema, an uid=Administrator Domain Administrator account automatically appeared. I can log in with this user (Administrator), but if I create a new user (Domain User in LDAP schema) WinXP Pro says the following: the system cannot find message text for message number 0x%1 in the message file for %2. After massive googleing i couldn't find anything but that this error is caused by Windows' smart card login feature. After I disabled that in MMC nothing happend, the problem still persists. What am I doing wrong? Thanks, -- Döme -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Logon drive
shacky schrieb: Hi. In my smb.conf file I configured the value logon drive on h:, but I don't have the H: drive on no clients after the logon to the PDC. And in the netlogon script the variable %U isn't recognised, if I wish to connect my home directory by hand. Where is the mistake? Thank you very much! Bye. Hi! Try net use h: /HOME /yes in your /etc/samba/netlogon/logon.bat script. readU Frank readU Frank -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Problems with Samba and ACLs
Hello everybody, i have use samba (3.0) as a PDC in my company. The file tree was growing so a had to use POSIX ACLs for the file permissions. The problem is when a user creates a new file or modify an existing one, the ACLs turn to a mess. For example, i have a dir where the users of a group has only read permissions, on of them must have write permissions. When this writer user creates a new file, he cannot rename it, or delete it, even being the owner of the file. This problem only occurs when the users are using from a windows client machine. If i try it in the linux server, the ACLs works fine. I have a ubuntu 7.04 with kernel 2.6 with ACLs and EAs enabled. Thanks for every help -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Problems with Samba and ACLs
I'll have to see if I can dig up my notes, but I saw this as well and was able to fix it. Can you post your smb.conf? Aaron Kincer On Nov 5, 2007 10:30 AM, Bruno Pirajá Moyle [EMAIL PROTECTED] wrote: Hello everybody, i have use samba (3.0) as a PDC in my company. The file tree was growing so a had to use POSIX ACLs for the file permissions. The problem is when a user creates a new file or modify an existing one, the ACLs turn to a mess. For example, i have a dir where the users of a group has only read permissions, on of them must have write permissions. When this writer user creates a new file, he cannot rename it, or delete it, even being the owner of the file. This problem only occurs when the users are using from a windows client machine. If i try it in the linux server, the ACLs works fine. I have a ubuntu 7.04 with kernel 2.6 with ACLs and EAs enabled. Thanks for every help -- 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
[Samba] logon script to start a website
Hello, Is there a way in logonscript.bat to start a website with some address. @start my current default browser http://google.com; ? How would a script line for that look? Does anybody have one done already and if so could you sent it to me? Thank you, Lucas -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Error looking up domain groups
Hi people: I have a samba 3.0.24 configured to act like a member domain and the winbind -g gives me: Error looking up domain groups. This is a problem coz' I can't assing permissions to by group. If you can enlightme with a solution... tnxs in advance.. This is my smb.conf: [global] #Network ID workgroup = JUSBAIRES netbios name = BERUTI-CUPS server string = #Logs debug level = 0 syslog = 0 log level = 20 log file = /var/log/samba/%m.%U.log max log size = 1 panic action = /usr/share/samba/panic-action %d #Network Support name resolve order = wins hosts lmhosts bcast socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535 IPTOS_LOWDELAY SO_KEEPALIVE wins support = no wins proxy = no wins server = 10.3.0.1 enhanced browsing = yes dns proxy = no time server = no local master = no smb ports = 139 #Printer Options printcap name = cups printing = cups load printers = yes cups server = beruti-cups.jusbaires.gov.ar #Security Options admin users = @cupsadmin dos charset = CP850 unix charset = 850 display charset = LOCALE nt acl support = no restrict anonymous = 1 security = domain password server = 10.3.0.1 winbind separator = \ winbind cache time = 300 winbind enum users = Yes winbind enum groups = Yes winbind use default domain = Yes winbind trusted domains only = Yes winbind nested groups = Yes winbind nss info = template winbind refresh tickets = No winbind offline logon = No idmap gid = 1-2 idmap uid = 1-2 include = /etc/samba/printers.conf And this is the log of the winbind when I do a wbinfo -g: adding IPC service added interface ip=10.3.0.6 bcast=10.3.255.255 nmask=255.255.0.0 added interface ip=10.3.0.6 bcast=10.3.255.255 nmask=255.255.0.0 TimeInit: Serverzone is 10800 Registered MSG_REQ_POOL_USAGE Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED Added domain JUSBAIRES S-1-5-21-2281447165-45835457-3575675572 Added domain BERUTI-CUPS S-1-5-21-1768017637-2019550423-1176766642 Added domain BUILTIN S-1-5-32 child daemon request 41 cm_get_ipc_userpass: No auth-user defined Doing spnego session setup (blob length=58) got OID=1 3 6 1 4 1 311 2 2 10 got principal=NONE Got challenge flags: Got NTLMSSP neg_flags=0x60890215 NTLMSSP_NEGOTIATE_UNICODE NTLMSSP_REQUEST_TARGET NTLMSSP_NEGOTIATE_SIGN NTLMSSP_NEGOTIATE_NTLM NTLMSSP_NEGOTIATE_NTLM2 NTLMSSP_CHAL_TARGET_INFO NTLMSSP_NEGOTIATE_128 NTLMSSP_NEGOTIATE_KEY_EXCH NTLMSSP: Set final flags: Got NTLMSSP neg_flags=0x60080215 NTLMSSP_NEGOTIATE_UNICODE NTLMSSP_REQUEST_TARGET NTLMSSP_NEGOTIATE_SIGN NTLMSSP_NEGOTIATE_NTLM NTLMSSP_NEGOTIATE_NTLM2 NTLMSSP_NEGOTIATE_128 NTLMSSP_NEGOTIATE_KEY_EXCH NTLMSSP Sign/Seal - Initialising with flags: Got NTLMSSP neg_flags=0x60080215 NTLMSSP_NEGOTIATE_UNICODE NTLMSSP_REQUEST_TARGET NTLMSSP_NEGOTIATE_SIGN NTLMSSP_NEGOTIATE_NTLM NTLMSSP_NEGOTIATE_NTLM2 NTLMSSP_NEGOTIATE_128 NTLMSSP_NEGOTIATE_KEY_EXCH authenticated session setup failed with Logon failure rpc_pipe_bind: Remote machine SERVER pipe \lsarpc fnum 0x753a bind request returned ok. cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_OP_RNG_ERROR received from remote machine SERVER pipe \lsarpc fnum 0x753a! child daemon request 18 [10793]: list trusted domains Using cleartext machine password rpc_pipe_bind: Remote machine SERVER pipe \NETLOGON fnum 0x753b bind request returned ok. cli_net_req_chal: LSA Request Challenge from BERUTI-CUPS to \\SERVER cli_net_auth2: srv:\\SERVER acct:BERUTI-CUPS$ sc:2 mc: BERUTI-CUPS neg: 400701ff rpc_pipe_bind: Remote machine SERVER pipe \NETLOGON fnum 0x753c bind request returned ok. rpc_pipe_bind: Remote machine SERVER pipe \samr fnum 0x753d bind request returned ok. rpc: trusted_domains rpc_pipe_bind: Remote machine SERVER pipe \lsarpc fnum 0x753e bind request returned ok. lsa_io_sec_qos: length c does not match size 8 [0]: request interface version [0]: request location of privileged pipe [0]: list groups get_sam_group_entries: BUILTIN or local domain; enumerating local groups as well get_sam_group_entries: Failed to enumerate domain local groups! get_sam_group_entries: BUILTIN or local domain; enumerating local groups as well get_sam_group_entries: Failed to enumerate domain local groups! rpc: enum_dom_groups cm_get_ipc_userpass: No auth-user defined Doing spnego session setup (blob length=58) got OID=1 3 6 1 4 1 311 2 2 10 got principal=NONE Got challenge flags: Got NTLMSSP neg_flags=0x60890215 NTLMSSP_NEGOTIATE_UNICODE NTLMSSP_REQUEST_TARGET NTLMSSP_NEGOTIATE_SIGN NTLMSSP_NEGOTIATE_NTLM NTLMSSP_NEGOTIATE_NTLM2 NTLMSSP_CHAL_TARGET_INFO NTLMSSP_NEGOTIATE_128 NTLMSSP_NEGOTIATE_KEY_EXCH NTLMSSP:
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
[Samba] use of pam_filter with LDAP
Hello I would like to use pam filters to authenticate users on LDAP 2.3 with Samba-3.0.26a on a Fedora Core 7 For information,samba is compiled with the --with-ldapsam option (2.0 LDAP schema) Basic LDAP authentication works well, when I type 'getent passwd', all my users are displayed. Now I want to use the pam_filter option in the /etc/ldap.conf file, but I can't make it work : For example, with pam_filter objectclass=supannPerson, getent passwd returns the same list as when I don't use the filters - Here's the ldap.conf file : base dc=tata,dc=toto,dc=fr binddn cn=X,dc=tata,dc=toto,dc=fr bindpw XX scope sub pam_filter objectclass=supannPerson # We don't use the uid attribute to authenticate the users nss_map_attribute uid iufmLogin # Default options port 389 timelimit 120 bind_timelimit 120 idle_timelimit 3600 nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd uri ldap://127.0.0.1/ ssl no tls_cacertdir /etc/openldap/cacerts pam_password md5 - Here the nsswitch.conf file : [...] passwd: files ldap shadow: files ldap group: files ldap [...] - Here the [global] section of the smb.conf (only the ldap options) [global] [...] # Parametres ldap ldap admin dn=cn=X,dc=tata,dc=toto,dc=fr ldap ssl = no # OLD directive ldap filter : #ldap filter = ((iufmLogin=%u)(gecos=#*)) [...] Anyone can help me with the use of the pam_filter option ? Thanks Norbert -- 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
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
[Samba] Hosts leaving domain without reasons...
Hello all, I've got Samba 3.0.24-6etch4 (Debian revision) running on a production server which acts as a PDC for a network of some Windows XP clients (around 250). Since sometime (I am not able to determine exactly when) I get a strange problem arising : some clients are banned from my domain. The only solution I found is to reintroduced the clients into the domain. Once hosts have rejoined the domain, everything seems fine except that some weeks later, the same problem arise again and again. After having reread the fantastic manual I did not find any explanation. I have googled a lot (try googling the sentence _net_auth2: creds_server_check failed. Rejecting auth request from client for instance) and see I am not the only one to get this kind of trouble but no solution seems to be available, or at least stored on the net. I do not understand where the problem come from, and what is the solution (I did not find anything useful into the documentation). Could you direct me into the good directions ? My current solution, which consist of reintregate the machines into the domain, is not very funny since I get more than 250 differents XP boxes :-( I attach you my smb.conf file as well as a log entry which seems to appear when the problem begins, in case it can help. Thank's for any help ... -- [2007/11/05 09:48:35, 0] rpc_server/srv_netlog_nt.c:_net_auth_2(478) _net_auth2: creds_server_check failed. Rejecting auth request from client XPCOMPLET machine account XPCOMPLET$ -- ## # # Les conventions utilisees : # # * On utilise : # * 'read only' et pas 'writeable' # * 'browseable' et pas 'browsable' # # * Tous les partages doivent explicitement avoir des valeurs, dans l'ordre, # pour les options : # * 'comment' # * 'path' # * 'read only' # * 'browseable' # ## ## # # Variables globales # ## [global] security = user # # Identification # netbios name = ORANGER workgroup = IUT_INFO_ENS server string = Controleur du domaine IUT_INFO_ENS # # Nommage NetBios # os level = 254 preferred master = yes domain master = yes local master = yes wins support = yes # # Temps # time server = yes # # Gestion des mots de passes # enable privileges = yes encrypt passwords = true passdb backend = tdbsam:/srv/samba/passdb.tdb #OFF#unix password sync = yes #OFF#passwd program = /srv/sbin/nispasswd --user %u passwd chat =New password: %n\n #OFF# add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u # On change les mots de passe des machines tous les 50 ans (pour la machine locale) machine password timeout = 157248 #OFF# min password length = 4 # # Logging # debug level = 1 syslog = 0 max log size = 50 panic action = /usr/share/samba/panic-action %d # # Support du logon de domaine # domain logons = yes logon drive = z: # TODO: verifier que ce logon path fonctionne logon path = \\oranger\profiles #OFF# logon script = ## # # Logon et profiles windows # ## [netlogon] comment = Connexion SMB path = /srv/samba/netlogon read only = yes browseable = yes write list = @sysadmin [profiles] comment = Stockage des profiles path = /baie/home/%G/%U/.windows read only = no browseable = no create mask = 0600 directory mask = 0700 ## # # Les repertoires des utilisateurs # ## [homes] comment = Donnees de %U path = /baie/home/%G/%U read only = no browseable = yes ## # # Les autres partages # ## [public] comment = Espace de partage path = /baie/home/public read only = no browseable = yes guest ok = yes write list = @sysadmin, @infoens, @infoext [logiciels]
[Samba] smbldap_tools error
I'm following along in the Samba 3 By Example.pdf and on Page 190 it has me run: [EMAIL PROTECTED] ~]# smbldap-useradd -m -a test2 No such object at /usr/sbin//smbldap_tools.pm line 473. I am running smbldap_tools .0.9.4 and I have ran configure.pm and set it up correctly. The stanza in the code of line 473: # all entries = does_sid_exist($sid,$config{scope}) sub does_sid_exist { my $sid = shift; my $dn_group=shift; my $mesg = $ldap-search (base = $dn_group, scope = $config{scope}, filter = (sambaSID=$sid) #filter = ((objectClass=sambaSAMAccount|ob$ ); $mesg-code die $mesg-error; #this is line 473 return ($mesg); } but I'm not sure why I am getting that error. (sambaSID=$sid) is populated in OpenLDAP: ldapsearch -x -b 'dc=gomer,dc=mdah,dc=state,dc=ms,dc=us' '(sambaSID=*)' |more # extended LDIF # # LDAPv3 # base dc=gomer,dc=mdah,dc=state,dc=ms,dc=us with scope subtree # filter: (sambaSID=*) # requesting: ALL # # ADMIN, gomer.mdah.state.ms.us dn: sambaDomainName=ADMIN,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us sambaAlgorithmicRidBase: 1000 sambaNextUserRid: 1000 gidNumber: 1000 sambaDomainName: ADMIN sambaSID: S-1-5-21-264571052-2849996808-2029774292 sambaNextRid: 1000 objectClass: top objectClass: sambaDomain objectClass: sambaUnixIdPool uidNumber: 1004 # root, Users, gomer.mdah.state.ms.us dn: uid=root,ou=Users,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us cn: root sn: root objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: sambaSamAccount objectClass: posixAccount objectClass: shadowAccount gidNumber: 0 uid: root uidNumber: 0 homeDirectory: /home/root sambaLogonTime: 0 sambaLogoffTime: 2147483647 sambaKickoffTime: 2147483647 sambaPwdCanChange: 0 sambaHomePath: \\GOMER\homes\root sambaHomeDrive: r: sambaProfilePath: \\GOMER\profiles\root sambaPrimaryGroupSID: S-1-5-21-264571052-2849996808-2029774292-512 sambaSID: S-1-5-21-264571052-2849996808-2029774292-500 loginShell: /bin/false gecos: Netbios Domain Administrator sambaPasswordHistory: sambaLMPassword: x sambaAcctFlags: [U] sambaNTPassword: x sambaPwdLastSet: 1194277360 sambaPwdMustChange: 1194277360 shadowMax: 0 # nobody, Users, gomer.mdah.state.ms.us dn: uid=nobody,ou=Users,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us cn: nobody sn: nobody objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: sambaSamAccount objectClass: posixAccount objectClass: shadowAccount gidNumber: 514 uid: nobody uidNumber: 999 homeDirectory: /dev/null sambaPwdLastSet: 0 sambaLogonTime: 0 sambaLogoffTime: 2147483647 sambaKickoffTime: 2147483647 sambaPwdCanChange: 0 sambaPwdMustChange: 2147483647 sambaHomePath: \\GOMER\homes\nobody sambaHomeDrive: r: sambaProfilePath: \\GOMER\profiles\nobody sambaPrimaryGroupSID: S-1-5-21-264571052-2849996808-2029774292-514 sambaLMPassword: NO PASSWORDX sambaNTPassword: NO PASSWORDX sambaAcctFlags: [NUD] sambaSID: S-1-5-21-264571052-2849996808-2029774292-2998 loginShell: /bin/false # Domain Admins, Groups, gomer.mdah.state.ms.us dn: cn=Domain Admins,ou=Groups,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: top objectClass: posixGroup objectClass: sambaGroupMapping gidNumber: 512 cn: Domain Admins memberUid: root description: Netbios Domain Administrators sambaSID: S-1-5-21-264571052-2849996808-2029774292-512 sambaGroupType: 2 displayName: Domain Admins # Domain Users, Groups, gomer.mdah.state.ms.us dn: cn=Domain Users,ou=Groups,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: top objectClass: posixGroup objectClass: sambaGroupMapping gidNumber: 513 cn: Domain Users description: Netbios Domain Users sambaSID: S-1-5-21-264571052-2849996808-2029774292-513 sambaGroupType: 2 displayName: Domain Users # Domain Guests, Groups, gomer.mdah.state.ms.us dn: cn=Domain Guests,ou=Groups,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: top objectClass: posixGroup objectClass: sambaGroupMapping gidNumber: 514 cn: Domain Guests description: Netbios Domain Guests Users sambaSID: S-1-5-21-264571052-2849996808-2029774292-514 sambaGroupType: 2 displayName: Domain Guests # Domain Computers, Groups, gomer.mdah.state.ms.us dn: cn=Domain Computers,ou=Groups,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: top objectClass: posixGroup objectClass: sambaGroupMapping gidNumber: 515 cn: Domain Computers description: Netbios Domain Computers accounts sambaSID: S-1-5-21-264571052-2849996808-2029774292-515 sambaGroupType: 2 displayName: Domain Computers # Administrators, Groups, gomer.mdah.state.ms.us dn: cn=Administrators,ou=Groups,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: top objectClass: posixGroup objectClass: sambaGroupMapping
Re: [Samba] smbldap_tools error
nevermind, i figured it out. it wanted user test2 in LDAP first. -- 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
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
[Samba] Samba 3.0.26a, windows 2k3 r2 SFU, problems with auth/nss
Dear samba list, For some time we've had servers connecting to a w2k3 r2 server via ADS setup. Wins was working fine and users were able to authenticate. Recently we've added a GFS like system. This required getting the UID/GID's unified. Suggestions were made on the samba IRC channel to install SFU on the PDC. I'm receiving some very strange output. Usernames/pwd have been sanitized from logs/pwd files below. As it stands only 2 users of the PDC are seen with a getent passwd call. What is even stranger is that thier UID/GID appears correct but the home dir matches the old winbind info not the information on the PDC. I'm not set on using SFU and will take other suggestions to keep uid/gid unified. Big concern is simplicity in keeping synced. I'm concerned I've gotten turned around with all the SMB.conf switches in this migration. Any help is appreciated thanks! Ross wbinfo returns users from PDC however they are not the SFU users but instead all. #net ads testjoin Join is OK #net rpc testjoin Join to 'GUTHRIESOUND' is OK #wbinfo -u administrator guest support_388945a0 krbtgt iusr_guinevere iwam_guinevere dns 2a62ec20-1013-4155-a rosander thrust-op pro-op studio-op sedwards pestby lobby reidr design apacheglobal proftpd dustin smanager giga-op jnordin bsmith montanaj rhealey rgastelum jcrehorst apache root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/bin/false daemon:x:2:2:daemon:/sbin:/bin/false adm:x:3:4:adm:/var/adm:/bin/false lp:x:4:7:lp:/var/spool/lpd:/bin/false sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/bin/false news:x:9:13:news:/usr/lib/news:/bin/false uucp:x:10:14:uucp:/var/spool/uucppublic:/bin/false operator:x:11:0:operator:/root:/bin/nologin man:x:13:15:man:/usr/share/man:/bin/false postmaster:x:14:12:postmaster:/var/spool/mail:/bin/false nut:x:84:84:nut:/var/state/nut:/bin/false postfix:x:207:207:postfix:/var/spool/postfix:/bin/false smmsp:x:209:209:smmsp:/var/spool/mqueue:/bin/false portage:x:250:250:portage:/var/tmp/portage:/bin/false nobody:x:65534:65534:nobody:/:/bin/false sshd:x:22:22:added by portage for openssh:/var/empty:/bin/false cron:x:16:16:added by portage for cronbase:/var/spool/cron:/bin/false ntp:x:123:123:added by portage for ntp:/dev/null:/usr/sbin/nologin mysql:x:60:60:added by portage for mysql:/dev/null:/usr/sbin/nologin ldap:x:439:439:added by portage for openldap:/usr/lib64/openldap:/usr/sbin/nologin named:x:40:40:added by portage for bind:/etc/bind:/usr/sbin/nologin icecast:x:11125:11125::/home/icecast:/bin/bash apache:x:81:81:added by portage for apache:/var/www:/usr/sbin/nologin ftp:x:21:21:added by portage for ftpbase:/home/ftp:/usr/sbin/nologin rpc:x:111:111:added by portage for portmap:/dev/null:/usr/sbin/nologin tcpdump:x:101:11150:added by portage for tcpdump:/dev/null:/sbin/nologin clamav:x:102:11147:added by portage for clamav:/dev/null:/sbin/nologin sedwards:*:10013:1:Scott W. Edwards:/cluster-general/home/GUTHRIESOUND/sedwards:/bin/false reidr:*:10012:1:Reid Reisa:/cluster-general/home/GUTHRIESOUND/reidr:/bin/false [global] realm = GUTHRIESOUND.ORG workgroup = GUTHRIESOUND security = ads password server = pdc.guthriesound.org socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192 netbios name = AURTHOR server string = AURTHOR.GUTHRIESOUND.ORG load printers = no log file = /var/log/samba/log.%m max log size = 50 log level = 5 encrypt passwords = yes username map = /etc/samba/smbusers winbind use default domain = yes obey pam restrictions = yes template shell = /bin/false idmap backend = ad idmap uid = 1-10 idmap gid = 1-10 winbind nss info = sfu winbind cache time = 60 allow trusted domains = No winbind enum users = yes winbind enum groups = yes winbind nested groups = yes winbind offline logon = yes winbind use default domain = yes interfaces = 10.0.0.0/24 client use spnego = yes dns proxy = yes kernel oplocks = no *** log.winbindd-idmap [2007/11/05 09:59:28, 1] nsswitch/idmap_ad.c:idmap_ad_sids_to_unixids(514) ADS uninitialized [2007/11/05 09:59:28, 2] nsswitch/idmap.c:idmap_backends_sids_to_unixids(1148) ERROR: NTSTATUS = 0xc001 [2007/11/05 09:59:28, 4] nsswitch/winbindd_dual.c:fork_domain_child(1054) child daemon request 49 [2007/11/05 09:59:28, 3] nsswitch/winbindd_async.c:winbindd_dual_sid2gid(558) [ 1427]: sid to gid S-1-5-21-2463403574-2708018288-3802609275-513 ***log.winbindd [2007/11/05 09:59:25, 5] nsswitch/winbindd_async.c:winbindd_sid2gid_recv(527) sid2gid returned an error [2007/11/05 09:59:25, 5] nsswitch/winbindd_user.c:getpwsid_sid2gid_recv(293) Could not query gid for user GUTHRIESOUND\rosander [2007/11/05 09:59:25, 3] nsswitch/winbindd_user.c:winbindd_getpwnam(346)
RE: [Samba] ACL changes on Samba NT 4.0 Member Server
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
RE: [Samba] logon script to start a website
From an XP prompt, you can open a website with START. I don't have any other clients to try h:\|► start http:\\www.linux.com and the browser window will open. should be all you need, I think... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lukasz Szybalski Sent: Monday, November 05, 2007 6:03 AM To: samba@lists.samba.org Subject: [Samba] logon script to start a website Hello, Is there a way in logonscript.bat to start a website with some address. @start my current default browser http://google.com; ? How would a script line for that look? Does anybody have one done already and if so could you sent it to me? Thank you, Lucas -- 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
[Samba] question about smb flag2
I'm trying to get authentication to work with security=ADS with samba 3.0.25b The ads join worked and wbinfo -u sees all users correctly. smbclient -L localhost with user/password failed with NT_STATUS_LOGON_FAILURE I know for sure that user/password is correct. I turned up samba logging and found that make_user_info_map and check_ntlm_password was never called (no traces in log file). I'm thinking that samba is trying to authenticate with the local passdb due to some stale configuration problems. From the logs I saw smbd/sesssetup.c:reply_sesssetup_and_x(1244) wct=12 flg2=0xc801 what is flg2 and does that indicate anything about authenticating locally with passdb? on another samba server authenticating correctly with AD flg2=0xc805. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: Re: [Samba] Disable USB storage
Both work perfectly.. just one advice ... keep a copy of Usbstor.pnf and Usbstor.inf in different location because if you want to re-enable access to the USB .. well it gets a little tricky... I remember having to replace the files with files from another machine, because, just returning the values in the registry to the old values or default ones wouldn't work. Have a great day. Ruben Torres. herman wrote: alejandro luna wrote: Hello Everyone! i need to know if there is a way to send to windows XP a key reg to disable the usb storage, my samba is a PDC. the key in the window's registry is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor - Comparte video en la ventana de tus mensajes (y también tus fotos de Flickr). Usa el nuevo Yahoo! Messenger versión Beta. Visita http://mx.beta.messenger.yahoo.com/ Yes, there are two methods, as far as I know: http://support.microsoft.com/kb/823732 http://www.windowsdevcenter.com/pub/a/windows/2005/11/15/disabling-usb-storage-with-group-policy.html Cheers, Herman -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Disable USB storage
alejandro luna schrieb: Hello Everyone! i need to know if there is a way to send to windows XP a key reg to disable the usb storage, my samba is a PDC. the key in the window's registry is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor - Comparte video en la ventana de tus mensajes (y también tus fotos de Flickr). Usa el nuevo Yahoo! Messenger versión Beta. Visita http://mx.beta.messenger.yahoo.com/ On a samba pdc it should also be possible to write an system policy template for that registry key. Thanks for pointing to that registry key. http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/PolicyMgmt.html#id417198 achim~ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r25830 - in branches/SAMBA_4_0/source/lib/util: .
Author: metze Date: 2007-11-05 10:10:17 + (Mon, 05 Nov 2007) New Revision: 25830 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25830 Log: fix compiler warning metze Modified: branches/SAMBA_4_0/source/lib/util/debug.c branches/SAMBA_4_0/source/lib/util/debug.h Changeset: Modified: branches/SAMBA_4_0/source/lib/util/debug.c === --- branches/SAMBA_4_0/source/lib/util/debug.c 2007-11-05 07:09:41 UTC (rev 25829) +++ branches/SAMBA_4_0/source/lib/util/debug.c 2007-11-05 10:10:17 UTC (rev 25830) @@ -102,7 +102,7 @@ @note You should never have to call this function directly. Call the DEBUG() macro instead. */ -_PUBLIC_ void do_debug(const char *format, ...) _PRINTF_ATTRIBUTE(1,2) +_PUBLIC_ void do_debug(const char *format, ...) { va_list ap; char *s = NULL; Modified: branches/SAMBA_4_0/source/lib/util/debug.h === --- branches/SAMBA_4_0/source/lib/util/debug.h 2007-11-05 07:09:41 UTC (rev 25829) +++ branches/SAMBA_4_0/source/lib/util/debug.h 2007-11-05 10:10:17 UTC (rev 25830) @@ -121,4 +121,4 @@ @note You should never have to call this function directly. Call the DEBUG() macro instead. */ -_PUBLIC_ void do_debug(const char *format, ...) _PRINTF_ATTRIBUTE(1,2); +_PUBLIC_ void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1,2);
svn commit: samba r25831 - in branches/SAMBA_4_0/source/scripting/ejs: .
Author: metze Date: 2007-11-05 11:08:35 + (Mon, 05 Nov 2007) New Revision: 25831 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25831 Log: remove unused include metze Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c Changeset: Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c === --- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c 2007-11-05 10:10:17 UTC (rev 25830) +++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rand.c 2007-11-05 11:08:35 UTC (rev 25831) @@ -22,7 +22,6 @@ #include includes.h #include scripting/ejs/smbcalls.h #include lib/appweb/ejs/ejs.h -#include system/passwd.h #include librpc/gen_ndr/ndr_misc.h /*
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-192-g5bf02c6
The branch, v3-2-test has been updated via 5bf02c6cdf6fc4596827755f7d659709adb0a7d6 (commit) from b5e37af251a26648b0e4f59ca548c5374399175e (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 5bf02c6cdf6fc4596827755f7d659709adb0a7d6 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Nov 5 02:35:04 2007 +0100 Ignore testing tdb. Guenther --- Summary of changes: .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitignore b/.gitignore index 6640119..bd1cba1 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ source/nsswitch/*.so source/proto_exists source/winbindd/winbindd_proto.h source/cscope.out +source/torture.tdb -- Samba Shared Repository
svn commit: samba r25832 - in branches/4.0-python: . source/dsdb/samdb/ldb_modules source/dsdb/schema source/kdc source/lib/ldb/common source/lib/ldb/tests/python source/lib/registry/tests source/lib/
Author: jelmer Date: 2007-11-05 13:35:00 + (Mon, 05 Nov 2007) New Revision: 25832 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25832 Log: Merge upstream. Modified: branches/4.0-python/ branches/4.0-python/source/dsdb/samdb/ldb_modules/linked_attributes.c branches/4.0-python/source/dsdb/samdb/ldb_modules/objectclass.c branches/4.0-python/source/dsdb/samdb/ldb_modules/rootdse.c branches/4.0-python/source/dsdb/samdb/ldb_modules/samldb.c branches/4.0-python/source/dsdb/schema/schema_init.c branches/4.0-python/source/kdc/pac-glue.c branches/4.0-python/source/lib/ldb/common/ldb_modules.c branches/4.0-python/source/lib/ldb/tests/python/advanced.py branches/4.0-python/source/lib/ldb/tests/python/ldap.py branches/4.0-python/source/lib/registry/tests/registry.c branches/4.0-python/source/lib/socket_wrapper/socket_wrapper.c branches/4.0-python/source/lib/util/debug.c branches/4.0-python/source/lib/util/debug.h branches/4.0-python/source/lib/util/util.c branches/4.0-python/source/lib/util/util.h branches/4.0-python/source/libcli/cldap/cldap.c branches/4.0-python/source/libcli/dgram/browse.c branches/4.0-python/source/libcli/dgram/netlogon.c branches/4.0-python/source/libcli/dgram/ntlogon.c branches/4.0-python/source/libcli/nbt/nbtname.c branches/4.0-python/source/libcli/security/security_descriptor.c branches/4.0-python/source/libcli/wrepl/winsrepl.c branches/4.0-python/source/libnet/libnet_become_dc.c branches/4.0-python/source/libnet/libnet_vampire.c branches/4.0-python/source/librpc/idl/dfs.idl branches/4.0-python/source/librpc/idl/frsapi.idl branches/4.0-python/source/librpc/idl/frsrpc.idl branches/4.0-python/source/librpc/ndr/libndr.h branches/4.0-python/source/librpc/ndr/ndr.c branches/4.0-python/source/librpc/ndr/ndr_basic.c branches/4.0-python/source/librpc/ndr/ndr_compression.c branches/4.0-python/source/librpc/ndr/ndr_drsuapi.c branches/4.0-python/source/librpc/ndr/ndr_spoolss_buf.c branches/4.0-python/source/librpc/rpc/dcerpc.c branches/4.0-python/source/librpc/rpc/dcerpc_util.c branches/4.0-python/source/librpc/tools/ndrdump.c branches/4.0-python/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm branches/4.0-python/source/pidl/tests/Util.pm branches/4.0-python/source/pidl/tests/ndr_align.pl branches/4.0-python/source/pidl/tests/ndr_alloc.pl branches/4.0-python/source/pidl/tests/ndr_array.pl branches/4.0-python/source/pidl/tests/ndr_fullptr.pl branches/4.0-python/source/pidl/tests/ndr_refptr.pl branches/4.0-python/source/pidl/tests/ndr_represent.pl branches/4.0-python/source/pidl/tests/ndr_simple.pl branches/4.0-python/source/pidl/tests/ndr_string.pl branches/4.0-python/source/pidl/tests/ndr_tagtype.pl branches/4.0-python/source/selftest/output/html.pm branches/4.0-python/source/selftest/selftest.pl branches/4.0-python/source/setup/provision_rootdse_add.ldif branches/4.0-python/source/setup/provision_rootdse_modify.ldif branches/4.0-python/source/torture/libnet/libnet_BecomeDC.c branches/4.0-python/source/torture/raw/acls.c branches/4.0-python/source/torture/rpc/dfs.c branches/4.0-python/source/torture/rpc/dssync.c branches/4.0-python/source/torture/rpc/frsapi.c branches/4.0-python/source/torture/rpc/rpc.c branches/4.0-python/source/torture/rpc/samba3rpc.c branches/4.0-python/source/torture/rpc/winreg.c branches/4.0-python/source/utils/getntacl.c branches/4.0-python/testdata/samba3/provision_samba3sam.ldif Changeset: Sorry, the patch is too large (5875 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25832
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-193-g5721a51
The branch, v3-2-test has been updated via 5721a511d8dd327717bcd9c2053c4bd08f01185c (commit) from 5bf02c6cdf6fc4596827755f7d659709adb0a7d6 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 5721a511d8dd327717bcd9c2053c4bd08f01185c Author: Michael Adam [EMAIL PROTECTED] Date: Mon Nov 5 15:16:11 2007 +0100 Fix a typo. Michael --- Summary of changes: source/configure.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/configure.in b/source/configure.in index 1b282ae..02ca8ac 100644 --- a/source/configure.in +++ b/source/configure.in @@ -393,7 +393,7 @@ AC_SUBST(SWAT_INSTALL_TARGETS) selftest_prefix=./ AC_SUBST(selftest_prefix) AC_ARG_WITH(selftest-prefix, -[ --with-selftest-prefix=DIRThe prefix where make test will be runned ($selftest_prefix)], +[ --with-selftest-prefix=DIRThe prefix where make test will be run ($selftest_prefix)], [ case $withval in yes|no) AC_MSG_WARN([--with-selftest-prefix called without argument - will use default]) -- Samba Shared Repository
svn commit: samba r25833 - in branches/SAMBA_4_0/source/selftest/env: .
Author: metze Date: 2007-11-05 15:12:54 + (Mon, 05 Nov 2007) New Revision: 25833 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25833 Log: - we don't need --root twice - use $unix_name to make more clear what this variable means metze Modified: branches/SAMBA_4_0/source/selftest/env/Samba4.pm Changeset: Modified: branches/SAMBA_4_0/source/selftest/env/Samba4.pm === --- branches/SAMBA_4_0/source/selftest/env/Samba4.pm2007-11-05 13:35:00 UTC (rev 25832) +++ branches/SAMBA_4_0/source/selftest/env/Samba4.pm2007-11-05 15:12:54 UTC (rev 25833) @@ -447,7 +447,7 @@ my $realm = SAMBA.EXAMPLE.COM; my $dnsname = samba.example.com; my $basedn = dc=samba,dc=example,dc=com; - my $root = ($ENV{USER} or $ENV{LOGNAME} or `whoami`); + my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`); my $srcdir=$RealBin/..; -d $prefix or mkdir($prefix, 0777) or die(Unable to create $prefix); my $prefix_abs = abs_path($prefix); @@ -595,10 +595,9 @@ push (@provision_options, --adminpass=$password); push (@provision_options, --krbtgtpass=krbtgt$password); push (@provision_options, --machinepass=machine$password); - push (@provision_options, --root=$root); + push (@provision_options, --root=$unix_name); push (@provision_options, --simple-bind-dn=cn=Manager,$localbasedn); push (@provision_options, --password=$password); - push (@provision_options, --root=$root); push (@provision_options, --server-role=$server_role); my $ldap_uri= $ldapdir/ldapi; @@ -629,7 +628,7 @@ if (defined($self-{ldap})) { push (@provision_options, --ldap-backend=$ldap_uri); - system($self-{bindir}/smbscript $self-{setupdir}/provision-backend $configuration --ldap-manager-pass=$password --root=$root --realm=$realm --host-name=$netbiosname --ldap-backend-type=$self-{ldap}2) == 0 or die(backend provision failed); + system($self-{bindir}/smbscript $self-{setupdir}/provision-backend $configuration --ldap-manager-pass=$password --root=$unix_name --realm=$realm --host-name=$netbiosname --ldap-backend-type=$self-{ldap}2) == 0 or die(backend provision failed); if ($self-{ldap} eq openldap) { ($ret-{SLAPD_CONF}, $ret-{OPENLDAP_PIDFILE}) = $self-mk_openldap($ldapdir, $configuration) or die(Unable to create openldap directories);
svn commit: samba r25834 - in branches/SAMBA_4_0/source/lib: . nss_wrapper
Author: metze Date: 2007-11-05 15:38:36 + (Mon, 05 Nov 2007) New Revision: 25834 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25834 Log: nss_wrapper: add lib/nss_wrapper skeleton metze Added: branches/SAMBA_4_0/source/lib/nss_wrapper/ branches/SAMBA_4_0/source/lib/nss_wrapper/config.m4 branches/SAMBA_4_0/source/lib/nss_wrapper/config.mk branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.h Changeset: Added: branches/SAMBA_4_0/source/lib/nss_wrapper/config.m4 === --- branches/SAMBA_4_0/source/lib/nss_wrapper/config.m4 2007-11-05 15:12:54 UTC (rev 25833) +++ branches/SAMBA_4_0/source/lib/nss_wrapper/config.m4 2007-11-05 15:38:36 UTC (rev 25834) @@ -0,0 +1,19 @@ +AC_ARG_ENABLE(nss-wrapper, +[ --enable-nss-wrapper Turn on nss wrapper library (default=no)]) + +HAVE_NSS_WRAPPER=no + +if eval test x$developer = xyes; then + enable_nss_wrapper=yes +fi + +if eval test x$enable_nss_wrapper = xyes; then +AC_DEFINE(NSS_WRAPPER,1,[Use nss wrapper library]) + HAVE_NSS_WRAPPER=yes + + # this is only used for samba3 + NSS_WRAPPER_OBJS=lib/nss_wrapper/nss_wrapper.o +fi + +AC_SUBST(HAVE_NSS_WRAPPER) +AC_SUBST(NSS_WRAPPER_OBJS) Added: branches/SAMBA_4_0/source/lib/nss_wrapper/config.mk === --- branches/SAMBA_4_0/source/lib/nss_wrapper/config.mk 2007-11-05 15:12:54 UTC (rev 25833) +++ branches/SAMBA_4_0/source/lib/nss_wrapper/config.mk 2007-11-05 15:38:36 UTC (rev 25834) @@ -0,0 +1,10 @@ +## +# Start SUBSYSTEM NSS_WRAPPER +[LIBRARY::NSS_WRAPPER] +VERSION = 0.0.1 +SO_VERSION = 0 +DESCRIPTION = Wrapper library for testing nss calls without being root +PUBLIC_HEADERS = nss_wrapper.h +OBJ_FILES = nss_wrapper.o +# End SUBSYSTEM NSS_WRAPPER +## Added: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c === --- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-05 15:12:54 UTC (rev 25833) +++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c 2007-11-05 15:38:36 UTC (rev 25834) @@ -0,0 +1,180 @@ +/* + * Copyright (C) Stefan Metzmacher 2007 [EMAIL PROTECTED] + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the author nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifdef _SAMBA_BUILD_ + +#define NSS_WRAPPER_NOT_REPLACE +#include lib/replace/replace.h +#include system/passwd.h +#include system/filesys.h + +#else /* _SAMBA_BUILD_ */ + +#error nss_wrapper_only_supported_in_samba_yet + +#endif + +#ifndef _PUBLIC_ +#define _PUBLIC_ +#endif + +/* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support + * for now */ +#define REWRITE_CALLS + +#ifdef REWRITE_CALLS + +#define real_getpwnam getpwnam +#define real_getpwnam_rgetpwnam_r +#define real_getpwuid getpwuid +#define real_getpwuid_rgetpwuid_r + +#define real_setpwent setpwent +#define real_getpwent getpwent +#define real_getpwent_rgetpwent_r +#define real_endpwent endpwent + +/* +#define real_getgrlst getgrlst +#define real_getgrlst_rgetgrlst_r +#define real_initgroups_dyninitgroups_dyn +*/ +#define real_initgroupsinitgroups + +#define real_getgrnam getgrnam +#define real_getgrnam_r
svn commit: samba r25835 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .
Author: metze Date: 2007-11-05 15:39:46 + (Mon, 05 Nov 2007) New Revision: 25835 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25835 Log: nss_wrapper: add support for passwd accounts The NSS_WRAPPER_PASSWD envvar should point to the /etc/passwd style file. metze Modified: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.c Changeset: Sorry, the patch is too large (621 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25835
svn commit: samba r25837 - in branches/SAMBA_4_0/source/lib/nss_wrapper: .
Author: metze Date: 2007-11-05 15:42:38 + (Mon, 05 Nov 2007) New Revision: 25837 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25837 Log: nss_wrapper: add nss_wrapper.pl This script will be used to add|delete passwd|group entries metze Added: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.pl Changeset: Added: branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.pl === --- branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.pl2007-11-05 15:41:23 UTC (rev 25836) +++ branches/SAMBA_4_0/source/lib/nss_wrapper/nss_wrapper.pl2007-11-05 15:42:38 UTC (rev 25837) @@ -0,0 +1,265 @@ +#!/usr/bin/perl +# + +use strict; + +use Getopt::Long; +use Cwd qw(abs_path); + +my $opt_help = 0; +my $opt_path = undef; +my $opt_action = undef; +my $opt_type = undef; +my $opt_name = undef; + +my $passwdfn = undef; +my $groupfn = undef; +my $actionfn = undef; + +sub passwd_add($$); +sub passwd_delete($$); +sub group_add($$); +sub group_delete($$); + +my $result = GetOptions( + 'help|h|?' = \$opt_help, + 'path=s'= \$opt_path, + 'action=s' = \$opt_action, + 'type=s'= \$opt_type, + 'name=s'= \$opt_name +); + +sub usage($;$) +{ + my ($ret, $msg) = @_; + + print $msg.\n\n if defined($msg); + + print usage: + + --help|-h|-?Show this help. + + --path path Path of the 'passwd' or 'group' file. + + --type type Only 'passwd' is supported yet, + but 'group' and maybe 'member' will be added + in future. + + --action action 'add' or 'delete'. + + --name name The name of the object. +; + exit($ret); +} + +usage(1) if (not $result); + +usage(0) if ($opt_help); + +if (not defined($opt_path)) { + usage(1, missing: --path path); +} +if ($opt_path eq or $opt_path eq /) { + usage(1, invalid: --path path: '$opt_path'); +} +my $opt_fullpath = abs_path($opt_path); +if (not defined($opt_fullpath)) { + usage(1, invalid: --path path: '$opt_path'); +} + + +if (not defined($opt_action)) { + usage(1, missing: --action [add|delete]); +} +if ($opt_action eq add) { + $passwdfn = \passwd_add; + $groupfn = \group_add; +} elsif ($opt_action eq delete) { + $passwdfn = \passwd_delete; + $groupfn = \group_delete; +} else { + usage(1, invalid: --action [add|delete]: '$opt_action'); +} + +if (not defined($opt_type)) { + usage(1, missing: --type [passwd|group]); +} +if ($opt_type eq passwd) { + $actionfn = $passwdfn; +} elsif ($opt_type eq group) { + $actionfn = $groupfn; +} else { + usage(1, invalid: --type [passwd|group]: '$opt_type') +} + +if (not defined($opt_name)) { + usage(1, missing: --name name); +} +if ($opt_name eq ) { + usage(1, invalid: --name name); +} + +exit $actionfn-($opt_fullpath, $opt_name); + +sub passwd_add_entry($$); + +sub passwd_load($) +{ + my ($path) = @_; + my @lines; + my $passwd = undef; + + open(PWD, $path) or die(Unable to open '$path' for read); + @lines = PWD; + close(PWD); + + $passwd-{array} = (); + $passwd-{name} = {}; + $passwd-{uid} = {}; + $passwd-{path} = $path; + + foreach my $line (@lines) { + passwd_add_entry($passwd, $line); + } + + return $passwd; +} + +sub passwd_lookup_name($$) +{ + my ($passwd, $name) = @_; + + return undef unless defined($passwd-{name}{$name}); + + return $passwd-{name}{$name}; +} + +sub passwd_lookup_uid($$) +{ + my ($passwd, $uid) = @_; + + return undef unless defined($passwd-{uid}{$uid}); + + return $passwd-{uid}{$uid}; +} + +sub passwd_get_free_uid($) +{ + my ($passwd) = @_; + my $uid = 1000; + + while (passwd_lookup_uid($passwd, $uid)) { + $uid++; + } + + return $uid; +} + +sub passwd_add_entry($$) +{ + my ($passwd, $str) = @_; + + chomp $str; + my @e = split(':', $str); + + push(@{$passwd-{array}}, [EMAIL PROTECTED]); + $passwd-{name}{$e[0]} = [EMAIL PROTECTED]; + $passwd-{uid}{$e[2]} = [EMAIL PROTECTED]; +} + +sub passwd_remove_entry($$) +{ + my ($passwd, $eref) = @_; + + for(my $i; defined($passwd-{array}[$i]); $i++) { + if ($eref == $passwd-{array}[$i]) { + $passwd-{array}[$i] = undef; + } + } + + delete $passwd-{name}{${$eref}[0]}; + delete $passwd-{uid}{${$eref}[2]}; +} + +sub passwd_save($) +{ + my ($passwd) = @_; + my @lines = (); + my $path = $passwd-{path}; + my $tmppath = $path.$$; + + foreach my $eref (@{$passwd-{array}}) { + next unless defined($eref); + + my $line = join(':', @{$eref}); + push(@lines,
svn commit: samba r25839 - in branches/SAMBA_4_0/source: . auth dsdb/samdb/ldb_modules lib ntvfs/unixuid rpc_server scripting/ejs
Author: metze Date: 2007-11-05 15:47:34 + (Mon, 05 Nov 2007) New Revision: 25839 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25839 Log: use nss_wrapper code in samba4 if --enable-nss-wrapper or --enable-developer is given metze Modified: branches/SAMBA_4_0/source/auth/config.mk branches/SAMBA_4_0/source/configure.ac branches/SAMBA_4_0/source/configure.developer branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk branches/SAMBA_4_0/source/lib/basic.mk branches/SAMBA_4_0/source/ntvfs/unixuid/config.mk branches/SAMBA_4_0/source/rpc_server/config.mk branches/SAMBA_4_0/source/scripting/ejs/config.mk Changeset: Modified: branches/SAMBA_4_0/source/auth/config.mk === --- branches/SAMBA_4_0/source/auth/config.mk2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/auth/config.mk2007-11-05 15:47:34 UTC (rev 25839) @@ -55,7 +55,7 @@ INIT_FUNCTION = auth_unix_init SUBSYSTEM = auth OBJ_FILES = auth_unix.o -PRIVATE_DEPENDENCIES = CRYPT PAM PAM_ERRORS +PRIVATE_DEPENDENCIES = CRYPT PAM PAM_ERRORS NSS_WRAPPER # End MODULE auth_unix ### Modified: branches/SAMBA_4_0/source/configure.ac === --- branches/SAMBA_4_0/source/configure.ac 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/configure.ac 2007-11-05 15:47:34 UTC (rev 25839) @@ -85,6 +85,7 @@ m4_include(ntvfs/posix/config.m4) m4_include(ntvfs/unixuid/config.m4) m4_include(lib/socket_wrapper/config.m4) +m4_include(lib/nss_wrapper/config.m4) m4_include(auth/config.m4) m4_include(kdc/config.m4) m4_include(ntvfs/sysdep/config.m4) Modified: branches/SAMBA_4_0/source/configure.developer === --- branches/SAMBA_4_0/source/configure.developer 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/configure.developer 2007-11-05 15:47:34 UTC (rev 25839) @@ -2,4 +2,5 @@ `dirname $0`/configure -C \ --enable-developer \ --enable-socket-wrapper \ + --enable-nss-wrapper \ $@ Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk 2007-11-05 15:47:34 UTC (rev 25839) @@ -81,7 +81,7 @@ [MODULE::ldb_samba3sam] SUBSYSTEM = LIBLDB INIT_FUNCTION = ldb_samba3sam_module_init -PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD +PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER OBJ_FILES = \ samba3sam.o # Modified: branches/SAMBA_4_0/source/lib/basic.mk === --- branches/SAMBA_4_0/source/lib/basic.mk 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/lib/basic.mk 2007-11-05 15:47:34 UTC (rev 25839) @@ -10,6 +10,7 @@ include events/config.mk include cmdline/config.mk include socket_wrapper/config.mk +include nss_wrapper/config.mk include appweb/config.mk include stream/config.mk include util/config.mk Modified: branches/SAMBA_4_0/source/ntvfs/unixuid/config.mk === --- branches/SAMBA_4_0/source/ntvfs/unixuid/config.mk 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/ntvfs/unixuid/config.mk 2007-11-05 15:47:34 UTC (rev 25839) @@ -5,6 +5,6 @@ SUBSYSTEM = ntvfs OBJ_FILES = \ vfs_unixuid.o -PRIVATE_DEPENDENCIES = SAMDB +PRIVATE_DEPENDENCIES = SAMDB NSS_WRAPPER # End MODULE ntvfs_unixuid Modified: branches/SAMBA_4_0/source/rpc_server/config.mk === --- branches/SAMBA_4_0/source/rpc_server/config.mk 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/rpc_server/config.mk 2007-11-05 15:47:34 UTC (rev 25839) @@ -82,7 +82,8 @@ PRIVATE_DEPENDENCIES = \ DCERPC_COMMON \ SAMDB \ - NDR_UNIXINFO + NDR_UNIXINFO \ + NSS_WRAPPER # End MODULE dcerpc_unixinfo Modified: branches/SAMBA_4_0/source/scripting/ejs/config.mk === --- branches/SAMBA_4_0/source/scripting/ejs/config.mk 2007-11-05 15:45:08 UTC (rev 25838) +++ branches/SAMBA_4_0/source/scripting/ejs/config.mk 2007-11-05 15:47:34 UTC (rev 25839) @@ -43,6 +43,7 @@ OBJ_FILES = smbcalls_nss.o SUBSYSTEM = smbcalls INIT_FUNCTION = smb_setup_ejs_nss +PRIVATE_DEPENDENCIES = NSS_WRAPPER [MODULE::smbcalls_data] OBJ_FILES = smbcalls_data.o
svn commit: samba r25841 - in branches/SAMBA_4_0/source: .
Author: metze Date: 2007-11-05 16:16:41 + (Mon, 05 Nov 2007) New Revision: 25841 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25841 Log: try to fix make install metze Modified: branches/SAMBA_4_0/source/headermap.txt Changeset: Modified: branches/SAMBA_4_0/source/headermap.txt === --- branches/SAMBA_4_0/source/headermap.txt 2007-11-05 15:49:40 UTC (rev 25840) +++ branches/SAMBA_4_0/source/headermap.txt 2007-11-05 16:16:41 UTC (rev 25841) @@ -11,6 +11,7 @@ lib/tdr/tdr.h: tdr.h librpc/rpc/dcerpc.h: dcerpc.h lib/socket_wrapper/socket_wrapper.h: socket_wrapper.h +lib/nss_wrapper/nss_wrapper.h: nss_wrapper.h libnet/libnet.h: libnet.h libnet/libnet_join.h: libnet/join.h libnet/libnet_lookup.h: libnet/lookup.h
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-194-g255c2ad
The branch, v3-2-test has been updated via 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db (commit) from 5721a511d8dd327717bcd9c2053c4bd08f01185c (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Nov 5 11:12:56 2007 -0800 Remove the horror that was the global smb_rw_error. Each cli struct has it's own local copy of this variable, so use that in client code. In the smbd server, add one static to smbd/proccess.c and use that inside smbd. Fix a bunch of places where smb_rw_error could be set by calling read_data() in places where we weren't reading from the SMB client socket (ie. winbindd). Jeremy. --- Summary of changes: source/client/client.c |2 +- source/include/client.h |2 +- source/lib/util_sock.c | 87 --- source/libsmb/clientgen.c | 23 +- source/nmbd/asyncdns.c |4 +- source/smbd/chgpasswd.c |2 +- source/smbd/process.c | 59 +- source/smbd/reply.c |5 +- source/winbindd/winbindd_dual.c |4 +- 9 files changed, 104 insertions(+), 84 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/client.c b/source/client/client.c index 27f120c..94dc52d 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -3711,7 +3711,7 @@ static void readline_callback(void) session keepalives and then drop them here. */ if (FD_ISSET(cli-fd,fds)) { - if (!receive_smb(cli-fd,cli-inbuf,0)) { + if (!receive_smb(cli-fd,cli-inbuf,0,cli-smb_rw_error)) { DEBUG(0, (Read from server failed, maybe it closed the connection\n)); return; diff --git a/source/include/client.h b/source/include/client.h index d8c3578..dd8bb0d 100644 --- a/source/include/client.h +++ b/source/include/client.h @@ -82,7 +82,7 @@ struct rpc_pipe_client { struct cli_state { int port; int fd; - /* Copy of last read or write error. */ + /* Last read or write error. */ enum smb_read_errors smb_rw_error; uint16 cnum; uint16 pid; diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 0209723..4a870b7 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -654,22 +654,19 @@ int client_socket_port(int fd) Accessor functions to make thread-safe code easier later... / -static enum smb_read_errors smb_read_error = SMB_READ_OK; - -enum smb_read_errors get_smb_read_error(void) -{ - return smb_read_error; -} - -void set_smb_read_error(enum smb_read_errors newerr) +void set_smb_read_error(enum smb_read_errors *pre, + enum smb_read_errors newerr) { - smb_read_error = newerr; + if (pre) { + *pre = newerr; + } } -void cond_set_smb_read_error(enum smb_read_errors newerr) +void cond_set_smb_read_error(enum smb_read_errors *pre, + enum smb_read_errors newerr) { - if (smb_read_error == SMB_READ_OK) { - smb_read_error = newerr; + if (pre *pre == SMB_READ_OK) { + *pre = newerr; } } @@ -883,7 +880,8 @@ ssize_t read_socket_with_timeout(int fd, char *buf, size_t mincnt, size_t maxcnt, - unsigned int time_out) + unsigned int time_out, + enum smb_read_errors *pre) { fd_set fds; int selrtn; @@ -896,7 +894,7 @@ ssize_t read_socket_with_timeout(int fd, if (maxcnt = 0) return(0); - set_smb_read_error(SMB_READ_OK); + set_smb_read_error(pre,SMB_READ_OK); /* Blocking read */ if (time_out == 0) { @@ -910,7 +908,7 @@ ssize_t read_socket_with_timeout(int fd, if (readret == 0) { DEBUG(5,(read_socket_with_timeout: blocking read. EOF from client.\n)); - set_smb_read_error(SMB_READ_EOF); + set_smb_read_error(pre,SMB_READ_EOF); return -1; } @@ -927,7 +925,7 @@ ssize_t read_socket_with_timeout(int fd, read error = %s.\n, strerror(errno) )); } -
svn commit: samba r25842 - in branches/SAMBA_4_0: . source/lib/ldb source/lib/ldb/tests source/lib/ldb/tools
Author: jelmer Date: 2007-11-05 21:57:33 + (Mon, 05 Nov 2007) New Revision: 25842 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25842 Log: Start working on test for loading dso's in ldb. Added: branches/SAMBA_4_0/source/lib/ldb/tests/sample_module.c branches/SAMBA_4_0/source/lib/ldb/tests/test-soloading.sh Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.h 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/.bzrignore === --- branches/SAMBA_4_0/.bzrignore 2007-11-05 16:16:41 UTC (rev 25841) +++ branches/SAMBA_4_0/.bzrignore 2007-11-05 21:57:33 UTC (rev 25842) @@ -202,3 +202,5 @@ torture/winbind/proto.h source/rpc_server/lsa/proto.h source/torture/winbind/proto.h +source/lib/ldb/tdbtest.ldb +source/lib/ldb/tdbtest.ldb Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 16:16:41 UTC (rev 25841) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 21:57:33 UTC (rev 25842) @@ -32,9 +32,11 @@ LDAP_LIBS = @LDAP_LIBS@ +SHLIBEXT = @SHLIBEXT@ + CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \ $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \ - -DLIBDIR=\$(libdir)\ -DSHLIBEXT=\@[EMAIL PROTECTED] -DUSE_MMAP=1 @CFLAGS@ + -DLIBDIR=\$(libdir)\ -DSHLIBEXT=\$(SHLIBEXT)\ -DUSE_MMAP=1 @CFLAGS@ [EMAIL PROTECTED]@ -Llib -lldb @LIBS@ $(POPT_LIBS) $(TALLOC_LIBS) $(TDB_LIBS) \ $(LDAP_LIBS) @@ -104,6 +106,9 @@ lib/libnss_ldb.so.2: $(NSS_OBJ) $(LIBS) bin/libldb.a $(CC) -shared -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) +sample_module.$(SHLIBEXT): tests/sample_module.o + $(CC) -shared -o $@ tests/sample_module.o $(LIB_FLAGS) + bin/ldbadd: tools/ldbadd.o tools/cmdline.o $(LIBS) $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) @@ -160,6 +165,11 @@ realdistclean: distclean rm -f configure.in include/config.h.in +check:: test + +check-soloading: sample_module.$(SHLIBEXT) + LDB_MODULES_PATH=$(builddir) $(srcdir)/tests/test-soloading.sh + test: all for t in $(TESTS); do echo STARTING $${t}; $(srcdir)/tests/$${t} || exit 1; done Added: branches/SAMBA_4_0/source/lib/ldb/tests/sample_module.c === --- branches/SAMBA_4_0/source/lib/ldb/tests/sample_module.c 2007-11-05 16:16:41 UTC (rev 25841) +++ branches/SAMBA_4_0/source/lib/ldb/tests/sample_module.c 2007-11-05 21:57:33 UTC (rev 25842) @@ -0,0 +1,43 @@ +/* + Unix SMB/CIFS implementation. + Samba utility functions + Copyright (C) Jelmer Vernooij [EMAIL PROTECTED] 2007 + + ** NOTE! The following LGPL license applies to the ldb + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see http://www.gnu.org/licenses/. +*/ + +#include ldb_includes.h +#include ldb.h +#include ldb_errors.h + +int sample_add(struct ldb_module *mod, struct ldb_request *req) +{ + ldb_msg_add_fmt(req-op.add.message, touchedBy, sample); + + return ldb_next_request(mod, req); +} + +static const struct ldb_module_ops sample_ops = { + .name = sample_module, + .add = sample_add, +}; + +int init_module(void) +{ + return ldb_register_module(sample_ops); +} Added: branches/SAMBA_4_0/source/lib/ldb/tests/test-soloading.sh === --- branches/SAMBA_4_0/source/lib/ldb/tests/test-soloading.sh 2007-11-05 16:16:41 UTC (rev 25841) +++ branches/SAMBA_4_0/source/lib/ldb/tests/test-soloading.sh 2007-11-05 21:57:33 UTC (rev 25842) @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ -n $TEST_DATA_PREFIX ]; then +
svn commit: samba r25843 - in branches/SAMBA_4_0: . source/lib/ldb source/lib/ldb/common
Author: jelmer Date: 2007-11-05 21:57:39 + (Mon, 05 Nov 2007) New Revision: 25843 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25843 Log: Finish check-soloading. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/common/ldb.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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 21:57:33 UTC (rev 25842) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 21:57:39 UTC (rev 25843) @@ -34,6 +34,8 @@ SHLIBEXT = @SHLIBEXT@ +LD_EXPORT_DYNAMIC = -Wl,--export-dynamic + CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \ $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \ -DLIBDIR=\$(libdir)\ -DSHLIBEXT=\$(SHLIBEXT)\ -DUSE_MMAP=1 @CFLAGS@ @@ -107,28 +109,28 @@ $(CC) -shared -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) sample_module.$(SHLIBEXT): tests/sample_module.o - $(CC) -shared -o $@ tests/sample_module.o $(LIB_FLAGS) + $(CC) -shared -o $@ tests/sample_module.o bin/ldbadd: tools/ldbadd.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbsearch: tools/ldbsearch.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbsearch tools/ldbsearch.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbsearch tools/ldbsearch.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbdel: tools/ldbdel.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbdel tools/ldbdel.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbdel tools/ldbdel.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbmodify: tools/ldbmodify.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbmodify tools/ldbmodify.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbmodify tools/ldbmodify.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbedit: tools/ldbedit.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbedit tools/ldbedit.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbedit tools/ldbedit.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbrename: tools/ldbrename.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbrename tools/ldbrename.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbrename tools/ldbrename.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/ldbtest: tools/ldbtest.o tools/cmdline.o $(LIBS) - $(CC) -o bin/ldbtest tools/ldbtest.o tools/cmdline.o $(LIB_FLAGS) + $(CC) -o bin/ldbtest tools/ldbtest.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) bin/oLschema2ldif: tools/oLschema2ldif.o tools/cmdline.o tools/convert.o $(LIBS) $(CC) -o bin/oLschema2ldif tools/oLschema2ldif.o tools/cmdline.o tools/convert.o $(LIB_FLAGS) Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2007-11-05 21:57:33 UTC (rev 25842) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2007-11-05 21:57:39 UTC (rev 25843) @@ -56,7 +56,7 @@ return ldb; } -static struct ldb_backend { +struct ldb_backend { const char *name; ldb_connect_fn connect_fn; struct ldb_backend *prev, *next;
svn commit: samba r25844 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2007-11-05 21:57:44 + (Mon, 05 Nov 2007) New Revision: 25844 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25844 Log: Enable soloading by default. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 21:57:39 UTC (rev 25843) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-05 21:57:44 UTC (rev 25844) @@ -167,12 +167,12 @@ realdistclean: distclean rm -f configure.in include/config.h.in -check:: test +check:: test check-soloading check-soloading: sample_module.$(SHLIBEXT) LDB_MODULES_PATH=$(builddir) $(srcdir)/tests/test-soloading.sh -test: all +test: all check-soloading for t in $(TESTS); do echo STARTING $${t}; $(srcdir)/tests/$${t} || exit 1; done valgrindtest: all
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-195-gbf23c4d
The branch, v3-2-test has been updated via bf23c4ddff617dd3cd1e2d5cedb1b5c023356dc3 (commit) from 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit bf23c4ddff617dd3cd1e2d5cedb1b5c023356dc3 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Nov 5 23:23:05 2007 +0100 Add two const's. Michael --- Summary of changes: source/smbd/posix_acls.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index b8afbb8..7f03d7e 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -1081,7 +1081,7 @@ static bool ensure_canon_entry_valid(canon_ace **pp_ace, const files_struct *fsp, const DOM_SID *pfile_owner_sid, const DOM_SID *pfile_grp_sid, - SMB_STRUCT_STAT *pst, + const SMB_STRUCT_STAT *pst, bool setting_acl) { canon_ace *pace; @@ -2066,7 +2066,7 @@ static bool unpack_canon_ace(files_struct *fsp, But NT cannot display this in their ACL editor ! / -static void arrange_posix_perms( char *filename, canon_ace **pp_list_head) +static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head) { canon_ace *list_head = *pp_list_head; canon_ace *owner_ace = NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-196-gd140d68
The branch, v3-2-test has been updated via d140d68537225b6a6a99be3d9b09354e3f6ad8c9 (commit) from bf23c4ddff617dd3cd1e2d5cedb1b5c023356dc3 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit d140d68537225b6a6a99be3d9b09354e3f6ad8c9 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Nov 6 00:50:47 2007 +0100 When deleting a key from the registry make sure the non-default security descriptor gets deleted as well. Guenther --- Summary of changes: source/registry/reg_api.c| 11 +++ source/registry/reg_db.c | 15 +++ source/registry/reg_frontend.c | 10 -- source/registry/reg_frontend_hilvl.c | 10 ++ 4 files changed, 32 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c index 17a0efe..b3d024d 100644 --- a/source/registry/reg_api.c +++ b/source/registry/reg_api.c @@ -498,7 +498,7 @@ WERROR reg_deletekey(struct registry_key *parent, const char *path) TALLOC_CTX *mem_ctx; char *name, *end; int num_subkeys; - struct registry_key *tmp_key; + struct registry_key *tmp_key, *key; if (!(mem_ctx = talloc_init(reg_createkey))) return WERR_NOMEM; @@ -508,14 +508,14 @@ WERROR reg_deletekey(struct registry_key *parent, const char *path) } /* check if the key has subkeys */ - err = reg_openkey(mem_ctx, parent, name, REG_KEY_READ, tmp_key); + err = reg_openkey(mem_ctx, parent, name, REG_KEY_READ, key); if (!W_ERROR_IS_OK(err)) { goto error; } - if (!W_ERROR_IS_OK(err = fill_subkey_cache(tmp_key))) { + if (!W_ERROR_IS_OK(err = fill_subkey_cache(key))) { goto error; } - if (tmp_key-subkeys-num_subkeys 0) { + if (key-subkeys-num_subkeys 0) { err = WERR_ACCESS_DENIED; goto error; } @@ -556,7 +556,10 @@ WERROR reg_deletekey(struct registry_key *parent, const char *path) goto error; } + regkey_set_secdesc(key-key, NULL); + err = WERR_OK; + error: TALLOC_FREE(mem_ctx); return err; diff --git a/source/registry/reg_db.c b/source/registry/reg_db.c index 8dd61fc..4947b2a 100644 --- a/source/registry/reg_db.c +++ b/source/registry/reg_db.c @@ -788,6 +788,21 @@ static WERROR regdb_set_secdesc(const char *key, } normalize_dbkey(tdbkey); + if (secdesc == NULL) { + /* assuming a delete */ + int tdb_ret; + + tdb_ret = tdb_trans_delete(tdb_reg-tdb, + string_term_tdb_data(tdbkey)); + if (tdb_ret == -1) { + err = ntstatus_to_werror(map_nt_error_from_unix(errno)); + } else { + err = WERR_OK; + } + + goto done; + } + err = ntstatus_to_werror(marshall_sec_desc(mem_ctx, secdesc, tdbdata.dptr, tdbdata.dsize)); diff --git a/source/registry/reg_frontend.c b/source/registry/reg_frontend.c index 0097239..577df1c 100644 --- a/source/registry/reg_frontend.c +++ b/source/registry/reg_frontend.c @@ -101,16 +101,6 @@ WERROR regkey_open_internal( TALLOC_CTX *ctx, REGISTRY_KEY **regkey, return WERR_OK; } -WERROR regkey_set_secdesc(REGISTRY_KEY *key, - struct security_descriptor *psecdesc) -{ - if (key-hook key-hook-ops key-hook-ops-set_secdesc) { - return key-hook-ops-set_secdesc(key-name, psecdesc); - } - - return WERR_ACCESS_DENIED; -} - /* * Utility function to create a registry key without opening the hive * before. Assumes the hive already exists. diff --git a/source/registry/reg_frontend_hilvl.c b/source/registry/reg_frontend_hilvl.c index 08429c6..a4b78b2 100644 --- a/source/registry/reg_frontend_hilvl.c +++ b/source/registry/reg_frontend_hilvl.c @@ -204,3 +204,13 @@ WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key, *psecdesc = secdesc; return WERR_OK; } + +WERROR regkey_set_secdesc(REGISTRY_KEY *key, + struct security_descriptor *psecdesc) +{ + if (key-hook key-hook-ops key-hook-ops-set_secdesc) { + return key-hook-ops-set_secdesc(key-name, psecdesc); + } + + return WERR_ACCESS_DENIED; +} -- Samba Shared Repository
Build status as of Tue Nov 6 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-11-05 00:00:34.0 + +++ /home/build/master/cache/broken_results.txt 2007-11-06 00:00:48.0 + @@ -1,25 +1,25 @@ -Build status as of Mon Nov 5 00:00:01 2007 +Build status as of Tue Nov 6 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 29 11 0 +ccache 27 9 0 ctdb 0 0 0 distcc 1 0 0 -ldb 29 6 0 -libreplace 28 11 0 -lorikeet-heimdal 23 13 0 +ldb 28 17 0 +libreplace 27 10 0 +lorikeet-heimdal 22 12 0 pidl 16 3 0 ppp 9 7 0 python 0 0 0 -rsync29 13 0 +rsync28 13 0 samba-docs 0 0 0 samba-gtk2 2 0 samba4 26 17 5 samba_3_20 0 0 -samba_3_2_test 29 19 0 -smb-build28 28 0 -talloc 29 2 0 -tdb 29 3 0 +samba_3_2_test 27 28 0 +smb-build27 27 0 +talloc 28 2 0 +tdb 28 3 0
svn commit: samba r25845 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-06 00:49:54 + (Tue, 06 Nov 2007) New Revision: 25845 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25845 Log: Reformat the dfs test. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c === --- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-05 21:57:44 UTC (rev 25844) +++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-06 00:49:54 UTC (rev 25845) @@ -1,19 +1,19 @@ -/* +/* Unix SMB/CIFS implementation. test suite for rpc dfs operations Copyright (C) Andrew Tridgell 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -43,7 +43,10 @@ return true;\ }\ -static bool test_NetShareAdd(TALLOC_CTX *mem_ctx, const char *host, const char *sharename, const char *dir) +static bool test_NetShareAdd(TALLOC_CTX *mem_ctx, +const char *host, +const char *sharename, +const char *dir) { NTSTATUS status; struct srvsvc_NetShareInfo2 i; @@ -73,7 +76,7 @@ status = libnet_AddShare(libnetctx, mem_ctx, r); if (!NT_STATUS_IS_OK(status)) { - d_printf(Failed to add new share: %s (%s)\n, + d_printf(Failed to add new share: %s (%s)\n, nt_errstr(status), r.out.error_string); return false; } @@ -81,7 +84,9 @@ return true; } -static bool test_NetShareDel(TALLOC_CTX *mem_ctx, const char *host, const char *sharename) +static bool test_NetShareDel(TALLOC_CTX *mem_ctx, +const char *host, +const char *sharename) { NTSTATUS status; struct libnet_context* libnetctx; @@ -100,7 +105,7 @@ status = libnet_DelShare(libnetctx, mem_ctx, r); if (!NT_STATUS_IS_OK(status)) { - d_printf(Failed to delete share: %s (%s)\n, + d_printf(Failed to delete share: %s (%s)\n, nt_errstr(status), r.out.error_string); return false; } @@ -108,10 +113,10 @@ return true; } -static bool test_CreateDir(TALLOC_CTX *mem_ctx, - struct smbcli_state **cli, - const char *host, - const char *share, +static bool test_CreateDir(TALLOC_CTX *mem_ctx, + struct smbcli_state **cli, + const char *host, + const char *share, const char *dir) { printf(Creating directory %s\n, dir); @@ -127,19 +132,23 @@ return true; } -static bool test_DeleteDir(struct smbcli_state *cli, const char *dir) +static bool test_DeleteDir(struct smbcli_state *cli, + const char *dir) { printf(Deleting directory %s\n, dir); if (smbcli_deltree(cli-tree, dir) == -1) { - printf(Unable to delete dir %s - %s\n, dir, smbcli_errstr(cli-tree)); + printf(Unable to delete dir %s - %s\n, dir, + smbcli_errstr(cli-tree)); return false; } return true; } -static bool test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, enum dfs_ManagerVersion *version) +static bool test_GetManagerVersion(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + enum dfs_ManagerVersion *version) { NTSTATUS status; struct dfs_GetManagerVersion r; @@ -155,7 +164,9 @@ return true; } -static bool test_ManagerInitialize(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host) +static bool test_ManagerInitialize(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) { NTSTATUS status; enum dfs_ManagerVersion version; @@ -175,7 +186,8 @@ printf(ManagerInitialize failed - %s\n, nt_errstr(status)); return false; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf(dfs_ManagerInitialize
svn commit: samba r25846 - in branches/SAMBA_4_0: . source/lib/ldb source/lib/replace
Author: jelmer Date: 2007-11-06 01:05:19 + (Tue, 06 Nov 2007) New Revision: 25846 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25846 Log: Add configure test for -Wl,--export-dynamic. Added: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/configure.ac branches/SAMBA_4_0/source/lib/replace/libreplace.m4 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 00:49:54 UTC (rev 25845) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 01:05:19 UTC (rev 25846) @@ -34,7 +34,7 @@ SHLIBEXT = @SHLIBEXT@ -LD_EXPORT_DYNAMIC = -Wl,--export-dynamic +LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@ CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \ $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \ Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac === --- branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 00:49:54 UTC (rev 25845) +++ branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 01:05:19 UTC (rev 25846) @@ -71,5 +71,7 @@ AC_SUBST(TESTS) AC_SUBST(EXTRA_OBJ) +AC_LD_EXPORT_DYNAMIC + m4_include(libldb.m4) AC_OUTPUT(Makefile ldb.pc) Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4 === --- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-11-06 00:49:54 UTC (rev 25845) +++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-11-06 01:05:19 UTC (rev 25846) @@ -355,5 +355,6 @@ ]) m4_include(libreplace_cc.m4) +m4_include(libreplace_ld.m4) m4_include(libreplace_macros.m4) m4_include(autoconf-2.60.m4) Added: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 === --- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 00:49:54 UTC (rev 25845) +++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 01:05:19 UTC (rev 25846) @@ -0,0 +1,10 @@ +AC_DEFUN([AC_LD_EXPORT_DYNAMIC], +[ +saved_LDFLAGS=$LDFLAGS +LDFLAGS=$LDFLAGS -Wl,--export-dynamic +AC_LINK_IFELSE([ int main() { return 0; } ], +[ LD_EXPORT_DYNAMIC=-Wl,--export-dynamic ], +[ LD_EXPORT_DYNAMIC= ]) +AC_SUBST(LD_EXPORT_DYNAMIC) +LDFLAGS=$saved_LDFLAGS +])
svn commit: samba r25847 - in branches/SAMBA_4_0: . source/build/smb_build
Author: jelmer Date: 2007-11-06 01:05:26 + (Tue, 06 Nov 2007) New Revision: 25847 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25847 Log: Don't link modules against their subsystem. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/build/smb_build/input.pm 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/build/smb_build/input.pm === --- branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-11-06 01:05:19 UTC (rev 25846) +++ branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-11-06 01:05:26 UTC (rev 25847) @@ -102,7 +102,6 @@ my $sane_subsystem = lc($mod-{SUBSYSTEM}); $sane_subsystem =~ s/^lib//; $mod-{INSTALLDIR} = MODULESDIR/$sane_subsystem; - push (@{$mod-{PRIVATE_DEPENDENCIES}}, $mod-{SUBSYSTEM}); } if (grep(/INTEGRATED/, @{$mod-{OUTPUT_TYPE}})) { push (@{$INPUT-{$mod-{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod-{INIT_FUNCTION}) if defined($mod-{INIT_FUNCTION});
svn commit: samba r25848 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: gd Date: 2007-11-06 01:24:07 + (Tue, 06 Nov 2007) New Revision: 25848 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25848 Log: Add IDL and torture test for dfs_SetDcAddress and dfs_GetDcAddress. Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl branches/SAMBA_4_0/source/torture/rpc/dfs.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl === --- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-11-06 01:05:26 UTC (rev 25847) +++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2007-11-06 01:24:07 UTC (rev 25848) @@ -377,10 +377,20 @@ ); /* Function 0x10 */ - WERROR dfs_GetDcAddress(); + WERROR dfs_GetDcAddress( + [in][string,charset(UTF16)] uint16 servername[], + [in,out,ref][string,charset(UTF16)] uint16 **server_fullname, + [in,out,ref]boolean8 *is_root, + [in,out,ref]uint32 *ttl + ); /* Function 0x11 */ - WERROR dfs_SetDcAddress(); + WERROR dfs_SetDcAddress( + [in][string,charset(UTF16)] uint16 servername[], + [in][string,charset(UTF16)] uint16 server_fullname[], + [in]uint32 flags, + [in]uint32 ttl + ); /* Function 0x12 */ WERROR dfs_FlushFtTable( Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c === --- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-06 01:05:26 UTC (rev 25847) +++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-06 01:24:07 UTC (rev 25848) @@ -522,6 +522,80 @@ return ret; } +static bool test_GetDcAddress(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) +{ + NTSTATUS status; + struct dfs_GetDcAddress r; + uint8_t is_root = 0; + uint32_t ttl = 0; + const char *ptr; + + printf(Testing GetDcAddress\n); + + ptr = host; + + r.in.servername = host; + r.in.server_fullname = r.out.server_fullname = ptr; + r.in.is_root = r.out.is_root = is_root; + r.in.ttl = r.out.ttl = ttl; + + status = dcerpc_dfs_GetDcAddress(p, mem_ctx, r); + if (!NT_STATUS_IS_OK(status)) { + printf(GetDcAddress failed - %s\n, nt_errstr(status)); + return false; + } else if (!W_ERROR_IS_OK(r.out.result)) { + printf(dfs_GetDcAddress failed - %s\n, + win_errstr(r.out.result)); + return false; + } + + return true; +} + +static bool test_SetDcAddress(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) +{ + NTSTATUS status; + struct dfs_SetDcAddress r; + + printf(Testing SetDcAddress\n); + + r.in.servername = host; + r.in.server_fullname = host; + r.in.flags = 0; + r.in.ttl = 1000; + + status = dcerpc_dfs_SetDcAddress(p, mem_ctx, r); + if (!NT_STATUS_IS_OK(status)) { + printf(SetDcAddress failed - %s\n, nt_errstr(status)); + return false; + } else if (!W_ERROR_IS_OK(r.out.result)) { + printf(dfs_SetDcAddress failed - %s\n, + win_errstr(r.out.result)); + return false; + } + + return true; +} + +static bool test_DcAddress(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) +{ + if (!test_GetDcAddress(p, mem_ctx, host)) { + return false; + } + + if (!test_SetDcAddress(p, mem_ctx, host)) { + return false; + } + + return true; +} + bool torture_rpc_dfs(struct torture_context *torture) { NTSTATUS status; @@ -538,6 +612,7 @@ ret = test_Enum(p, torture); ret = test_EnumEx(p, torture, host); ret = test_StdRoot(p, torture, host); + ret = test_DcAddress(p, torture, host); return ret; }
svn commit: samba r25849 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-06 01:39:47 + (Tue, 06 Nov 2007) New Revision: 25849 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25849 Log: Add test for dfs FlushFtTable. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c === --- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-06 01:24:07 UTC (rev 25848) +++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2007-11-06 01:39:47 UTC (rev 25849) @@ -596,6 +596,47 @@ return true; } +static bool test_FlushFtTable(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host, + const char *sharename) +{ + NTSTATUS status; + struct dfs_FlushFtTable r; + enum dfs_ManagerVersion version; + + printf(Testing FlushFtTable\n); + + if (!test_GetManagerVersion(p, mem_ctx, version)) { + return false; + } + + r.in.servername = host; + r.in.rootshare = sharename; + + status = dcerpc_dfs_FlushFtTable(p, mem_ctx, r); + if (!NT_STATUS_IS_OK(status)) { + printf(FlushFtTable failed - %s\n, nt_errstr(status)); + return false; + } else if (!W_ERROR_IS_OK(r.out.result)) { + printf(dfs_FlushFtTable failed - %s\n, + win_errstr(r.out.result)); + IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result); + return false; + } + + return true; +} + +static bool test_FtRoot(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) +{ + const char *sharename = SMBTORTURE_DFS_SHARENAME; + + return test_FlushFtTable(p, mem_ctx, host, sharename); +} + bool torture_rpc_dfs(struct torture_context *torture) { NTSTATUS status; @@ -612,6 +653,7 @@ ret = test_Enum(p, torture); ret = test_EnumEx(p, torture, host); ret = test_StdRoot(p, torture, host); + ret = test_FtRoot(p, torture, host); ret = test_DcAddress(p, torture, host); return ret;
svn commit: samba r25850 - in branches/SAMBA_4_0: . source/build/m4 source/lib/ldb source/lib/replace
Author: jelmer Date: 2007-11-06 02:16:55 + (Tue, 06 Nov 2007) New Revision: 25850 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25850 Log: Add macro for picflag. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/build/m4/check_ld.m4 branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/configure.ac branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 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/build/m4/check_ld.m4 === --- branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 01:39:47 UTC (rev 25849) +++ branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 02:16:55 UTC (rev 25850) @@ -56,7 +56,6 @@ SHLD_FLAGS=-shared -Wl,-Bsymbolic SHLD_UNDEF_FLAGS=-Wl,--allow-shlib-undefined LDFLAGS=$LDFLAGS -Wl,--export-dynamic - PICFLAG=-fPIC SONAMEFLAG=-Wl,-soname= ;; *solaris*) @@ -64,13 +63,11 @@ SHLD_FLAGS=-G SONAMEFLAG=-h if test ${GCC} = yes; then - PICFLAG=-fPIC SONAMEFLAG=-Wl,-soname= if test ${ac_cv_prog_gnu_ld} = yes; then LDFLAGS=$LDFLAGS -Wl,-E fi else - PICFLAG=-KPIC ## ${CFLAGS} added for building 64-bit shared ## libs using Sun's Compiler SHLD_FLAGS=-G \${CFLAGS} @@ -80,20 +77,17 @@ BLDSHARED=true SHLD_FLAGS=-G SONAMEFLAG=-Wl,-h, - PICFLAG=-KPIC # Is this correct for SunOS ;; *netbsd* | *freebsd* | *dragonfly* ) BLDSHARED=true LDFLAGS=$LDFLAGS -Wl,--export-dynamic SONAMEFLAG=-Wl,-soname, - PICFLAG=-fPIC -DPIC ;; *openbsd*) # disabled because us4 fails to link libtorture.so BLDSHARED=false LDFLAGS=$LDFLAGS -Wl,-Bdynamic SONAMEFLAG=-Wl,-soname, - PICFLAG=-fPIC ;; *irix*) # disabled because us4 fails to link libtorture.so @@ -101,19 +95,12 @@ SHLD_FLAGS=-set_version sgi1.0 -shared SONAMEFLAG=-soname SHLD=${PROG_LD} - if test ${GCC} = yes; then - PICFLAG=-fPIC - else - PICFLAG=-KPIC - fi ;; *aix*) # disabled because us4 fails to link libtorture.so BLDSHARED=false SHLD_FLAGS=-Wl,-G,-bexpall,-bbigtoc LDFLAGS=$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc - # as AIX code is always position independent... - PICFLAG=-O2 ;; *hpux*) # Use special PIC flags for the native HP-UX compiler. @@ -121,14 +108,11 @@ BLDSHARED=true SHLD_FLAGS=-b -Wl,-B,symbolic,-b,-z SONAMEFLAG=-Wl,+h - PICFLAG=+z +ESnolit elif test ${GCC} = yes; then BLDSHARED=true # I hope this is correct - PICFLAG=-fPIC fi if test $host_cpu = ia64; then SHLIBEXT=so - PICFLAG=+z LDFLAGS=$LDFLAGS -Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32 else SHLIBEXT=sl @@ -139,12 +123,10 @@ # disabled because tru64 fails to link libtorture.so BLDSHARED=false SONAMEFLAG=-Wl,-soname, - PICFLAG=-fPIC ;; *unixware*) BLDSHARED=true SONAMEFLAG=-Wl,-soname, - PICFLAG=-KPIC ;; *darwin*) BLDSHARED=true @@ -167,6 +149,8 @@ AC_MSG_CHECKING([STLD_FLAGS]) AC_MSG_RESULT([$STLD_FLAGS]) +AC_LD_PICFLAG + AC_ARG_ENABLE(shared, [ --disable-sharedDisable testing for building shared libraries], [],[enable_shared=yes]) Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 01:39:47 UTC (rev 25849) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:16:55 UTC (rev 25850) @@ -36,6 +36,7 @@ LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@ +PICFLAG =
svn commit: samba r25851 - in branches/SAMBA_4_0: . source/build/m4 source/lib/ldb source/lib/replace
Author: jelmer Date: 2007-11-06 02:17:05 + (Tue, 06 Nov 2007) New Revision: 25851 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25851 Log: Move system-specific ldflags checks to libreplace so they can be used by ldb. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/build/m4/check_ld.m4 branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/configure.ac branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 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/.bzrignore === --- branches/SAMBA_4_0/.bzrignore 2007-11-06 02:16:55 UTC (rev 25850) +++ branches/SAMBA_4_0/.bzrignore 2007-11-06 02:17:05 UTC (rev 25851) @@ -204,3 +204,4 @@ source/torture/winbind/proto.h source/lib/ldb/tdbtest.ldb source/lib/ldb/tdbtest.ldb +*.po Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4 === --- branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 02:16:55 UTC (rev 25850) +++ branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 02:17:05 UTC (rev 25851) @@ -31,7 +31,6 @@ BLDSHARED=false LD=${CC} SHLD=${CC} -SHLD_FLAGS=-shared SHLIBEXT=so SONAMEFLAG= PICFLAG= @@ -53,29 +52,22 @@ case $host_os in *linux*) BLDSHARED=true - SHLD_FLAGS=-shared -Wl,-Bsymbolic SHLD_UNDEF_FLAGS=-Wl,--allow-shlib-undefined LDFLAGS=$LDFLAGS -Wl,--export-dynamic SONAMEFLAG=-Wl,-soname= ;; *solaris*) BLDSHARED=true - SHLD_FLAGS=-G SONAMEFLAG=-h if test ${GCC} = yes; then SONAMEFLAG=-Wl,-soname= if test ${ac_cv_prog_gnu_ld} = yes; then LDFLAGS=$LDFLAGS -Wl,-E fi - else - ## ${CFLAGS} added for building 64-bit shared - ## libs using Sun's Compiler - SHLD_FLAGS=-G \${CFLAGS} fi ;; *sunos*) BLDSHARED=true - SHLD_FLAGS=-G SONAMEFLAG=-Wl,-h, ;; *netbsd* | *freebsd* | *dragonfly* ) @@ -92,21 +84,18 @@ *irix*) # disabled because us4 fails to link libtorture.so BLDSHARED=false - SHLD_FLAGS=-set_version sgi1.0 -shared SONAMEFLAG=-soname SHLD=${PROG_LD} ;; *aix*) # disabled because us4 fails to link libtorture.so BLDSHARED=false - SHLD_FLAGS=-Wl,-G,-bexpall,-bbigtoc LDFLAGS=$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc ;; *hpux*) # Use special PIC flags for the native HP-UX compiler. if test $ac_cv_prog_cc_Ae = yes; then BLDSHARED=true - SHLD_FLAGS=-b -Wl,-B,symbolic,-b,-z SONAMEFLAG=-Wl,+h elif test ${GCC} = yes; then BLDSHARED=true # I hope this is correct @@ -130,7 +119,6 @@ ;; *darwin*) BLDSHARED=true - SHLD_FLAGS=-bundle -flat_namespace -undefined suppress SHLIBEXT=dylib ;; esac @@ -150,6 +138,8 @@ AC_MSG_RESULT([$STLD_FLAGS]) AC_LD_PICFLAG +AC_LD_EXPORT_DYNAMIC +AC_LD_SHLDFLAGS AC_ARG_ENABLE(shared, [ --disable-sharedDisable testing for building shared libraries], Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:16:55 UTC (rev 25850) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:17:05 UTC (rev 25851) @@ -35,6 +35,7 @@ SHLIBEXT = @SHLIBEXT@ LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@ +SHLD_FLAGS = @SHLD_FLAGS@ PICFLAG = @PICFLAG@ CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \ @@ -112,10 +113,10 @@ @-ranlib $@ lib/libnss_ldb.so.2: $(NSS_OBJ) $(LIBS) bin/libldb.a - $(CC) -shared -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) + $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) sample_module.$(SHLIBEXT): tests/sample_module.po - $(CC) -shared -o $@ tests/sample_module.po + $(CC) $(SHLD_FLAGS) -o $@ tests/sample_module.po bin/ldbadd: tools/ldbadd.o tools/cmdline.o $(LIBS)
svn commit: samba r25852 - in branches/SAMBA_4_0: . source/build/m4 source/lib/ldb source/lib/replace
Author: jelmer Date: 2007-11-06 02:35:46 + (Tue, 06 Nov 2007) New Revision: 25852 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25852 Log: Move SHLIBEXT determination into a test as well. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/build/m4/check_ld.m4 branches/SAMBA_4_0/source/lib/ldb/configure.ac branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 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/build/m4/check_ld.m4 === --- branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 02:17:05 UTC (rev 25851) +++ branches/SAMBA_4_0/source/build/m4/check_ld.m4 2007-11-06 02:35:46 UTC (rev 25852) @@ -18,11 +18,8 @@ AC_SUBST(LD) AC_SUBST(LDFLAGS) AC_SUBST(SHLD) -AC_SUBST(SHLD_FLAGS) AC_SUBST(SHLD_UNDEF_FLAGS) -AC_SUBST(SHLIBEXT) AC_SUBST(SONAMEFLAG) -AC_SUBST(PICFLAG) # Assume non-shared by default and override below # these are the defaults, good for lots of systems @@ -31,7 +28,6 @@ BLDSHARED=false LD=${CC} SHLD=${CC} -SHLIBEXT=so SONAMEFLAG= PICFLAG= @@ -101,10 +97,8 @@ BLDSHARED=true # I hope this is correct fi if test $host_cpu = ia64; then - SHLIBEXT=so LDFLAGS=$LDFLAGS -Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32 else - SHLIBEXT=sl LDFLAGS=$LDFLAGS -Wl,-E,+b/usr/local/lib:/usr/lib fi ;; @@ -119,7 +113,6 @@ ;; *darwin*) BLDSHARED=true - SHLIBEXT=dylib ;; esac @@ -140,6 +133,7 @@ AC_LD_PICFLAG AC_LD_EXPORT_DYNAMIC AC_LD_SHLDFLAGS +AC_LD_SHLIBEXT AC_ARG_ENABLE(shared, [ --disable-sharedDisable testing for building shared libraries], Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac === --- branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 02:17:05 UTC (rev 25851) +++ branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 02:35:46 UTC (rev 25852) @@ -38,9 +38,6 @@ AC_CONFIG_HEADER(include/config.h) AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen])) -SHLIBEXT=so # Should be set based on OS later on -AC_SUBST(SHLIBEXT) - AC_DEFINE_UNQUOTED(LDB_MODULESDIR, LIBDIR /ldb , [Modules directory] ) AC_SUBST(LDB_MODULESDIR) @@ -74,6 +71,7 @@ AC_LD_EXPORT_DYNAMIC AC_LD_PICFLAG AC_LD_SHLDFLAGS +AC_LD_SHLIBEXT m4_include(libldb.m4) AC_OUTPUT(Makefile ldb.pc) Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 === --- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 02:17:05 UTC (rev 25851) +++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 02:35:46 UTC (rev 25852) @@ -101,3 +101,21 @@ AC_SUBST(SHLD_FLAGS) ]) + +AC_DEFUN([AC_LD_SHLIBEXT], +[ + SHLIBEXT=so + case $host_os in + *hpux*) + if test $host_cpu = ia64; then + SHLIBEXT=so + else + SHLIBEXT=sl + fi + ;; + *darwin*) + SHLIBEXT=dylib + ;; + esac + AC_SUBST(SHLIBEXT) +])
svn commit: samba r25853 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2007-11-06 02:44:06 + (Tue, 06 Nov 2007) New Revision: 25853 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25853 Log: Specify LIBS to sample_module - fixes build for gcov hosts. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:35:46 UTC (rev 25852) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:44:06 UTC (rev 25853) @@ -37,13 +37,16 @@ LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@ SHLD_FLAGS = @SHLD_FLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ + PICFLAG = @PICFLAG@ CFLAGS=-g -I$(srcdir)/include -Iinclude -I$(srcdir) -I$(srcdir)/.. \ $(POPT_CFLAGS) $(TALLOC_CFLAGS) $(TDB_CFLAGS) \ -DLIBDIR=\$(libdir)\ -DSHLIBEXT=\$(SHLIBEXT)\ -DUSE_MMAP=1 @CFLAGS@ [EMAIL PROTECTED]@ -Llib -lldb @LIBS@ $(POPT_LIBS) $(TALLOC_LIBS) $(TDB_LIBS) \ - $(LDAP_LIBS) +LIB_FLAGS=$(LDFLAGS) -Llib -lldb $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \ + $(TDB_LIBS) $(LDAP_LIBS) LDB_TDB_DIR=ldb_tdb LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \ @@ -116,7 +119,7 @@ $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) sample_module.$(SHLIBEXT): tests/sample_module.po - $(CC) $(SHLD_FLAGS) -o $@ tests/sample_module.po + $(CC) $(SHLD_FLAGS) $(LIBS) $(LDFLAGS) -o $@ tests/sample_module.po bin/ldbadd: tools/ldbadd.o tools/cmdline.o $(LIBS) $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC)
svn commit: samba r25854 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2007-11-06 03:19:07 + (Tue, 06 Nov 2007) New Revision: 25854 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25854 Log: Link against -ldl properly. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/ldb/configure.ac 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 02:44:06 UTC (rev 25853) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 03:19:07 UTC (rev 25854) @@ -32,6 +32,8 @@ LDAP_LIBS = @LDAP_LIBS@ +LIBDL = @LIBDL@ + SHLIBEXT = @SHLIBEXT@ LD_EXPORT_DYNAMIC = @LD_EXPORT_DYNAMIC@ @@ -46,7 +48,7 @@ -DLIBDIR=\$(libdir)\ -DSHLIBEXT=\$(SHLIBEXT)\ -DUSE_MMAP=1 @CFLAGS@ LIB_FLAGS=$(LDFLAGS) -Llib -lldb $(LIBS) $(POPT_LIBS) $(TALLOC_LIBS) \ - $(TDB_LIBS) $(LDAP_LIBS) + $(TDB_LIBS) $(LDAP_LIBS) $(LIBDL) LDB_TDB_DIR=ldb_tdb LDB_TDB_OBJ=$(LDB_TDB_DIR)/ldb_tdb.o \ Modified: branches/SAMBA_4_0/source/lib/ldb/configure.ac === --- branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 02:44:06 UTC (rev 25853) +++ branches/SAMBA_4_0/source/lib/ldb/configure.ac 2007-11-06 03:19:07 UTC (rev 25854) @@ -36,7 +36,6 @@ AC_PATH_PROG(SLAPD,slapd) AC_CHECK_HEADERS(stdint.h dlfcn.h) AC_CONFIG_HEADER(include/config.h) -AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen])) AC_DEFINE_UNQUOTED(LDB_MODULESDIR, LIBDIR /ldb , [Modules directory] ) AC_SUBST(LDB_MODULESDIR)
svn commit: samba r25855 - in branches/SAMBA_4_0: . source/lib/replace
Author: jelmer Date: 2007-11-06 03:43:50 + (Tue, 06 Nov 2007) New Revision: 25855 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25855 Log: Check for HPUX dl functions. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/replace/dlfcn.m4 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/replace/dlfcn.m4 === --- branches/SAMBA_4_0/source/lib/replace/dlfcn.m4 2007-11-06 03:19:07 UTC (rev 25854) +++ branches/SAMBA_4_0/source/lib/replace/dlfcn.m4 2007-11-06 03:43:50 UTC (rev 25855) @@ -8,6 +8,11 @@ AC_CHECK_HEADERS(dlfcn.h) AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes]) +libreplace_cv_shl=no +AC_SEARCH_LIBS(shl_load, sl) +AC_CHECK_HEADERS(dl.h) +AC_CHECK_FUNCS([shl_load shl_unload shl_findsym],[],[libreplace_cv_shl=yes]) + AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)], [ return 0;
svn commit: samba r25857 - in branches/SAMBA_4_0/source/lib/ldb/common: .
Author: abartlet Date: 2007-11-06 03:47:41 + (Tue, 06 Nov 2007) New Revision: 25857 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25857 Log: Indent Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c 2007-11-06 03:46:57 UTC (rev 25856) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c 2007-11-06 03:47:41 UTC (rev 25857) @@ -321,7 +321,8 @@ convenience functions to return common types from a message these return the first value if the attribute is multi-valued */ -const struct ldb_val *ldb_msg_find_ldb_val(const struct ldb_message *msg, const char *attr_name) +const struct ldb_val *ldb_msg_find_ldb_val(const struct ldb_message *msg, + const char *attr_name) { struct ldb_message_element *el = ldb_msg_find_element(msg, attr_name); if (!el || el-num_values == 0) {
svn commit: samba r25856 - in branches/SAMBA_4_0/source/lib/ldb/common: .
Author: abartlet Date: 2007-11-06 03:46:57 + (Tue, 06 Nov 2007) New Revision: 25856 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25856 Log: If the search fails, it is not valid to steal 'res'. 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-06 03:43:50 UTC (rev 25855) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2007-11-06 03:46:57 UTC (rev 25856) @@ -322,15 +322,16 @@ } ret = ldb_search(ldb, mods_dn, LDB_SCOPE_BASE, , attrs, res); + + 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 (ret == LDB_SUCCESS (res-count == 0 || res-msgs[0]-num_elements == 0)) { + if (res-count == 0 || res-msgs[0]-num_elements == 0) { 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; - } if (res-count 1) { ldb_debug(ldb, LDB_DEBUG_FATAL, Too many records found (%d), bailing out\n, res-count); talloc_free(mem_ctx);
svn commit: samba r25858 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2007-11-06 04:26:47 + (Tue, 06 Nov 2007) New Revision: 25858 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25858 Log: Clean up po files. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 03:47:41 UTC (rev 25857) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 04:26:47 UTC (rev 25858) @@ -162,7 +162,7 @@ test -z $(DOXYGEN) || (cd $(srcdir) $(DOXYGEN)) clean: - rm -f *.o */*.o *.gcov */*.gc?? tdbtest.ldb* + rm -f *.po */*.po *.o */*.o *.gcov */*.gc?? tdbtest.ldb* rm -f $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LIB) $(NSS_LIB) rm -f man/*.1 man/*.3 man/*.html rm -f $(EXAMPLES)
svn commit: samba r25859 - in branches/SAMBA_4_0: . source/lib/replace
Author: jelmer Date: 2007-11-06 04:26:52 + (Tue, 06 Nov 2007) New Revision: 25859 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25859 Log: Wrap native HPUX functions in dl implementation. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/replace/dlfcn.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/replace/dlfcn.c === --- branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-11-06 04:26:47 UTC (rev 25858) +++ branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-11-06 04:26:52 UTC (rev 25859) @@ -23,6 +23,9 @@ */ #include replace.h +#ifdef HAVE_DL_H +#include dl.h +#endif #ifndef HAVE_DLOPEN #ifdef DLOPEN_TAKES_UNSIGNED_FLAGS @@ -31,13 +34,22 @@ void *rep_dlopen(const char *name, int flags) #endif { +#ifdef HAVE_SHL_LOAD + return (void *)shl_load(name, flags, 0); +#else return NULL; +#endif } #endif #ifndef HAVE_DLSYM void *rep_dlsym(void *handle, const char *symbol) { +#ifdef HAVE_SHL_FINDSYM + void *sym_addr; + if (!shl_findsym((shl_t *)handle, symbol, TYPE_UNDEFINED, sym_addr)) + return sym_addr; +#endif return NULL; } #endif @@ -52,6 +64,10 @@ #ifndef HAVE_DLCLOSE int rep_dlclose(void *handle) { +#ifdef HAVE_SHL_CLOSE + return shl_unload((shl_t)handle); +#else return 0; +#endif } #endif
svn commit: samba r25860 - in branches/SAMBA_4_0: . source/lib/replace
Author: jelmer Date: 2007-11-06 04:26:57 + (Tue, 06 Nov 2007) New Revision: 25860 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25860 Log: Remove flag that causes problems on some hosts. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 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/replace/libreplace_ld.m4 === --- branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 04:26:52 UTC (rev 25859) +++ branches/SAMBA_4_0/source/lib/replace/libreplace_ld.m4 2007-11-06 04:26:57 UTC (rev 25860) @@ -84,7 +84,7 @@ SHLD_FLAGS=-G ;; *irix*) - SHLD_FLAGS=-set_version sgi1.0 -shared + SHLD_FLAGS=-shared ;; *aix*) SHLD_FLAGS=-Wl,-G,-bexpall,-bbigtoc
svn commit: samba r25862 - in branches/SAMBA_4_0: . source/lib/ldb
Author: jelmer Date: 2007-11-06 05:11:16 + (Tue, 06 Nov 2007) New Revision: 25862 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25862 Log: Avoid po, causes trouble on BSD systems. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 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/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 04:59:50 UTC (rev 25861) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-11-06 05:11:16 UTC (rev 25862) @@ -103,11 +103,6 @@ .c.o: @echo Compiling $*.c @mkdir -p `dirname [EMAIL PROTECTED] - @$(CC) $(CFLAGS) -c $ -o $@ - -.c.po: - @echo Compiling $*.c - @mkdir -p `dirname [EMAIL PROTECTED] @$(CC) $(CFLAGS) $(PICFLAG) -c $ -o $@ dirs: @@ -120,8 +115,8 @@ lib/libnss_ldb.so.2: $(NSS_OBJ) $(LIBS) bin/libldb.a $(CC) $(SHLD_FLAGS) -Wl,-soname,libnss_ldb.so.2 -o lib/libnss_ldb.so.2 $(NSS_OBJ) $(OBJS) $(LIB_FLAGS) -sample_module.$(SHLIBEXT): tests/sample_module.po - $(CC) $(SHLD_FLAGS) $(LIBS) $(LDFLAGS) -o $@ tests/sample_module.po +sample_module.$(SHLIBEXT): tests/sample_module.o + $(CC) $(SHLD_FLAGS) $(LIBS) $(LDFLAGS) -o $@ tests/sample_module.o bin/ldbadd: tools/ldbadd.o tools/cmdline.o $(LIBS) $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) @@ -153,7 +148,7 @@ examples/ldifreader: examples/ldifreader.o $(LIBS) $(CC) -o examples/ldifreader examples/ldifreader.o $(LIB_FLAGS) -.SUFFIXES: .1 .1.xml .3 .3.xml .xml .html .po +.SUFFIXES: .1 .1.xml .3 .3.xml .xml .html manpages: @$(srcdir)/docs/builddocs.sh $(XSLTPROC) $(srcdir) @@ -162,7 +157,7 @@ test -z $(DOXYGEN) || (cd $(srcdir) $(DOXYGEN)) clean: - rm -f *.po */*.po *.o */*.o *.gcov */*.gc?? tdbtest.ldb* + rm -f *.o */*.o *.gcov */*.gc?? tdbtest.ldb* rm -f $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LIB) $(NSS_LIB) rm -f man/*.1 man/*.3 man/*.html rm -f $(EXAMPLES)
svn commit: samba r25863 - in branches/SAMBA_4_0/source/lib/replace/system: .
Author: metze Date: 2007-11-06 06:54:49 + (Tue, 06 Nov 2007) New Revision: 25863 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25863 Log: libreplace: we need include unistd.h before nss_wrapper.h metze Modified: branches/SAMBA_4_0/source/lib/replace/system/passwd.h Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/system/passwd.h === --- branches/SAMBA_4_0/source/lib/replace/system/passwd.h 2007-11-06 05:11:16 UTC (rev 25862) +++ branches/SAMBA_4_0/source/lib/replace/system/passwd.h 2007-11-06 06:54:49 UTC (rev 25863) @@ -27,6 +27,9 @@ */ +/* this needs to be included before nss_wrapper.h on some systems */ +#include unistd.h + #ifdef HAVE_PWD_H #include pwd.h #endif
svn commit: samba r25865 - in branches/SAMBA_4_0/source/lib/replace/system: .
Author: metze Date: 2007-11-06 07:26:12 + (Tue, 06 Nov 2007) New Revision: 25865 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25865 Log: libreplace: check for nss passwd|group get*_r functions metze Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-11-06 07:01:17 UTC (rev 25864) +++ branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-11-06 07:26:12 UTC (rev 25865) @@ -18,6 +18,8 @@ # passwd AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) +AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r) +AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r) # locale AC_CHECK_HEADERS(ctype.h locale.h)
svn commit: samba r25864 - in branches/SAMBA_4_0/source/lib/replace: .
Author: metze Date: 2007-11-06 07:01:17 + (Tue, 06 Nov 2007) New Revision: 25864 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25864 Log: libreplace: we should only have one location where we check for required functions metze Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4 === --- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-11-06 06:54:49 UTC (rev 25863) +++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-11-06 07:01:17 UTC (rev 25864) @@ -280,9 +280,6 @@ eprintf(bla, bar); ], AC_DEFINE(HAVE__VA_ARGS__MACRO, 1, [Whether the __VA_ARGS__ macro is available])) -# Check prerequisites -AC_CHECK_FUNCS([memset printf syslog], [], - [ AC_MSG_ERROR([Required function not found])]) AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [ AC_TRY_COMPILE([ @@ -331,7 +328,7 @@ m4_include(getaddrinfo.m4) m4_include(repdir.m4) -AC_CHECK_FUNCS([syslog memset memcpy],,[AC_MSG_ERROR([Required function not found])]) +AC_CHECK_FUNCS([syslog printf memset memcpy],,[AC_MSG_ERROR([Required function not found])]) echo LIBREPLACE_BROKEN_CHECKS: END ]) dnl end AC_LIBREPLACE_BROKEN_CHECKS