Re: [Samba] date created attribute doesn't seem right

2006-03-13 Thread Henrik Zagerholm

Just be sure to use the same compile flags as Samba or you get errors.
I forgot the -D_LARGFILE flag and got wrong mtime/atime numbers. I  
think the file pointers get messed up.


Cheers,
Henrik


13 mar 2006 kl. 05:34 skrev g wenzel:

I have transfered files larger than 2GB on both the debian server  
and the snap.  In both cases, the md5 sums of the files are equal.   
Perhaps the issue doesn't have to do with large file support?


-gerald


-Original Message-
From: Henrik Zagerholm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 8, 2006 11:11 PM
To: 'g wenzel'
Cc: samba@lists.samba.org
Subject: Re: [Samba] date created attribute doesn't seem right

Hi,

I had the same problem when developing with libsmbclient.
The problem was that I didn't compile with -D_LARGEFILE support.

If you've compiled samba by yourself please make sure you use that  
flag.


Cheers,
Henrik
8 mar 2006 kl. 22:27 skrev g wenzel:


Greetings,

I've setup a samba server (ver 3.0.14a-3) on debian sarge.  When I
copy files to the server, the 'date created' attribute is always
the same value as the 'date modified' attribute.  The 'date
modified' attribute remains the same, but the 'date created'
changes as noted above.

I also have a snap server which has the same type of behavior.  It
is my understanding that snap servers run samba.

Is this a bug with samba or am I missing something?

Thanks.
Gerald Wenzel


--
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] Trouble cups+samba 3.0.21c

2006-03-13 Thread Maurizio Faccio
I am getting this error in the log.smbd


[2006/03/13 09:46:57, 0] printing/print_cups.c:cups_queue_get(956)
  Unable to get printer status for  - client-error-not-found

TIA

Maurizio




Ing. Maurizio Faccio
Merbe Ltda.
Av. Italia 2348. 
Paysandú, Uruguay
Tel : 598-72-29043 Int. 130
Fax: 598-72-22591
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] is there a possibility to start a programm from samba on a windows machine?]

2006-03-13 Thread Tomasz Chmielewski

Henrik Zagerholm wrote:

It sure could be :)

I know that  Jerry (Carter) of the samba team was looking at this a 
while ago (psexec) but I guess he's been busy with the Samba4 TP.
Samba TNG has a command called cmdat which will let you schedule 
commands on a win box using the at command.

www.samba-tng.org
By using the /now parameter you can execute commands directly.
This is not the best solutions but it is workable until Jerry has made 
his magic coding. :)


Everything great, but at doesn't have /now parameter. At least on
Windows 2000 SP4 and XP SP2.


--
Tomasz Chmielewski
http://wpkg.org



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: Why do un-groupmap'ed Unix groups show up in Windows?

2006-03-13 Thread Michael Lueck

Gerald (Jerry) Carter wrote:


The unmapped groups are still part of the user's token.  So they
have to be reported somehow.


Would it be a more correct understanding of net groupmap to describe it as mapping between Unix / Samba groups which do not have the same name but should be considered as equiv, and if the names are 
the same then the command is not needed because the default behavior is to pass along those groups to Samba... I.E. would be redundant?


Thanks!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] is there a possibility to start a programm from samba on a windows machine?]

2006-03-13 Thread Henrik Zagerholm

I guess the Imperial Army decided to remove it =)
But you can always pipe a time a few seconds away to the command
Hopefully the Samba team will put together the long awaited psexec  
utility soon. =)


Cheers,
Henrik
13 mar 2006 kl. 13:42 skrev Tomasz Chmielewski:


Henrik Zagerholm wrote:

It sure could be :)
I know that  Jerry (Carter) of the samba team was looking at this  
a while ago (psexec) but I guess he's been busy with the Samba4 TP.
Samba TNG has a command called cmdat which will let you schedule  
commands on a win box using the at command.

www.samba-tng.org
By using the /now parameter you can execute commands directly.
This is not the best solutions but it is workable until Jerry has  
made his magic coding. :)


Everything great, but at doesn't have /now parameter. At least on
Windows 2000 SP4 and XP SP2.


--
Tomasz Chmielewski
http://wpkg.org



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] is there a possibility to start a programm from samba on a windows machine?]

2006-03-13 Thread Tomasz Chmielewski

Henrik Zagerholm wrote:

I guess the Imperial Army decided to remove it =)
But you can always pipe a time a few seconds away to the command


If the workstation clock is out of sync, then you're out of luck.
Even if the clock is in sync, you can specify at jobs with minute 
precision - so if you intended to run a script, it may wait a minute for 
the task, and if you're unlucky, you'll wait 24 hours for it to complete 
(if you only give time (HH:MM) to at, and you're late a few secs, 
it'll be executed the next day.



Hopefully the Samba team will put together the long awaited psexec 
utility soon. =)


True.


--
Tomasz Chmielewski
http://wpkg.org
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] samba4wins - all ok but how to use nmblookup from my PDC?

2006-03-13 Thread simo
On Fri, 2006-03-10 at 09:07 -0500, Pablo Chamorro C. wrote:
 I installed samba4wins on two of my Fedora Core 3 servers (from src rpm), 
 on one PDC (samba 3.0.21c) and on one standalone server without samba, in 
 order to test samba4wins.  I think I managed to install and to setup 
 properly the software but it seems nmblookup is not working on the PDC 
 samba:
 
 [user]$ nmblookup '*'
 querying * on 192.168.19.255
 name_query failed to find name *

Are you there is no firewall software blocking answers to the request ?

 From any other linux, including the standalone machine nmblookup '*' 
 works. I followed the instructions given on samba4wins-1.0.1-HOWTO.txt.
 
 On the other side, I am having similar samba4wins records both for user 
 machines and for users!  Is this ok? Please look below.

Yes, workstations register the username with Netbios to be able, for
example, to receive messages directed to a username. This is also why
you should never name a workstation after the username, you may end up
in conflicts.

Netbios names can represent a number of things as they represent
services not merely machines. In a busy network you should find user
programs registering their own names sometimes too.

 2. in the linux without samba: eth0: 192.168.19.7 (standalone) and for 
 samba4wins: 192.168.19.107 (standalone-wins)
 
 [globals]
 netbios name = standalone-wins
 workgroup = group
 interfaces = 192.168.19.107
 bind interfaces only = yes
 log level = 4
 nbtd:disable_broadcast = no


If this machine does not have samba, then you do not need to restirct
samba4wins to an alias, you can just use the primary interface.

The ip alias trick is used to let samba3 run it's own nmbd daemon on the
same address of smbd.

I'd make a network trace and see if the request goes out on the wire and
if any answer returns.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Samba 3.0.21b / Security = Server / Windows 2003 or XP clients / AIX 5.3 = Problems...

2006-03-13 Thread Lamar.Saxon

3.0.21c seems to fix the problems I was encountering with XP.  Working
on testing it with Windows 2003 now.

Lamar

-Original Message-
From: Jeremy Allison [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 3:16 PM
To: Saxon, Lamar
Cc: samba@lists.samba.org
Subject: Re: [Samba] Samba 3.0.21b / Security = Server / Windows 2003 or
XP clients / AIX 5.3 = Problems...

On Thu, Feb 23, 2006 at 11:55:44AM -0600, [EMAIL PROTECTED]
wrote:

 Wondering if any one has seen the following issues with Samba 3.0.21b
 with Windows XP and 2003 clients:

 [2006/02/23 11:47:58, 1] libsmb/ntlmssp.c:ntlmssp_update(252)
   Failed to parse NTLMSSP packet, could not extract NTLMSSP command
 [2006/02/23 11:47:58, 1] libsmb/ntlmssp.c:ntlmssp_update(252)
   Failed to parse NTLMSSP packet, could not extract NTLMSSP command

 Client logs are full of these messages.  Seems to only affect 2003 and
 XP clients since I upgraded to 3.0.21b since my Windows 2000 clients
are
 connecting with no issues.  I could connect with the same smb.conf
file
 with no issues on 3.0.20b; but was having a problem with 2003 servers
 connecting to Samba.

Can you get a sniffer trace to illustrate this ?

Jeremy.


Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Laptop (and Desktop) Linux as end user OS in a Samba PDC environment

2006-03-13 Thread Michael Lueck

OK, we have Win2K working nice and slick in the Samba PDC environment... NOW 
to make end user Linux just as slick. The documentation seems to be a bit slim on 
examples of giving Linux to users.

Win2K for example caches credentials. Does the Samba client do that as well? Thinking to join a Linux laptop to the domain first, but the docs seem to infer one will be having Samba do all 
authentication then... so what about when I am not in the office mode?


Examples of logon scripts for Linux clients... ???

Examples of printing to Samba print queues... ???

Anyone actually using Linux clients to a Samba PDC... ???

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Unable to add computer to domain

2006-03-13 Thread James Taylor
Wes,

Do a google search on this topic: [Samba] Can't join my domain

You will see what the problem is with the username can't be found.

James

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Wesley Hobbie
Sent: Sunday, March 12, 2006 11:14 AM
To: [EMAIL PROTECTED]
Cc: samba@lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain

Hey Craig,
Actually I found on the Internet that I needed to run smbldap-populate, so I
did and now I can manually add the user, although when I go to my Windows
2003 Server to join the domain I am still having a problem.
 
Wes
-- 
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] samba3.0.20b - nmbd error

2006-03-13 Thread Gururajan Ramachandran


I am attempting to setup a brand new samba3 domain. The WINS, DNS, DHCP 
and Samba are all be on MACHINNAME.


I put the domain name and the WINS machine name as a hard coded entries in 
/var/lib/samba/wins.dat:


MACHINNAME 0 192.168.12.4 66R
DOMAINNAME 0 192.168.12.4 66R

I still keep getting
  Cannot find my workgroup DOMAINNAME on subnet UNICAST_SUBNET.
in log.nmbd

I am looking at the wins stuff in the docs. Do you know where in the docs
it indicates how to fix this?

Thanks,

Guru

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Smbmount right's Problem

2006-03-13 Thread Andreas Koch
Hello,

i have problems with the right's, when i mount my home share.


The Version on the Server is (debian): 3.0.14a-6 0

The Version on the Client is (debian): 3.0.14a-3 0

This is the smb.conf on the Server side:

[global]

unix extensions = no
   panic action = /usr/share/samba/panic-action %d
   workgroup = abc123
   server string = %h server (Samba %v)

   guest account = nobody
   invalid users = root

   log file = /var/log/samba/log.%m
   max log size = 1000

   syslog = 0

   security = user

   encrypt passwords = true
   passdb backend = smbpasswd guest

   socket options = TCP_NODELAY

   dns proxy = no

   passwd program = /usr/bin/passwd %u

   obey pam restrictions = yes

[homes]
   comment = Home Directories
   browseable = no 
   writable = yes
   create mask = 0755
   directory mask = 0755

This is my problem:

when i have mount my home share - I see not the correct Permissions,
thats the home share have on the Server side.
When i make a chmod 644 of any File, on the Clientside the Permissions
are right. May the rights on the Server have not change ...

Two hours Later the Rights on the Client side change to the rights on
the Server side.

What make i wrongly!?

Thanks for your help.



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: getlocalsid: adding domain info...failed

2006-03-13 Thread Mont Rothstein
I figured this out, in case anyone else comes across it.  The problem was
with the conversion of the samba schema.  Fedora has a bug:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=170791


The conversion script pointed to by:

http://directory.fedora.redhat.com/wiki/Howto:Samba

is out-of-date.  A newer version, that works around this bug can be found
at:

http://www.netauth.com/~jacksonm/ldap/ol-schema-migrate.pl

-Mont


On 3/7/06, Mont Rothstein [EMAIL PROTECTED] wrote:

 I am trying to integrate Fedora Directory Server (1.0.1) and Samba (3.0.10)
 on RHEL ES4.

 When I execute net getlocalsid I get the following:

 [2006/03/07 17:55:29, 0] lib/smbldap.c:smbldap_search_domain_info(1392)
   Adding domain info for WORKGROUP failed with NT_STATUS_UNSUCCESSFUL
 SID for domain RHELES4RS1 is: S-1-5-21-807157010-1821471989-4121009367

 My workgroup is currently set to workgroup and I can perform an
 ldapsearch.

 I saw one refernce on the web to ignore this, but I was skeptical.

 What could be causing this error?

 The output of my testparm is below.

 Thanks,
 -Mont

 Load smb config files from /etc/samba/smb.conf
 Processing section [netlogon]
 Processing section [profiles]
 Processing section [homes]
 Processing section [printers]
 Processing section [repository]
 Processing section [root directory]
 Loaded services file OK.
 WARNING: You have some share names that are longer than 12 characters.
 These may not be accessible to some older clients.
 (Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
 Server role: ROLE_DOMAIN_PDC
 Press enter to see a dump of your service definitions
 # Global parameters
 [global]
 server string = rheles4rs1
 password server = None
 passdb backend = ldapsam:ldap://rheles4rs1.forayadams.foray.com:3911
 username map = /etc/samba/smbusers
 log file = /var/log/%m.log
 max log size = 50
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 printcap name = /etc/printcap
 logon path = \\%L\profiles\%u
 logon drive = H:
 logon home = \\%L\%u\profiles
 domain logons = Yes
 os level = 33
 preferred master = Yes
 domain master = Yes
 dns proxy = No
 wins support = Yes
 ldap admin dn = cn=Directory Manager
 ldap group suffix = ou=Groups
 ldap machine suffix = ou=Computers
 ldap suffix = dc=forayadams,dc=foray,dc=com
 ldap user suffix = ou=People
 idmap uid = 16777216-33554431
 idmap gid = 16777216-33554431
 cups options = raw

 [netlogon]
 path = /var/lib/samba/netlogon
 browseable = No

 [profiles]
 path = /var/lib/samba/profiles
 read only = No
 create mask = 0600
 directory mask = 0700

 [homes]
 comment = Home Directories
 read only = No
 browseable = No

 [printers]
 comment = All Printers
 path = /var/spool/samba
 printable = Yes
 browseable = No

 [repository]
 path = /repository
 valid users = testadmin, testuser
 read only = No


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] OpenBSD mac68k problems

2006-03-13 Thread Robb, Stephen
Hi Chester,

 

Hope all is well, tried reaching out to you at Sanofi, I guess you left
after the merge? Where are you at these days?

 

Best Regards

Stephen

 

 

 

Stephen Robb

Account Manager

Networked Information Systems

One Penn Plaza 

New York, NY 10119

Phone: 212-652-5721

Fax: 212-244-1685

Mobile: 914-837-4022

[EMAIL PROTECTED]

 

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: samba3.0.20b - nmbd error

2006-03-13 Thread Michael Lueck

Gururajan Ramachandran wrote:


MACHINNAME 0 192.168.12.4 66R
DOMAINNAME 0 192.168.12.4 66R

I still keep getting
  Cannot find my workgroup DOMAINNAME on subnet UNICAST_SUBNET.
in log.nmbd


Is there entries in that file for the same domain / machine except on different IP addresses? I've found that (at least in older versions) that nmbd writes to the files top down, also searches it top 
down. So if a machine address changes a few times, nmbd does not scan down far enough to find the current name/IP match.


--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Remove the upper case letters NOSPAM to contact me directly.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] /etc/pam.d/su

2006-03-13 Thread Guillermo Gutierrez
At the risk of going off topic here...
does anyone know how to configure the /etc/pam.d/su file to allow authenticated 
domain users to be able to 'su' into root.
Or atleast how to add them to the wheel groups so that I can su with a 
non-root, domain user?

Guillermo Gutierrez
Development Systems Engineer
Market Scan Information Systems
(818) 575-2000 x2427
[EMAIL PROTECTED]

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] nsswitch segfaults with Samba 3.0.21 on Solaris 9

2006-03-13 Thread J S
I've built Samba 3.0.21 with Kerb ADS, NSS, Winbind and PAM support  on
Solaris 9 using gcc 3.3.2.

  I'm able to compile and install and authentication works fine - I can
query and authenticate with AD, but when I su, passwd or some other local
auth Solaris command the command segfaults. This even happens if a valid
user is in any of the databases previous in the search pattern to winbind.


[EMAIL PROTECTED]:/export/build/smb321/lib]#  su - bob
Segmentation Fault


nsswitch.conf:
passwd: files winbind ldap
group:  files winbind ldap

-rwxr-xr-x   1 root other  87004 Dec 16 13:38
/usr/lib/libnss_winbind.so
lrwxrwxrwx   1 root other 26 Nov 30 15:46 libnss_winbind.so.1 -
/usr/lib/libnss_winbind.so
lrwxrwxrwx   1 root other 26 Nov 30 15:46 libnss_winbind.so.2 -
/usr/lib/libnss_winbind.so
lrwxrwxrwx   1 root other 26 Nov 30 15:46 nss_winbind.so.1 -
/usr/lib/libnss_winbind.so
lrwxrwxrwx   1 root other 26 Nov 30 15:46 nss_winbind.so.2 -
/usr/lib/libnss_winbind.so


I tried to get clever with nsswitch, and still got the same errors. :

#passwd: files ldap winbind [NOTFOUND=return]
#passwd: files ldap [SUCCESS=return] winbind
#group:  files ldap [SUCCESS=return] winbind
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba Errors with 3.0.21b on AIX -- please help

2006-03-13 Thread Ray Gebbie
I guess there have not been any responses because I did not specifically
ask a question.

Why would 3.0.4 work and 3.0.25b give indications that the system is not in
the domain?  The configurations are the same.

Ray Gebbie
Federated Systems Group
San Francisco, CA 94102
415-422-1662



   
 Ray Gebbie
 [EMAIL PROTECTED] 
 omTo 
 Sent by:  David Shapiro 
 samba-bounces+ray [EMAIL PROTECTED], 
 [EMAIL PROTECTED] samba@lists.samba.org   
 ists.samba.org cc 
   
   Subject 
 03/10/2006 09:32  Re: [Samba] Samba Errors with   
 AM3.0.21b on AIX -- please help   
   
   
   
   
   
   




Since 3.0.4 works, I am assumming that the system is in the domain.

But the errors seem to indicate it isn't.

Here is wbinfo:

[vobadm mcom4:/opt/Samba/3.0.21b/bin]  ./wbinfo -u
Error looking up domain users
[vobadm mcom4:/opt/Samba/3.0.21b/bin]  ./wbinfo -g
Error looking up domain groups

Ray Gebbie
Federated Systems Group
San Francisco, CA 94102
415-422-1662




 David Shapiro
 [EMAIL PROTECTED]
 bsnc.com  To
   Ray Gebbie [EMAIL PROTECTED]
 03/10/2006 07:28   cc
 AM
   Subject
   Re: [Samba] Samba Errors with
   3.0.21b on AIX -- please help










Does wbinfo -u/-g work for you?

david

David Shapiro
Unix Team Lead
919-765-2011

 Ray Gebbie [EMAIL PROTECTED] 3/8/2006 11:42:14 AM 
There have been no responses yet for this.  Perhaps I am not asking the
right questions.  If there is something obvious that I am missing please
let me know, because we are unable to upgrade the way things are now.

Thanks.

Ray Gebbie
Federated Systems Group
San Francisco, CA 94102
415-422-1662




 Ray Gebbie
 [EMAIL PROTECTED]
 omTo
 Sent by:  samba@lists.samba.org
 samba-bounces+ray  cc
 [EMAIL PROTECTED]
 ists.samba.orgSubject
   [Samba] Samba Errors with 3.0.21b
   on AIX -- please help
 03/07/2006 10:51
 AM









I have been trying for 3 weeks to get 3.0.21b to work on AIX 5.2.  I am
currently running 3.0.4, which has no problems.  I am getting very
frustrated, and am about to give up entirely on Samba.

Here are some of the errors I am getting:

[root mcom4:/opt/Samba/3.0.21b/bin]  ./smbclient -L ccasemcom4 -d 3 -N
-Ub06reg%Becky1208
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file /opt/Samba/3.0.21
b/lib/smb.conf
Processing section [global]
added interface ip=11.16.153.89 bcast=11.16.155.255 nmask=255.255.252.0
Client started (version 3.0.21b).
Connecting to 11.16.153.89 at port 445
Doing spnego session setup (blob length=16)
server didn't supply a full spnego negprot
Got challenge flags:
Got NTLMSSP neg_flags=0x60890235
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60080215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60080215
SPNEGO login failed: NT_STATUS_CANT_ACCESS_DOMAIN_INFO
session setup failed: NT_STATUS_CANT_ACCESS_DOMAIN_INFO

After setting client schannel = no
[root mcom4:/opt/Samba/3.0.21b/bin]  ./smbclient -L ccasemcom4 -d 3 -N
-Ub06reg%Becky1208
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file /opt/Samba/3.0.21
b/lib/smb.conf
Processing section [global]
added interface ip=11.16.153.89 bcast=11.16.155.255 nmask=255.255.252.0
Client started (version 3.0.21b).
resolve_lmhosts: 

RE: [Samba] /etc/pam.d/su

2006-03-13 Thread Guillermo Gutierrez
ok, never mind, I found out what I had to do here.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Guillermo Gutierrez
Sent: Monday, March 13, 2006 2:39 PM
To: samba@lists.samba.org
Subject: [Samba] /etc/pam.d/su


At the risk of going off topic here...
does anyone know how to configure the /etc/pam.d/su file to allow authenticated 
domain users to be able to 'su' into root.
Or atleast how to add them to the wheel groups so that I can su with a 
non-root, domain user?

Guillermo Gutierrez
Development Systems Engineer
Market Scan Information Systems
(818) 575-2000 x2427
[EMAIL PROTECTED]

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


RE: [Samba] /etc/pam.d/su

2006-03-13 Thread Guillermo Gutierrez
I would, however, like to know how I could add domain users to local groups so 
I dont have to give blanket access to the 'su' ability but instead add domain 
users to the local 'wheel' group and limit access that way.

Does anyone have any suggestions on how to do this.

-Original Message-
From: Guillermo Gutierrez 
Sent: Monday, March 13, 2006 3:52 PM
To: 'samba@lists.samba.org'
Subject: RE: [Samba] /etc/pam.d/su


ok, never mind, I found out what I had to do here.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Guillermo Gutierrez
Sent: Monday, March 13, 2006 2:39 PM
To: samba@lists.samba.org
Subject: [Samba] /etc/pam.d/su


At the risk of going off topic here...
does anyone know how to configure the /etc/pam.d/su file to allow authenticated 
domain users to be able to 'su' into root.
Or atleast how to add them to the wheel groups so that I can su with a 
non-root, domain user?

Guillermo Gutierrez
Development Systems Engineer
Market Scan Information Systems
(818) 575-2000 x2427
[EMAIL PROTECTED]

-- 
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] Limit of group membership for a user?

2006-03-13 Thread Cybionet

Greeting all,

Sorry, I previously send my message in a wrong topic. I have a strange 
problem between Samba and OPenLDAP. Here the version.


Samba: 3.0.21
OpenLDAP: 2.2.28

Problem:
My Windows user can login to the domaine by a Samba PDC, but when the 
user try to enter a sharing ressouces on the same server nothing append. 
This user have all the good permission.


Solution:
After some research (in samba log), I found that this user was in 76 
differents groups (Don’t ask why, it is a special case lol), and the 
fact is samba don’t seem to support this. If I remove the user of 12 
groups then samba authorise the user to access to share again.


Question:
My question is, why samba do not seem to support a user in 76 differents 
groups, but support 64?


And yes I have the log and can reproduce this problem again .

Robert
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Limit of group membership for a user?

2006-03-13 Thread Jay Fenlason
On Mon, Mar 13, 2006 at 07:09:51PM -0500, Cybionet wrote:
 Greeting all,
 
 Sorry, I previously send my message in a wrong topic. I have a strange 
 problem between Samba and OPenLDAP. Here the version.
 
 Samba: 3.0.21
 OpenLDAP: 2.2.28
 
 Problem:
 My Windows user can login to the domaine by a Samba PDC, but when the 
 user try to enter a sharing ressouces on the same server nothing append. 
 This user have all the good permission.
 
 Solution:
 After some research (in samba log), I found that this user was in 76 
 differents groups (Don?t ask why, it is a special case lol), and the 
 fact is samba don?t seem to support this. If I remove the user of 12 
 groups then samba authorise the user to access to share again.
 
 Question:
 My question is, why samba do not seem to support a user in 76 differents 
 groups, but support 64?
 
 And yes I have the log and can reproduce this problem again .

You haven't said anything about which operating system you are using.
Different unix-like operating systems have different maximum numbers
of groups that a user can be a member of.  I would guess that the OS
that you are using has a 64-group limit.  Contact your operating
system vendor and find out.

-- JF
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] nsswitch segfaults with Samba 3.0.21 on Solaris 9

2006-03-13 Thread J S
Compiling with the --enable-developer and --enable-debug options, the
compiler complains about calling malloc directly on solaris during nsswitch
then fails.  This is gcc 3.3.2 on Solaris 9.

Here are the configure flags:

./configure CPPFLAGS=-I/export/build/ldap/include -I/usr/local/include
-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/ssl/include
-I/export/build/krb5/include LD_LIBRARY_PATH=-L/export/build/ldap/lib
-L/usr/local/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/ssl/lib
-L/export/build/krb5/lib LDFLAGS=-L/export/build/ldap/lib -L/usr/local/lib
-L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/ssl/lib
-L/export/build/krb5/lib -R/export/build/ldap/lib -R/usr/local/lib
-R/usr/local/BerkeleyDB.4.2/lib -R/usr/local/ssl/lib
-R/export/build/krb5/lib --prefix=/export/build/smb321 --enable-debug
CC=gcc --with-ads --enable-debug --with-winbind --enable-developer

And here's the warning.

Compiling nsswitch/winbind_nss_solaris.c with -fPIC
In file included from include/includes.h:454,
 from nsswitch/winbind_nss_solaris.c:33:
/export/build/krb5/include/krb5.h:2860: warning: function declaration isn't
a prototype
/export/build/krb5/include/krb5.h:2911: warning: function declaration isn't
a prototype
/export/build/krb5/include/krb5.h:2990: warning: function declaration isn't
a prototype
/export/build/krb5/include/krb5.h:3021: warning: function declaration isn't
a prototype
/export/build/krb5/include/krb5.h:3056: warning: function declaration isn't
a prototype
nsswitch/winbind_nss_solaris.c: In function `_nss_winbind_passwd_constr':
nsswitch/winbind_nss_solaris.c:186: error:
`__ERROR_DONT_USE_MALLOC_DIRECTLY' undeclared (first use in this function)
nsswitch/winbind_nss_solaris.c:186: error: (Each undeclared identifier is
reported only once
nsswitch/winbind_nss_solaris.c:186: error: for each function it appears in.)
nsswitch/winbind_nss_solaris.c: In function
`_nss_winbind_getgroupsbymember_solwrap':
nsswitch/winbind_nss_solaris.c:286: warning: implicit declaration of
function `_nss_winbind_initgroups_dyn'
nsswitch/winbind_nss_solaris.c: In function `_nss_winbind_group_constr':
nsswitch/winbind_nss_solaris.c:330: error:
`__ERROR_DONT_USE_MALLOC_DIRECTLY' undeclared (first use in this function)
nsswitch/winbind_nss_solaris.c: In function `parse_response':
nsswitch/winbind_nss_solaris.c:442: warning: cast increases required
alignment of target type
nsswitch/winbind_nss_solaris.c: In function `_nss_winbind_common_constr':
nsswitch/winbind_nss_solaris.c:581: error:
`__ERROR_DONT_USE_MALLOC_DIRECTLY' undeclared (first use in this function)
nsswitch/winbind_nss_solaris.c: At top level:
nsswitch/winbind_nss_solaris.c:608: warning: function declaration isn't a
prototype
nsswitch/winbind_nss_solaris.c:625: warning: function declaration isn't a
prototype
make: *** [nsswitch/winbind_nss_solaris.po] Error 1
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Transport endpoint not connected

2006-03-13 Thread Tom Peters
Well, I WAS puzzled by this persistent error. Then I stumbled onto 
something and I might have fixed it. It looks like with an XP client, XP 
might be trying to renegotiate which port to talk (445 or 139) over at the 
start of every transaction. Whichever one answers first is used for the 
rest of the transfer.


I added this to smb.conf and restarted samba:

smb ports = 139

I can't tell if it's a permanent cure yet, but in 15 minutes of testing, I 
can't make it fail. Usually I can.


Is it true that using port 445 will exclude Win98 machines?

Here's the plea for help I WAS going to send out.

I'm puzzled by a persistent error that seems to be getting reported by smbd 
but is this a TCP/IP issue??


This is Samba 3.0.9-2.3-SUSE. I can read off any share on this machine all 
day/night with no issues. A large part of its reason to exist is serving up 
media files, and it does so without complaint, so long as you're just 
reading them.


At random, attempts to copy files to a Samba share will fail. The failure 
is instantaneous. This can happen even seconds after copying a group of 
files to the same folder successfully. I'm typically using a drag and drop, 
or more precisely, copy-and-paste of the files as listed on screen, by name.


Windows XP clients will report
Cannot copy filename:  The specified network name is no longer 
available. [Ok]


This results in a zero-length file on the destination. An immediate retry, 
if you answer yes to ...exists, overwrite? always succeeds.


I tried using a compare-and-copy utility that continues even if it 
encounters an error. It does get this error sometimes, on the first file 
copied, then you have to click ok but then it goes on and copies all the 
files, successfully.


I used to have a very slow scsi raid array that was the destination of most 
of my file transfers. So I didn't actively pursue this issue too much. Now 
that I have faster SATA drives on a 3Ware card (I benchmarked them- the 
difference is dramatic) and the problem persists, I'm hoping someone can 
give me some help.


Copying a number of files always succeeds if the first one succeeds, 
although I can sometimes make a copy of a number of files fail by 
attempting to start another copy to anywhere on the same share. I haven't 
tested the parameters of that effect yet.


This appears in my messages file whenever this problem occurs:
Mar 13 18:00:30 tolkien smbd[16594]: [2006/03/13 18:00:30, 0] 
lib/util_sock.c:get_peer_addr(1136)
Mar 13 18:00:30 tolkien smbd[16594]:   getpeername failed. Error was 
Transport endpoint is not connected
Mar 13 18:00:30 tolkien smbd[16594]: [2006/03/13 18:00:30, 0] 
lib/util_sock.c:get_peer_addr(1136)
Mar 13 18:00:30 tolkien smbd[16594]:   getpeername failed. Error was 
Transport endpoint is not connected
Mar 13 18:00:35 tolkien smbd[16594]: [2006/03/13 18:00:35, 0] 
lib/util_sock.c:get_peer_addr(1136)
Mar 13 18:00:35 tolkien smbd[16594]:   getpeername failed. Error was 
Transport endpoint is not connected
Mar 13 18:00:35 tolkien smbd[16594]: [2006/03/13 18:00:35, 0] 
lib/util_sock.c:write_socket_data(430)
Mar 13 18:00:35 tolkien smbd[16594]:   write_socket_data: write failure. 
Error = Connection reset by peer
Mar 13 18:00:35 tolkien smbd[16594]: [2006/03/13 18:00:35, 0] 
lib/util_sock.c:write_socket(455)
Mar 13 18:00:35 tolkien smbd[16594]:   write_socket: Error writing 4 bytes 
to socket 5: ERRNO = Connection reset by peer
Mar 13 18:00:35 tolkien smbd[16594]: [2006/03/13 18:00:35, 0] 
lib/util_sock.c:send_smb(647)
Mar 13 18:00:35 tolkien smbd[16594]:   Error writing 4 bytes to client. -1. 
(Connection reset by peer)


Someone please toss me a clue or three?

Tom

Contents of samba-log.xpmachineipaddress
[2006/03/13 18:00:30, 1] lib/util_sock.c:get_peer_name(1095)
  Gethostbyaddr failed for 172.20.0.186
[2006/03/13 18:00:30, 2] lib/access.c:check_access(324)
[2006/03/13 18:00:30, 0] lib/util_sock.c:get_peer_addr(1136)
  getpeername failed. Error was Transport endpoint is not connected
[2006/03/13 18:00:30, 0] lib/util_sock.c:get_peer_addr(1136)
  getpeername failed. Error was Transport endpoint is not connected
[2006/03/13 18:00:31, 1] lib/util_sock.c:get_peer_name(1095)
  Gethostbyaddr failed for 172.20.0.186
[2006/03/13 18:00:31, 2] lib/access.c:check_access(324)
  Allowed connection from 172.20.0.186 (172.20.0.186)
[2006/03/13 18:00:31, 2] smbd/reply.c:reply_special(235)
  netbios connect: name1=TOLKIEN name2=ELROND
[2006/03/13 18:00:31, 2] smbd/reply.c:reply_special(242)
  netbios connect: local=tolkien remote=elrond, name type = 0
[2006/03/13 18:00:35, 1] lib/util_sock.c:get_peer_name(1095)
  Gethostbyaddr failed for 0.0.0.0
  Allowed connection from 0.0.0.0 (0.0.0.0)
[2006/03/13 18:00:35, 2] smbd/reply.c:reply_special(235)
  netbios connect: name1=TOLKIEN name2=ELROND
[2006/03/13 18:00:35, 2] smbd/reply.c:reply_special(242)
  netbios connect: local=tolkien remote=elrond, name type = 0

Contents of samba-log.elrond
  [2006/03/13 18:00:01, 2] 

RE: [Samba] Unable to add computer to domain

2006-03-13 Thread Wesley Hobbie
I did a search on Google and all I found was a bunch of copies of a
conversation between Fran Fabrizio and John H Terpstra, and in the end Fran
did not have the add machine script.

I have the add machine script, that is not the problem, when I try to join
the domain from the Windows server, it does create the account in LDAP and
still fails :-(.  I did look at the server02.log file (log file for my
Windows 2003 Server) and I see the following entries:
[2006/03/13 20:55:40, 0] lib/util_sock.c:matchname()
   sys_gethostbyname(server02): lookup failure.
[2006/03/13 20:55:40, 0] lib/util_sock.c:get_peer_name(1189)
   Matchname failed on server02 172.16.0.11
[2006/03/13 20:55:40, 0] lib/debug.c:reopen_logs(597)
   Unable to open new log file /var/log/samba/server02.log: Permission
denied [2006/03/13 20:55:51, 0] lib/util_sock.c:matchname()
   sys_gethostbyname(server02): lookup failure.
[2006/03/13 20:55:51, 0] lib/util_sock.c:get_peer_name(1189)
   Matchname failed on server02 172.16.0.11
[2006/03/13 20:55:51, 0] lib/debug.c:reopen_logs(597)
   Unable to open new log file /var/log/samba/server02.log: Permission
denied [2006/03/13 20:55:52, 0]
rpc_server/srv_samr_nt.c:_samr_create_user(2404)   _samr_create_user:
Running the command `/usr/sbin/smbldap-useradd -w server02$' gave 9  

-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 13, 2006 1:25 PM
To: 'Wesley Hobbie'; [EMAIL PROTECTED]
Cc: samba@lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain


Wes,

Do a google search on this topic: [Samba] Can't join my domain

You will see what the problem is with the username can't be found.

James

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Wesley Hobbie
Sent: Sunday, March 12, 2006 11:14 AM
To: [EMAIL PROTECTED]
Cc: samba@lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain

Hey Craig,
Actually I found on the Internet that I needed to run smbldap-populate, so I
did and now I can manually add the user, although when I go to my Windows
2003 Server to join the domain I am still having a problem.
 
Wes

-Original Message-
From: Wesley Hobbie
Sent: Sunday, March 12, 2006 5:57 PM
To: [EMAIL PROTECTED]
Cc: samba@lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain

I can connect to LDAP via the command line, and I am using the same user in
smb.conf as I am in smbldap-tools_bind.config.

Excerpt from smb.conf:
passdb backend = ldapsam:ldap://server01.bluemapletech.com
ldap suffix = dc=mydomain,dc=com
ldap machine suffix = ou=Hosts
ldap admin dn = cn=root,dc=mydomain,dc=com
add machine script = /usr/sbin/smbldap-useradd -w %u

Excerpt from smbldap.conf:
slaveLDAP=127.0.0.1
slavePort=389

masterLDAP=127.0.0.1
masterPort=389

ldapTLS=1
suffix=dc=mydomain,dc=com
usersdn=ou=People,${suffix}
computersdn=ou=Hosts,${suffix}

with_smbpasswd=0
smbpasswd=/usr/bin/smbpasswd  (I am wondering if this is right?)

with_slappasswd=0
slappasswd=/usr/sbin/slappasswd

Excerpt from smbldap_bind.conf: slaveDN=cn=root,dc=mydomain,dc=com
slavePw=**
masterDN=cn=root,dc=mydomain,dc=com
masterPw=**

Actually, I while I was copying the info from the files I noticed I
mispelled my domain name, so I fixed it and tried it again.  Now I do not
get an error about it cannot contact the LDAP server, only that it could not
find the next uid, Error looking for next uid.

-Original Message-
From: Craig White [mailto:craigwhite at azapple.com] 
Sent: Sunday, March 12, 2006 11:25 AM
To: Wesley Hobbie
Cc: samba at lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain


I'm going to ignore other users problems since they may or may not have
similarities to your issues.

Can you actually connect to your LDAP server from the command line?

Can you actually connect to your LDAP server from the command line with
'write' permissions as the user and parameters as indicated within smb.conf
?

Can you actually connect to your LDAP server from the command line with
'write' permissions as the user and parameters as indicated within
smbldap-tools_bind.conf ?

Craig

On Sun, 2006-03-12 at 10:57 -0600, Wesley Hobbie wrote:
 Ok, I did not know that.  I modified the two files in the
 /etc/smbldap-tools folder, although I am still getting the same error.
 
 I looked at the Samba archive for March and I notice some other people
 seem to be having the same issue. March 2 - Bevan Agard
 March 6 - Hakan BAYINDIR
 
 I try to add my Windows 2003 Server to the domain and I get an error
 that the user name could not be found.  That is when I tried to 
 manually execute the command that Samba is instructed to use when 
 adding a machine, which is when I got the error about it cannot 
 contact the LDAP server.
 
 -Original Message-
 From: Craig White [mailto:craigwhite at azapple.com]
 Sent: Saturday, March 11, 2006 11:35 AM
 To: samba at lists.samba.org
 Subject: Re: [Samba] Unable to 

RE: [Samba] Unable to add computer to domain

2006-03-13 Thread Craig White
It might be helpful to put cards on table here...

ldapsearch -x -h localhost -D 'whatever_your_bind_dn' \
-W '(uid=server02*)'

getent passwd |grep server02

and are you putting computers in the same container as users or do you
have separate container for computers?

what does the relevant section in ldap.conf look like?

Craig

On Mon, 2006-03-13 at 21:21 -0600, Wesley Hobbie wrote:
 I did a search on Google and all I found was a bunch of copies of a
 conversation between Fran Fabrizio and John H Terpstra, and in the end Fran
 did not have the add machine script.
 
 I have the add machine script, that is not the problem, when I try to join
 the domain from the Windows server, it does create the account in LDAP and
 still fails :-(.  I did look at the server02.log file (log file for my
 Windows 2003 Server) and I see the following entries:
 [2006/03/13 20:55:40, 0] lib/util_sock.c:matchname()
sys_gethostbyname(server02): lookup failure.
 [2006/03/13 20:55:40, 0] lib/util_sock.c:get_peer_name(1189)
Matchname failed on server02 172.16.0.11
 [2006/03/13 20:55:40, 0] lib/debug.c:reopen_logs(597)
Unable to open new log file /var/log/samba/server02.log: Permission
 denied [2006/03/13 20:55:51, 0] lib/util_sock.c:matchname()
sys_gethostbyname(server02): lookup failure.
 [2006/03/13 20:55:51, 0] lib/util_sock.c:get_peer_name(1189)
Matchname failed on server02 172.16.0.11
 [2006/03/13 20:55:51, 0] lib/debug.c:reopen_logs(597)
Unable to open new log file /var/log/samba/server02.log: Permission
 denied [2006/03/13 20:55:52, 0]
 rpc_server/srv_samr_nt.c:_samr_create_user(2404)   _samr_create_user:
 Running the command `/usr/sbin/smbldap-useradd -w server02$' gave 9  
 
 -Original Message-
 From: James Taylor [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 13, 2006 1:25 PM
 To: 'Wesley Hobbie'; [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 
 Wes,
 
 Do a google search on this topic: [Samba] Can't join my domain
 
 You will see what the problem is with the username can't be found.
 
 James
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Wesley Hobbie
 Sent: Sunday, March 12, 2006 11:14 AM
 To: [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 Hey Craig,
 Actually I found on the Internet that I needed to run smbldap-populate, so I
 did and now I can manually add the user, although when I go to my Windows
 2003 Server to join the domain I am still having a problem.
  
 Wes
 
 -Original Message-
 From: Wesley Hobbie
 Sent: Sunday, March 12, 2006 5:57 PM
 To: [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 I can connect to LDAP via the command line, and I am using the same user in
 smb.conf as I am in smbldap-tools_bind.config.
 
 Excerpt from smb.conf:
 passdb backend = ldapsam:ldap://server01.bluemapletech.com
 ldap suffix = dc=mydomain,dc=com
 ldap machine suffix = ou=Hosts
 ldap admin dn = cn=root,dc=mydomain,dc=com
 add machine script = /usr/sbin/smbldap-useradd -w %u
 
 Excerpt from smbldap.conf:
 slaveLDAP=127.0.0.1
 slavePort=389
 
 masterLDAP=127.0.0.1
 masterPort=389
 
 ldapTLS=1
 suffix=dc=mydomain,dc=com
 usersdn=ou=People,${suffix}
 computersdn=ou=Hosts,${suffix}
 
 with_smbpasswd=0
 smbpasswd=/usr/bin/smbpasswd  (I am wondering if this is right?)
 
 with_slappasswd=0
 slappasswd=/usr/sbin/slappasswd
 
 Excerpt from smbldap_bind.conf:
 slaveDN=cn=root,dc=mydomain,dc=com
 slavePw=**
 masterDN=cn=root,dc=mydomain,dc=com
 masterPw=**
 
 Actually, I while I was copying the info from the files I noticed I
 mispelled my domain name, so I fixed it and tried it again.  Now I do not
 get an error about it cannot contact the LDAP server, only that it could not
 find the next uid, Error looking for next uid.
 
 -Original Message-
 From: Craig White [mailto:craigwhite at azapple.com] 
 Sent: Sunday, March 12, 2006 11:25 AM
 To: Wesley Hobbie
 Cc: samba at lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 
 I'm going to ignore other users problems since they may or may not have
 similarities to your issues.
 
 Can you actually connect to your LDAP server from the command line?
 
 Can you actually connect to your LDAP server from the command line with
 'write' permissions as the user and parameters as indicated within smb.conf
 ?
 
 Can you actually connect to your LDAP server from the command line with
 'write' permissions as the user and parameters as indicated within
 smbldap-tools_bind.conf ?
 
 Craig
 
 On Sun, 2006-03-12 at 10:57 -0600, Wesley Hobbie wrote:
  Ok, I did not know that.  I modified the two files in the 
  /etc/smbldap-tools folder, although I am still getting the same error.
  
  I looked at the Samba archive for March and I notice some other people 
  seem to be having the same issue. March 2 - 

RE: [Samba] Unable to add computer to domain

2006-03-13 Thread Wesley Hobbie
ldapsearch:
# server02$, Hosts, bluemapletech.com
dn: uid=server02$,ou=Hosts,dc=bluemapletech,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
cn: server02$
sn: server02$
uid: server02$
uidNumber: 1002
gidNumber: 515
homeDirectory: /dev/null
loginShell: /bin/false
description:
Computer gecos: Computer

getent passwd | grep server02 returns nothing.

Computers go in ou=Hosts and users go in ou=People.

What exactly do you want from the ldap.config file?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Craig White
Sent: Monday, March 13, 2006 9:27 PM
To: Wesley Hobbie
Cc: samba@lists.samba.org
Subject: RE: [Samba] Unable to add computer to domain


It might be helpful to put cards on table here...

ldapsearch -x -h localhost -D 'whatever_your_bind_dn' \
-W '(uid=server02*)'

getent passwd |grep server02

and are you putting computers in the same container as users or do you have
separate container for computers?

what does the relevant section in ldap.conf look like?

Craig

On Mon, 2006-03-13 at 21:21 -0600, Wesley Hobbie wrote:
 I did a search on Google and all I found was a bunch of copies of a 
 conversation between Fran Fabrizio and John H Terpstra, and in the end 
 Fran did not have the add machine script.
 
 I have the add machine script, that is not the problem, when I try to 
 join the domain from the Windows server, it does create the account in 
 LDAP and still fails :-(.  I did look at the server02.log file (log 
 file for my Windows 2003 Server) and I see the following entries: 
 [2006/03/13 20:55:40, 0] lib/util_sock.c:matchname()
sys_gethostbyname(server02): lookup failure.
 [2006/03/13 20:55:40, 0] lib/util_sock.c:get_peer_name(1189)
Matchname failed on server02 172.16.0.11
 [2006/03/13 20:55:40, 0] lib/debug.c:reopen_logs(597)
Unable to open new log file /var/log/samba/server02.log: Permission 
 denied [2006/03/13 20:55:51, 0] lib/util_sock.c:matchname()
sys_gethostbyname(server02): lookup failure.
 [2006/03/13 20:55:51, 0] lib/util_sock.c:get_peer_name(1189)
Matchname failed on server02 172.16.0.11
 [2006/03/13 20:55:51, 0] lib/debug.c:reopen_logs(597)
Unable to open new log file /var/log/samba/server02.log: Permission 
 denied [2006/03/13 20:55:52, 0]
 rpc_server/srv_samr_nt.c:_samr_create_user(2404)   _samr_create_user:
 Running the command `/usr/sbin/smbldap-useradd -w server02$' gave 9
 
 -Original Message-
 From: James Taylor [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 13, 2006 1:25 PM
 To: 'Wesley Hobbie'; [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 
 Wes,
 
 Do a google search on this topic: [Samba] Can't join my domain
 
 You will see what the problem is with the username can't be found.
 
 James
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Wesley Hobbie
 Sent: Sunday, March 12, 2006 11:14 AM
 To: [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 Hey Craig,
 Actually I found on the Internet that I needed to run 
 smbldap-populate, so I did and now I can manually add the user, 
 although when I go to my Windows 2003 Server to join the domain I am 
 still having a problem.
  
 Wes
 
 -Original Message-
 From: Wesley Hobbie
 Sent: Sunday, March 12, 2006 5:57 PM
 To: [EMAIL PROTECTED]
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 I can connect to LDAP via the command line, and I am using the same 
 user in smb.conf as I am in smbldap-tools_bind.config.
 
 Excerpt from smb.conf:
 passdb backend = ldapsam:ldap://server01.bluemapletech.com
 ldap suffix = dc=mydomain,dc=com
 ldap machine suffix = ou=Hosts
 ldap admin dn = cn=root,dc=mydomain,dc=com
 add machine script = /usr/sbin/smbldap-useradd -w %u
 
 Excerpt from smbldap.conf:
 slaveLDAP=127.0.0.1
 slavePort=389
 
 masterLDAP=127.0.0.1
 masterPort=389
 
 ldapTLS=1
 suffix=dc=mydomain,dc=com
 usersdn=ou=People,${suffix} computersdn=ou=Hosts,${suffix}
 
 with_smbpasswd=0
 smbpasswd=/usr/bin/smbpasswd  (I am wondering if this is right?)
 
 with_slappasswd=0
 slappasswd=/usr/sbin/slappasswd
 
 Excerpt from smbldap_bind.conf: slaveDN=cn=root,dc=mydomain,dc=com
 slavePw=**
 masterDN=cn=root,dc=mydomain,dc=com
 masterPw=**
 
 Actually, I while I was copying the info from the files I noticed I 
 mispelled my domain name, so I fixed it and tried it again.  Now I do 
 not get an error about it cannot contact the LDAP server, only that it 
 could not find the next uid, Error looking for next uid.
 
 -Original Message-
 From: Craig White [mailto:craigwhite at azapple.com]
 Sent: Sunday, March 12, 2006 11:25 AM
 To: Wesley Hobbie
 Cc: samba at lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 
 I'm going to ignore other users 

RE: [Samba] Unable to add computer to domain

2006-03-13 Thread Craig White
oops...meant to send to list

I think that you've answered it already...you are going to have to point
ldap.conf to also search for 'people' in
ou=Hosts,dc=bluemapletech,dc=com as well as
ou=People,dc=bluemapletech,dc=com

if getent can't find it, samba can't find it and it is not gonna work.

Craig

On Mon, 2006-03-13 at 21:47 -0600, Wesley Hobbie wrote:
 ldapsearch:
 # server02$, Hosts, bluemapletech.com
 dn: uid=server02$,ou=Hosts,dc=bluemapletech,dc=com
 objectClass: top
 objectClass: person
 objectClass: organizationalPerson
 objectClass: inetOrgPerson
 objectClass: posixAccount
 cn: server02$
 sn: server02$
 uid: server02$
 uidNumber: 1002
 gidNumber: 515
 homeDirectory: /dev/null
 loginShell: /bin/false
 description:
 Computer gecos: Computer
 
 getent passwd | grep server02 returns nothing.
 
 Computers go in ou=Hosts and users go in ou=People.
 
 What exactly do you want from the ldap.config file?
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Craig White
 Sent: Monday, March 13, 2006 9:27 PM
 To: Wesley Hobbie
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Unable to add computer to domain
 
 
 It might be helpful to put cards on table here...
 
 ldapsearch -x -h localhost -D 'whatever_your_bind_dn' \
 -W '(uid=server02*)'
 
 getent passwd |grep server02
 
 and are you putting computers in the same container as users or do you have
 separate container for computers?
 
 what does the relevant section in ldap.conf look like?
 
 Craig
 
 On Mon, 2006-03-13 at 21:21 -0600, Wesley Hobbie wrote:
  I did a search on Google and all I found was a bunch of copies of a 
  conversation between Fran Fabrizio and John H Terpstra, and in the end 
  Fran did not have the add machine script.
  
  I have the add machine script, that is not the problem, when I try to 
  join the domain from the Windows server, it does create the account in 
  LDAP and still fails :-(.  I did look at the server02.log file (log 
  file for my Windows 2003 Server) and I see the following entries: 
  [2006/03/13 20:55:40, 0] lib/util_sock.c:matchname()
 sys_gethostbyname(server02): lookup failure.
  [2006/03/13 20:55:40, 0] lib/util_sock.c:get_peer_name(1189)
 Matchname failed on server02 172.16.0.11
  [2006/03/13 20:55:40, 0] lib/debug.c:reopen_logs(597)
 Unable to open new log file /var/log/samba/server02.log: Permission 
  denied [2006/03/13 20:55:51, 0] lib/util_sock.c:matchname()
 sys_gethostbyname(server02): lookup failure.
  [2006/03/13 20:55:51, 0] lib/util_sock.c:get_peer_name(1189)
 Matchname failed on server02 172.16.0.11
  [2006/03/13 20:55:51, 0] lib/debug.c:reopen_logs(597)
 Unable to open new log file /var/log/samba/server02.log: Permission 
  denied [2006/03/13 20:55:52, 0]
  rpc_server/srv_samr_nt.c:_samr_create_user(2404)   _samr_create_user:
  Running the command `/usr/sbin/smbldap-useradd -w server02$' gave 9
  
  -Original Message-
  From: James Taylor [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 13, 2006 1:25 PM
  To: 'Wesley Hobbie'; [EMAIL PROTECTED]
  Cc: samba@lists.samba.org
  Subject: RE: [Samba] Unable to add computer to domain
  
  
  Wes,
  
  Do a google search on this topic: [Samba] Can't join my domain
  
  You will see what the problem is with the username can't be found.
  
  James
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On 
  Behalf Of Wesley Hobbie
  Sent: Sunday, March 12, 2006 11:14 AM
  To: [EMAIL PROTECTED]
  Cc: samba@lists.samba.org
  Subject: RE: [Samba] Unable to add computer to domain
  
  Hey Craig,
  Actually I found on the Internet that I needed to run 
  smbldap-populate, so I did and now I can manually add the user, 
  although when I go to my Windows 2003 Server to join the domain I am 
  still having a problem.
   
  Wes
  
  -Original Message-
  From: Wesley Hobbie
  Sent: Sunday, March 12, 2006 5:57 PM
  To: [EMAIL PROTECTED]
  Cc: samba@lists.samba.org
  Subject: RE: [Samba] Unable to add computer to domain
  
  I can connect to LDAP via the command line, and I am using the same 
  user in smb.conf as I am in smbldap-tools_bind.config.
  
  Excerpt from smb.conf:
  passdb backend = ldapsam:ldap://server01.bluemapletech.com
  ldap suffix = dc=mydomain,dc=com
  ldap machine suffix = ou=Hosts
  ldap admin dn = cn=root,dc=mydomain,dc=com
  add machine script = /usr/sbin/smbldap-useradd -w %u
  
  Excerpt from smbldap.conf:
  slaveLDAP=127.0.0.1
  slavePort=389
  
  masterLDAP=127.0.0.1
  masterPort=389
  
  ldapTLS=1
  suffix=dc=mydomain,dc=com
  usersdn=ou=People,${suffix} computersdn=ou=Hosts,${suffix}
  
  with_smbpasswd=0
  smbpasswd=/usr/bin/smbpasswd  (I am wondering if this is right?)
  
  with_slappasswd=0
  slappasswd=/usr/sbin/slappasswd
  
  Excerpt from smbldap_bind.conf: slaveDN=cn=root,dc=mydomain,dc=com
  slavePw=**
  masterDN=cn=root,dc=mydomain,dc=com
  masterPw=**
  
  Actually, I while I was copying the 

[Samba] BDC with Slave LDAP server

2006-03-13 Thread mallapadi niranjan
Hi all

I have a samba pdc (3.0.21c) with openldap (2.3.19) on the same server, i
have setup
another system as bdc (samba 3.0.21c) with slave ldap server (both samba and
ldap are running on
same machine).
on the master ldap server i have rootdn cn=manager,dc=mydomain,dc=com
and if i setup on the slave ldap server rootdn
cn=manager,dc=mydomain,dc=com
and in the slave ldap server, updatedn points to rootdn of the slave ldap
server.
ie updatedn is cn=manager,dc=msdpl,dc=com

so my query is can both master and slave rootdn be same.

Regards
Niranjan
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Transport endpoint not connected

2006-03-13 Thread Ed Kasky

At 06:21 PM Monday, 3/13/2006, Tom Peters wrote -=
Well, I WAS puzzled by this persistent error. Then I stumbled onto 
something and I might have fixed it. It looks like with an XP 
client, XP might be trying to renegotiate which port to talk (445 or 
139) over at the start of every transaction. Whichever one answers 
first is used for the rest of the transfer.


I added this to smb.conf and restarted samba:

smb ports = 139
--snip--
Someone please toss me a clue or three?

Tom

Contents of samba-log.xpmachineipaddress
[2006/03/13 18:00:30, 1] lib/util_sock.c:get_peer_name(1095)
  Gethostbyaddr failed for 172.20.0.186
[2006/03/13 18:00:30, 2] lib/access.c:check_access(324)
[2006/03/13 18:00:30, 0] lib/util_sock.c:get_peer_addr(1136)
  getpeername failed. Error was Transport endpoint is not connected


I went around and around with this issue for months replacing cables,
switches and nics on a couple of machines all to no avail.   I played
around with something I found in the archives:

http://lists.samba.org/archive/samba/2004-April/084048.htmlhttp://lists.samba.org/archive/samba/2004-April/084048.html 



Using iptables to drop port 445, I eliminated the errors.  I have not seen
the error return nor experienced any other negative impact on performance.

Ed

. . . . . . . . . . . . . . . . . .
Randomly Generated Quote (633 of 1042):
It is better to have loved and lost -- much better.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] nsswitch segfaults with Samba 3.0.21 on Solaris 9

2006-03-13 Thread Jeremy Allison
On Mon, Mar 13, 2006 at 06:43:09PM -0800, J S wrote:
 Compiling with the --enable-developer and --enable-debug options, the
 compiler complains about calling malloc directly on solaris during nsswitch
 then fails.  This is gcc 3.3.2 on Solaris 9.
 
 Here are the configure flags:
 
 ./configure CPPFLAGS=-I/export/build/ldap/include -I/usr/local/include
 -I/usr/local/BerkeleyDB.4.2/include -I/usr/local/ssl/include
 -I/export/build/krb5/include LD_LIBRARY_PATH=-L/export/build/ldap/lib
 -L/usr/local/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/ssl/lib
 -L/export/build/krb5/lib LDFLAGS=-L/export/build/ldap/lib -L/usr/local/lib
 -L/usr/local/BerkeleyDB.4.2/lib -L/usr/local/ssl/lib
 -L/export/build/krb5/lib -R/export/build/ldap/lib -R/usr/local/lib
 -R/usr/local/BerkeleyDB.4.2/lib -R/usr/local/ssl/lib
 -R/export/build/krb5/lib --prefix=/export/build/smb321 --enable-debug
 CC=gcc --with-ads --enable-debug --with-winbind --enable-developer
 
 And here's the warning.

I just checked in a fix for this in the SAMBA_3_0 and trunk branches.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Backup Restore Samba Configuration

2006-03-13 Thread Gabriel Gunderson
 That's just what I was looking for. Thanks VERY much for your
 help! I'll be putting the pdc back in service Monday morning.

Once you get the files needed for your particular install, I would
look into putting your configs under source control and hosting the
repository on another server.  I like subversion over ssh for this.

I guess I'm assuming this is for a server. I shouldn't do that. :)  Oh
well, just a little suggestion that might save you grief in the future
(saved me before).

--
Gabriel Gunderson
http://gundy.org
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] enabling guest access to some samba shares and printers on FC3

2006-03-13 Thread ankush grover
hey friends,

I have configured samba for my domain.Now I want to allow guest acess to
some samba shares and printers.

There are few laptops with Windows XP Home Edition running on them and I
want to allow them to print to the printers attached to the FC3 machine.I am
using security as domain in that case the user authentication is done by the
Windows 2003 server and also guest account is enabled on the Windows 2003
server.

My smb.conf is below

workgroup = sun
netbios name = server2
guest account = nobody
security = domain
password server = server.sun.com

[utilities2]
path=/utilities2
public = yes
writeable = yes
guest ok = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   writable = no
   printable = yes
   public = yes
   printer admin = root
   printing = cups
   use client driver = yes

[homes]
   comment = Home Directories
   browseable = no
   writeable = yes
   hide dot files = yes
   veto files = /*MAILDIR*/

Everytime I try to access the utilities2 shares or printers the Samba asks
for the username and password. I want to configure samba in such a way that
anybody within my domain can access to these shares and printers.

What modifications I have to do to enable guest access to some of the
shares.

Thanks  Regards

Ankush Grover
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


svn commit: samba r14312 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2006-03-13 Thread abartlet
Author: abartlet
Date: 2006-03-13 11:12:46 + (Mon, 13 Mar 2006)
New Revision: 14312

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14312

Log:
Formatting and comments.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
2006-03-13 06:59:06 UTC (rev 14311)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
2006-03-13 11:12:46 UTC (rev 14312)
@@ -376,6 +376,7 @@
 * or replace with a new one).  Both the unicode and NT hash
 * only branches append keys to this multivalued entry. */
CHECK_RET(ldb_msg_add_empty(modify_msg, krb5Key, 
LDB_FLAG_MOD_REPLACE));
+
/* Yay, we can compute new password hashes from the unicode
 * password */
if (sambaPassword) {
@@ -467,7 +468,7 @@
 
/* TODO: We may wish to control the encryption types chosen in 
future */
krb5_ret = 
hdb_generate_key_set_password(smb_krb5_context-krb5_context,
-   salt_principal, 
sambaPassword, keys, num_keys);
+salt_principal, 
sambaPassword, keys, num_keys);
krb5_free_principal(smb_krb5_context-krb5_context, 
salt_principal);
 
if (krb5_ret) {
@@ -480,7 +481,8 @@
return LDB_ERR_OPERATIONS_ERROR;
}
 
-   /* Walking 
+   /* Walking all the key types generated, transform each
+* key into an ASN.1 blob
 */
for (i=0; i  num_keys; i++) {
unsigned char *buf;
@@ -651,8 +653,8 @@
}
sambaLMPwdHistory_len = MIN(sambaLMPwdHistory_len + 1, 
pwdHistoryLength);

-   /* Likewise, we might not have a new NT password (lm
-* only password change function) */
+   /* Likewise, we might not have an old NT password (lm
+* only password change function on previous change) */
if (ntOldHash) {
new_sambaNTPwdHistory[0] = *ntOldHash;
} else {



svn commit: samba r14313 - in branches/SAMBA_4_0/source/setup: .

2006-03-13 Thread abartlet
Author: abartlet
Date: 2006-03-13 11:15:05 + (Mon, 13 Mar 2006)
New Revision: 14313

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14313

Log:
Add comments describing some of the dependencies here.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/setup/provision_init.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/setup/provision_init.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-03-13 11:12:46 UTC 
(rev 14312)
+++ branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-03-13 11:15:05 UTC 
(rev 14313)
@@ -79,6 +79,11 @@
 
 #Add modules to the list to activate them by default
 #beware often order is important
+#
+# Some Known ordering constraints:
+# - rootdse must be first, as it makes redirects from  - cn=rootdse
+# - password_hash must be before samldb, or else the template code in samldb 
breaks setting the pwdLastSet attribute
+
 dn: @MODULES
 @LIST: 
rootdse,kludge_acl,paged_results,server_sort,extended_dn,asq,password_hash,samldb,operational,objectguid,rdn_name,objectclass
 



svn commit: samba r14314 - in branches/tmp: .

2006-03-13 Thread vlendec
Author: vlendec
Date: 2006-03-13 12:01:22 + (Mon, 13 Mar 2006)
New Revision: 14314

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14314

Log:
Delete my attempt generalizing ACLs. Maybe I'll come back to that later, I'm
going to try a different approach next.

Volker

Removed:
   branches/tmp/vl-posixacls/


Changeset:


svn commit: samba r14315 - in branches/tmp: .

2006-03-13 Thread vlendec
Author: vlendec
Date: 2006-03-13 12:05:49 + (Mon, 13 Mar 2006)
New Revision: 14315

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14315

Log:
Fresh copy of 3_0 for acl experiments
Added:
   branches/tmp/vl-posixacls/


Changeset:
Copied: branches/tmp/vl-posixacls (from rev 14314, branches/SAMBA_3_0)



svn commit: samba r14316 - in branches/SAMBA_4_0/source/torture: . raw

2006-03-13 Thread metze
Author: metze
Date: 2006-03-13 12:43:59 + (Mon, 13 Mar 2006)
New Revision: 14316

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14316

Log:
don't zero the smb_handle after it was set:-)

metze
Modified:
   branches/SAMBA_4_0/source/torture/raw/open.c
   branches/SAMBA_4_0/source/torture/torture_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/open.c
===
--- branches/SAMBA_4_0/source/torture/raw/open.c2006-03-13 12:05:49 UTC 
(rev 14315)
+++ branches/SAMBA_4_0/source/torture/raw/open.c2006-03-13 12:43:59 UTC 
(rev 14316)
@@ -138,9 +138,9 @@
 
 #define SET_ATTRIB(sattrib) do { \
union smb_setfileinfo sfinfo; \
-   sfinfo.generic.level = RAW_SFILEINFO_BASIC_INFORMATION; \
-   sfinfo.generic.in.file.path = fname; \
ZERO_STRUCT(sfinfo.basic_info.in); \
+   sfinfo.basic_info.level = RAW_SFILEINFO_BASIC_INFORMATION; \
+   sfinfo.basic_info.in.file.path = fname; \
sfinfo.basic_info.in.attrib = sattrib; \
status = smb_raw_setpathinfo(cli-tree, sfinfo); \
if (!NT_STATUS_IS_OK(status)) { \

Modified: branches/SAMBA_4_0/source/torture/torture_util.c
===
--- branches/SAMBA_4_0/source/torture/torture_util.c2006-03-13 12:05:49 UTC 
(rev 14315)
+++ branches/SAMBA_4_0/source/torture/torture_util.c2006-03-13 12:43:59 UTC 
(rev 14316)
@@ -379,10 +379,9 @@
union smb_setfileinfo sfinfo;
NTSTATUS status;
 
-   sfinfo.generic.level = RAW_SFILEINFO_BASIC_INFORMATION;
-   sfinfo.generic.in.file.path = fname;
-
ZERO_STRUCT(sfinfo.basic_info.in);
+   sfinfo.basic_info.level = RAW_SFILEINFO_BASIC_INFORMATION;
+   sfinfo.basic_info.in.file.path = fname;
sfinfo.basic_info.in.attrib = attrib;
status = smb_raw_setpathinfo(tree, sfinfo);
return NT_STATUS_IS_OK(status);



svn commit: samba r14317 - branches/SAMBA_3_0/packaging/Debian/debian-sarge branches/SAMBA_3_0/packaging/Debian/debian-unstable branches/SAMBA_3_0/packaging/Debian/debian-woody branches/SAMBA_3_0/pack

2006-03-13 Thread lmuelle
Author: lmuelle
Date: 2006-03-13 14:22:43 + (Mon, 13 Mar 2006)
New Revision: 14317

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14317

Log:
Use source/bin as dir to link pam_winbind instead of source/nsswitch/

The intention is to have the resulting binaries at one place.  This is
also usefull for upcoming changes to provide a test_pammodules rule.

With these changes I even got aware of
testsuite/nsswitch/pam_winbind_syms.exp  But this only covers
pam_winbind.

Modified:
   branches/SAMBA_3_0/packaging/Debian/debian-sarge/rules
   branches/SAMBA_3_0/packaging/Debian/debian-unstable/rules
   branches/SAMBA_3_0/packaging/Debian/debian-woody/rules
   branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl
   branches/SAMBA_3_0/packaging/RedHat-9/samba.spec.tmpl
   branches/SAMBA_3_0/packaging/Solaris/makepkg.sh
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/testsuite/nsswitch/pam_winbind_syms.exp
   trunk/packaging/Debian/debian-sarge/rules
   trunk/packaging/Debian/debian-unstable/rules
   trunk/packaging/Debian/debian-woody/rules
   trunk/packaging/RHEL/samba.spec.tmpl
   trunk/packaging/RedHat-9/samba.spec.tmpl
   trunk/packaging/Solaris/makepkg.sh
   trunk/source/Makefile.in
   trunk/source/configure.in
   trunk/testsuite/nsswitch/pam_winbind_syms.exp


Changeset:
Modified: branches/SAMBA_3_0/packaging/Debian/debian-sarge/rules
===
--- branches/SAMBA_3_0/packaging/Debian/debian-sarge/rules  2006-03-13 
12:43:59 UTC (rev 14316)
+++ branches/SAMBA_3_0/packaging/Debian/debian-sarge/rules  2006-03-13 
14:22:43 UTC (rev 14317)
@@ -181,7 +181,7 @@
# Install winbind stuff not installed by 'make install'
install -m 0644 source/nsswitch/libnss_winbind.so \
$(DESTDIR)/lib/libnss_winbind.so.2
-   install -m 0644 source/nsswitch/pam_winbind.so \
+   install -m 0644 source/bin/pam_winbind.so \
$(DESTDIR)/lib/security/
 
# Install libnss_wins.so, which is not installed by 'make install' 
either.

Modified: branches/SAMBA_3_0/packaging/Debian/debian-unstable/rules
===
--- branches/SAMBA_3_0/packaging/Debian/debian-unstable/rules   2006-03-13 
12:43:59 UTC (rev 14316)
+++ branches/SAMBA_3_0/packaging/Debian/debian-unstable/rules   2006-03-13 
14:22:43 UTC (rev 14317)
@@ -176,7 +176,7 @@
# Install winbind stuff not installed by 'make install'
install -m 0644 source/nsswitch/libnss_winbind.so \
$(DESTDIR)/lib/libnss_winbind.so.2
-   install -m 0644 source/nsswitch/pam_winbind.so \
+   install -m 0644 source/bin/pam_winbind.so \
$(DESTDIR)/lib/security/
 
# Install libnss_wins.so, which is not installed by 'make install' 
either.

Modified: branches/SAMBA_3_0/packaging/Debian/debian-woody/rules
===
--- branches/SAMBA_3_0/packaging/Debian/debian-woody/rules  2006-03-13 
12:43:59 UTC (rev 14316)
+++ branches/SAMBA_3_0/packaging/Debian/debian-woody/rules  2006-03-13 
14:22:43 UTC (rev 14317)
@@ -147,7 +147,7 @@
# Install winbind stuff not installed by 'make install'
install -m 0644 source/nsswitch/libnss_winbind.so \
$(DESTDIR)/lib/libnss_winbind.so.2
-   install -m 0644 source/nsswitch/pam_winbind.so \
+   install -m 0644 source/bin/pam_winbind.so \
$(DESTDIR)/lib/security/
 
# Install libnss_wins.so, which is not installed by 'make install' 
either.

Modified: branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl
===
--- branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl   2006-03-13 12:43:59 UTC 
(rev 14316)
+++ branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl   2006-03-13 14:22:43 UTC 
(rev 14317)
@@ -211,7 +211,7 @@
 cp source/bin/pam_smbpass.so $RPM_BUILD_ROOT/%{_lib}/security/pam_smbpass.so
 
 # NSS  PAM winbind support
-install -m 755 source/nsswitch/pam_winbind.so 
$RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so
+install -m 755 source/bin/pam_winbind.so 
$RPM_BUILD_ROOT/%{_lib}/security/pam_winbind.so
 install -m 755 source/nsswitch/libnss_winbind.so 
$RPM_BUILD_ROOT/%{_lib}/libnss_winbind.so
 install -m 755 source/nsswitch/libnss_wins.so 
$RPM_BUILD_ROOT/%{_lib}/libnss_wins.so
 ( cd $RPM_BUILD_ROOT/%{_lib};

Modified: branches/SAMBA_3_0/packaging/RedHat-9/samba.spec.tmpl
===
--- branches/SAMBA_3_0/packaging/RedHat-9/samba.spec.tmpl   2006-03-13 
12:43:59 UTC (rev 14316)
+++ branches/SAMBA_3_0/packaging/RedHat-9/samba.spec.tmpl   2006-03-13 
14:22:43 UTC (rev 14317)
@@ -177,7 +177,7 @@
 # Install winbind shared libraries
 install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
 ( cd 

svn commit: samba r14318 - in branches/SAMBA_4_0/source/torture/nbt: .

2006-03-13 Thread metze
Author: metze
Date: 2006-03-13 14:35:45 + (Mon, 13 Mar 2006)
New Revision: 14318

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14318

Log:
fix warnings

metze
Modified:
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c 2006-03-13 
14:22:43 UTC (rev 14317)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c 2006-03-13 
14:35:45 UTC (rev 14318)
@@ -9648,7 +9648,6 @@
 
ret = test_wins_replication(mem_ctx, address);
 
-done:
talloc_free(mem_ctx);
 
return ret;
@@ -9683,7 +9682,6 @@
ret = test_conflict_same_owner(ctx);
ret = test_conflict_different_owner(ctx);
 
-done:
talloc_free(mem_ctx);
 
return ret;
@@ -9718,7 +9716,6 @@
ret = test_conflict_owned_released_vs_replica(ctx);
ret = test_conflict_owned_active_vs_replica(ctx);
 
-done:
talloc_free(mem_ctx);
 
return ret;



svn commit: samba r14319 - in branches/SAMBA_4_0/source/torture/nbt: .

2006-03-13 Thread metze
Author: metze
Date: 2006-03-13 15:03:51 + (Mon, 13 Mar 2006)
New Revision: 14319

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14319

Log:
this is a test to see if this help to run NBT-WINSREPLICATION-OWNED on more 
systems
on the buildfarm successful...

metze
Modified:
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c 2006-03-13 
14:35:45 UTC (rev 14318)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c 2006-03-13 
15:03:51 UTC (rev 14319)
@@ -9541,7 +9541,7 @@
 
/* make sure we push the reply to the wire */
event_loop_once(nbtsock-event_ctx);
-   msleep(25);
+   msleep(250);
 
rec-defend.timeout = 0;
rec-defend.ret = True;
@@ -9594,7 +9594,7 @@
 
/* make sure we push the reply to the wire */
event_loop_once(nbtsock-event_ctx);
-   msleep(25);
+   msleep(250);
 
rec-defend.timeout = 0;
rec-defend.ret = True;



svn commit: samba r14320 - in trunk/source/passdb: .

2006-03-13 Thread jmcd
Author: jmcd
Date: 2006-03-13 15:04:17 + (Mon, 13 Mar 2006)
New Revision: 14320

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14320

Log:
Fix coverity #222: free storage before returning in error case.  This
error doesn't occur in 3.0.

Modified:
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: trunk/source/passdb/pdb_ldap.c
===
--- trunk/source/passdb/pdb_ldap.c  2006-03-13 15:03:51 UTC (rev 14319)
+++ trunk/source/passdb/pdb_ldap.c  2006-03-13 15:04:17 UTC (rev 14320)
@@ -335,12 +335,12 @@
filter = talloc_asprintf(mem_ctx, ((uid=%s)(%s)),
 escape_user, 
get_objclass_filter_static(ldap_state-schema_ver));

+   SAFE_FREE(escape_user);
+
if (filter == NULL) {
return LDAP_NO_MEMORY;
}
 
-   SAFE_FREE(escape_user);
-
return smbldap_search_suffix(ldap_state-smbldap_state, filter, attr, 
result);
 }
 



svn commit: samba r14321 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/nsswitch trunk/source trunk/source/nsswitch

2006-03-13 Thread gd
Author: gd
Date: 2006-03-13 15:13:35 + (Mon, 13 Mar 2006)
New Revision: 14321

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14321

Log:
When we have libnscd and winbindd comes (back) online, try to flush the
nscd caches so that NSS-calls can deliver accurate information.

Guenther

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/nsswitch/winbindd.h
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   trunk/source/Makefile.in
   trunk/source/configure.in
   trunk/source/nsswitch/winbindd.h
   trunk/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-13 15:04:17 UTC (rev 
14320)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-13 15:13:35 UTC (rev 
14321)
@@ -35,6 +35,7 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -1180,7 +1181,7 @@
 bin/[EMAIL PROTECTED]@: $(WINBINDD_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(WINBINDD_OBJ) $(LDFLAGS) 
$(DYNEXP) $(LIBS) \
-   @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS)
+   @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) $(NSCD_LIBS)
 
 # Please don't add .o files to libnss_winbind, libnss_wins, or the pam_winbind
 # libraries.  Add to the appropriate PICOBJ variable instead.

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-03-13 15:04:17 UTC (rev 
14320)
+++ branches/SAMBA_3_0/source/configure.in  2006-03-13 15:13:35 UTC (rev 
14321)
@@ -266,6 +266,7 @@
 AC_SUBST(EXTRA_SBIN_PROGS)
 AC_SUBST(EXTRA_ALL_TARGETS)
 AC_SUBST(CONFIG_LIBS)
+AC_SUBST(NSCD_LIBS)
 
 # Set defaults
 PIE_CFLAGS=
@@ -3528,6 +3529,8 @@
 LIBS=$ac_save_LIBS
 fi
 
+AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache)
+
 #
 # check for automount support
 AC_MSG_CHECKING(whether to use automount)

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.h
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd.h   2006-03-13 15:04:17 UTC 
(rev 14320)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.h   2006-03-13 15:13:35 UTC 
(rev 14321)
@@ -29,6 +29,10 @@
 
 #include winbindd_nss.h
 
+#ifdef HAVE_LIBNSCD
+#include libnscd.h
+#endif
+
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-03-13 15:04:17 UTC 
(rev 14320)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-03-13 15:13:35 UTC 
(rev 14321)
@@ -559,6 +559,7 @@
 static void child_msg_online(int msg_type, struct process_id src, void *buf, 
size_t len)
 {
struct winbindd_domain *domain;
+   int ret;
 
DEBUG(5,(child_msg_online received.\n));
 
@@ -570,6 +571,21 @@
/* Set our global state as online. */
set_global_winbindd_state_online();
 
+#ifdef HAVE_NSCD_FLUSH_CACHE
+   /* Flush nscd caches to get accurate new information */
+   ret = nscd_flush_cache(passwd);
+   if (ret) {
+   DEBUG(5,(failed to flush nscd cache for 'passwd' service: 
%s\n,
+   error_message(ret)));
+   }
+
+   ret = nscd_flush_cache(group);
+   if (ret) {
+   DEBUG(5,(failed to flush nscd cache for 'group' service: %s\n,
+   error_message(ret)));
+   }
+#endif
+
/* Mark everything online - delete any negative cache entries
   to force an immediate reconnect. */
 

Modified: trunk/source/Makefile.in
===
--- trunk/source/Makefile.in2006-03-13 15:04:17 UTC (rev 14320)
+++ trunk/source/Makefile.in2006-03-13 15:13:35 UTC (rev 14321)
@@ -35,6 +35,7 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -1209,7 +1210,7 @@
 bin/[EMAIL PROTECTED]@: $(WINBINDD_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(WINBINDD_OBJ) $(LDFLAGS) 
$(DYNEXP) $(LIBS) \
-   @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS)
+   @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) $(NSCD_LIBS)
 
 # Please don't add .o files to libnss_winbind, libnss_wins, or the pam_winbind
 # libraries.  Add to the appropriate PICOBJ variable instead.

Modified: trunk/source/configure.in
===
--- trunk/source/configure.in   

svn commit: samba r14322 - in branches/SAMBA_4_0/source: . build/m4 build/smb_build param

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 15:19:14 + (Mon, 13 Mar 2006)
New Revision: 14322

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14322

Log:
Remove the BROKEN_CC flag for now. None of the buildfarm hosts has 
a C compiler that doesn't support -c and -o together and it makes the build 
system more complicated. This also means the current handling of broken C 
compilers is most likely broken as it isn't tested.

This detection can be readded when we stumble upon a C compiler that supports
both C99 (or at least the parts of it we need) and also has broken -c/-o 
handling, which I think is unlikely to happen.

Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/param/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-03-13 15:13:35 UTC 
(rev 14321)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-03-13 15:19:14 UTC 
(rev 14322)
@@ -26,15 +26,6 @@
 dnl needed before AC_TRY_COMPILE
 AC_ISC_POSIX
 
-dnl Check if C compiler understands -c and -o at the same time
-AC_PROG_CC_C_O
-if eval test \`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\ = no; then
-   BROKEN_CC=yes
-else
-   BROKEN_CC=no
-fi
-AC_SUBST(BROKEN_CC)
-
 AC_CACHE_CHECK([that the C compiler can precompile header 
files],samba_cv_precompiled_headers, [
dnl Check whether the compiler can generate precompiled headers
touch conftest.h

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
15:19:14 UTC (rev 14322)
@@ -44,10 +44,6 @@
 
$self-_prepare_path_vars();
$self-_prepare_compiler_linker();
-   $self-output(.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 
.1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho\n);
-   $self-_prepare_hostcc_rule();
-   $self-_prepare_std_CC_rule(c,o,'$(PICFLAG)',Compiling,Rule for 
std objectfiles);
-   
$self-_prepare_std_CC_rule(h,h.gch,'$(PICFLAG)',Precompiling,Rule for 
precompiled headerfiles);
 
return $self;
 }
@@ -167,60 +163,6 @@
$self-output(MK_FILES =  . array2oneperline([EMAIL PROTECTED]) . 
\n);
 }
 
-sub _prepare_dummy_MAKEDIR($)
-{
-   my ($self) = @_;
-
-   $self-output( '__EOD__'
-dynconfig.o: dynconfig.c Makefile
-   @echo Compiling $*.c
-   @$(CC) $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $ -o $@
-__EOD__
-);
-   if ($self-{config}-{BROKEN_CC} eq yes) {
-   $self-output(' -mv `echo $@ | sed \'s%^.*/%%g\'` $@
-');
-   }
-   $self-output(\n);
-}
-
-sub _prepare_std_CC_rule($$)
-{
-   my ($self,$src,$dst,$flags,$message,$comment) = @_;
-
-   $self-output( __EOD__
-# $comment
-.$src.$dst:
-   [EMAIL PROTECTED] $message \$\*.$src
-   [EMAIL PROTECTED](CC) `script/cflags.pl [EMAIL PROTECTED] \$(CFLAGS) 
$flags -c \$\*.$src -o \$\@
-__EOD__
-);
-   if ($self-{config}-{BROKEN_CC} eq yes) {
-   $self-output(' -mv `echo $@ | sed \'s%^.*/%%g\'` $@
-');
-   }
-
-   $self-output(\n);
-}
-
-sub _prepare_hostcc_rule($)
-{
-   my ($self) = @_;
-   
-   $self-output( __EOD__
-.c.ho:
-   [EMAIL PROTECTED] Compiling \$\*.c with host compiler
-   [EMAIL PROTECTED](HOSTCC) `script/cflags.pl [EMAIL PROTECTED] 
\$(CFLAGS) -c \$\*.c -o \$\@
-__EOD__
-);
-   if ($self-{config}-{BROKEN_CC} eq yes) {
-   $self-output(' -mv `echo $@ | sed \'s%^.*/%%g\' -e 
\'s%\.ho$$%.o%\'` $@
-');
-   }
-
-   $self-output(\n);
-}
-
 sub array2oneperline($)
 {
my $array = shift;
@@ -604,8 +546,6 @@
 );
}
 
-   $self-_prepare_dummy_MAKEDIR();
-
$self-output($self-{mkfile});
 
open(MAKEFILE,$file) || die (Can't open $file\n);

Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-03-13 15:13:35 UTC (rev 14321)
+++ branches/SAMBA_4_0/source/main.mk   2006-03-13 15:19:14 UTC (rev 14322)
@@ -333,10 +333,24 @@
 # File types
 ###
 
+.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 
.5.xml .7 .7.xml .8 .8.xml .ho
+
+.c.ho:
+   @echo Compiling $*.c with host compiler
+   @$(HOSTCC) `script/cflags.pl [EMAIL PROTECTED] $(CFLAGS) -c $*.c -o $@
+
 .c.d:
@echo Generating dependencies for $
@$(CC) -MM -MG -MT $(:.c=.o) -MF $@ $(CFLAGS) $
 
+.c.o:
+   @echo Compiling $
+   @$(CC) `script/cflags.pl [EMAIL PROTECTED] $(CFLAGS) 

svn commit: samba r14323 - in trunk/source: include passdb

2006-03-13 Thread idra
Author: idra
Date: 2006-03-13 15:24:35 + (Mon, 13 Mar 2006)
New Revision: 14323

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14323

Log:

Backout latest changes as Volker requested.


Modified:
   trunk/source/include/smbldap.h
   trunk/source/passdb/pdb_ldap.c


Changeset:
Sorry, the patch is too large (820 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14323


svn commit: samba r14325 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/script/tests trunk/source trunk/source/script/tests

2006-03-13 Thread lmuelle
Author: lmuelle
Date: 2006-03-13 16:10:26 + (Mon, 13 Mar 2006)
New Revision: 14325

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14325

Log:
Add pam_modules rule which builds the configure(d) pam modules.  This is
called as part of the all rule (again only if pam modules are requested
by configure).

Add pam_winbind rule.

Ensure proto_exists before we build the pam modules.

Add test_pam_modules rule to test if the built pam modules have any
unresolved symbols.  For test_pam_modules we use script/tests/dlopen.sh
which was written by Nalin Dahyabhai [EMAIL PROTECTED].  Thanks Nalin!
RedHat and SuSE use this script to test nss and pam modules since
several years.

Added:
   branches/SAMBA_3_0/source/script/tests/dlopen.sh
   trunk/source/script/tests/dlopen.sh
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   trunk/source/Makefile.in
   trunk/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-13 16:02:50 UTC (rev 
14324)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-13 16:10:26 UTC (rev 
14325)
@@ -154,6 +154,8 @@
 
 SHLIBS = @SHLIB_PROGS@ @LIBSMBCLIENT@ @LIBSMBSHAREMODES@ cac
 
+PAM_MODULES = @PAM_MODULES@
+
 SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
 
 VFS_MODULES = @VFS_MODULES@
@@ -754,10 +756,14 @@
 # now the rules...
 ##
 all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
-   $(SHLIBS) $(MODULES) @EXTRA_ALL_TARGETS@
+   $(SHLIBS) $(MODULES) $(PAM_MODULES) @EXTRA_ALL_TARGETS@
 
-pam_smbpass : SHOWFLAGS bin/[EMAIL PROTECTED]@
+pam_modules : $(PAM_MODULES)
 
+pam_smbpass : SHOWFLAGS proto_exists bin/[EMAIL PROTECTED]@
+
+pam_winbind : SHOWFLAGS proto_exists bin/[EMAIL PROTECTED]@
+
 smbwrapper : SHOWFLAGS @SMBWRAPPER@
 
 torture : SHOWFLAGS $(TORTURE_PROGS)
@@ -840,6 +846,12 @@
@echo Running Samba 3 Test suite
@sh ./script/tests/runtests.sh t_dir
 
+test_pam_modules: pam_modules
+   @echo Testing $(PAM_MODULES) 
+   @for module in $(PAM_MODULES); do \
+   ./script/tests/dlopen.sh -lpam -ldl bin/[EMAIL PROTECTED]@ \
+   || exit 1; \
+   done
 
 # These dependencies are only approximately correct: we want to make
 # sure Samba's paths are updated if ./configure is re-run.  Really it

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-03-13 16:02:50 UTC (rev 
14324)
+++ branches/SAMBA_3_0/source/configure.in  2006-03-13 16:10:26 UTC (rev 
14325)
@@ -256,6 +256,7 @@
 AC_SUBST(KRB5_LIBS)
 AC_SUBST(LDAP_LIBS)
 AC_SUBST(SHLIB_PROGS)
+AC_SUBST(PAM_MODULES)
 AC_SUBST(SMBWRAPPER)
 AC_SUBST(SMBWRAP_OBJS)
 AC_SUBST(SMBWRAP_INC)
@@ -3647,6 +3648,7 @@
 
 #
 # check for pam_smbpass support
+PAM_MODULES=
 AC_MSG_CHECKING(whether to use pam_smbpass)
 AC_ARG_WITH(pam_smbpass,
 [  --with-pam_smbpass  Build PAM module for authenticating against passdb 
backends (default=no)],
@@ -3664,7 +3666,7 @@
   AC_MSG_ERROR([No libpam found])
else
  AUTH_LIBS=$AUTH_LIBS -lpam
-  SHLIB_PROGS=$SHLIB_PROGS bin/pam_smbpass.$SHLIBEXT
+  PAM_MODULES=pam_smbpass
fi
 ;;
   *)
@@ -5110,7 +5112,7 @@
SHLIB_PROGS=$SHLIB_PROGS $WINBIND_NSS $WINBIND_WINS_NSS
 
if test x$with_pam = xyes; then
-   SHLIB_PROGS=$SHLIB_PROGS bin/pam_winbind.$SHLIBEXT
+   PAM_MODULES=$PAM_MODULES pam_winbind
fi
fi
 else

Added: branches/SAMBA_3_0/source/script/tests/dlopen.sh
===
--- branches/SAMBA_3_0/source/script/tests/dlopen.sh2006-03-13 16:02:50 UTC 
(rev 14324)
+++ branches/SAMBA_3_0/source/script/tests/dlopen.sh2006-03-13 16:10:26 UTC 
(rev 14325)
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+# Copyright (C) Nalin Dahyabhai [EMAIL PROTECTED] 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.
+
+tempdir=`mktemp -d /tmp/dlopenXX`

svn commit: samba r14326 - branches/SAMBA_3_0/source trunk/source

2006-03-13 Thread lmuelle
Author: lmuelle
Date: 2006-03-13 16:19:44 + (Mon, 13 Mar 2006)
New Revision: 14326

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14326

Log:
First catch of make test_pam_modules.

Testing pam_smbpass pam_winbind 
dlopen() of ./bin/pam_smbpass.so succeeded.
dlopen() of ./bin/pam_winbind.so failed: ././bin/pam_winbind.so:
undefined symbol: secrets_fetch_domain_sid
make: *** [test_pam_modules] Error 1

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   trunk/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-13 16:10:26 UTC (rev 
14325)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-13 16:19:44 UTC (rev 
14326)
@@ -508,7 +508,7 @@
 
 PAM_WINBIND_OBJ = nsswitch/pam_winbind.o \
  $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ1) \
- $(LIBSAMBA_OBJ) $(DOSERR_OBJ)
+ $(LIBSAMBA_OBJ) $(DOSERR_OBJ) $(SECRETS_OBJ)
 
 PAM_WINBIND_PICOBJ = $(PAM_WINBIND_OBJ:[EMAIL PROTECTED]@)
 

Modified: trunk/source/Makefile.in
===
--- trunk/source/Makefile.in2006-03-13 16:10:26 UTC (rev 14325)
+++ trunk/source/Makefile.in2006-03-13 16:19:44 UTC (rev 14326)
@@ -517,7 +517,7 @@
 
 PAM_WINBIND_OBJ = nsswitch/pam_winbind.o \
  $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ1) \
- $(LIBSAMBA_OBJ) $(DOSERR_OBJ)
+ $(LIBSAMBA_OBJ) $(DOSERR_OBJ) $(SECRETS_OBJ)
 
 PAM_WINBIND_PICOBJ = $(PAM_WINBIND_OBJ:[EMAIL PROTECTED]@)
 



svn commit: samba r14327 - in branches/SAMBA_4_0/source: . auth/gensec build/smb_build gtk heimdal_build lib/ldb lib/registry lib/samba3 lib/socket_wrapper lib/talloc lib/tdb lib/tdr lib/util libcli l

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 16:32:44 + (Mon, 13 Mar 2006)
New Revision: 14327

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14327

Log:
Replace MAJOR_VERSION/MINOR_VERSION/RELEASE_VERSION with two parameters: 
 - VERSION: should contain the current version. Will be made part of the 
filename.
 - SO_VERSION: should contain the latest version that this on is compatible to. 
Will be used for setting the soname of the shared library.

Fix sonames and use them on platforms that support them
Remove symlinking code. ldconfig will take care of creating the symlinks now 
that we set the soname.


Modified:
   branches/SAMBA_4_0/source/auth/gensec/config.mk
   branches/SAMBA_4_0/source/build/smb_build/TODO
   branches/SAMBA_4_0/source/build/smb_build/config_mk.pm
   branches/SAMBA_4_0/source/build/smb_build/input.pm
   branches/SAMBA_4_0/source/build/smb_build/main.pl
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/build/smb_build/output.pm
   branches/SAMBA_4_0/source/gtk/config.mk
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/lib/ldb/config.mk
   branches/SAMBA_4_0/source/lib/registry/config.mk
   branches/SAMBA_4_0/source/lib/samba3/config.mk
   branches/SAMBA_4_0/source/lib/socket_wrapper/config.mk
   branches/SAMBA_4_0/source/lib/talloc/config.mk
   branches/SAMBA_4_0/source/lib/tdb/config.mk
   branches/SAMBA_4_0/source/lib/tdr/config.mk
   branches/SAMBA_4_0/source/lib/util/config.mk
   branches/SAMBA_4_0/source/libcli/config.mk
   branches/SAMBA_4_0/source/libnet/config.mk
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/nsswitch/config.mk
   branches/SAMBA_4_0/source/ntvfs/config.mk
   branches/SAMBA_4_0/source/param/config.mk
   branches/SAMBA_4_0/source/scripting/ejs/config.mk


Changeset:
Sorry, the patch is too large (1600 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14327


svn commit: samba r14328 - in trunk/source/client: .

2006-03-13 Thread sfrench
Author: sfrench
Date: 2006-03-13 17:10:58 + (Mon, 13 Mar 2006)
New Revision: 14328

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14328

Log:
Missing one coverity fix in trunk (clitar was missing a free in an error path
of getting the longname).


Modified:
   trunk/source/client/clitar.c


Changeset:
Modified: trunk/source/client/clitar.c
===
--- trunk/source/client/clitar.c2006-03-13 16:32:44 UTC (rev 14327)
+++ trunk/source/client/clitar.c2006-03-13 17:10:58 UTC (rev 14328)
@@ -1079,6 +1079,7 @@
while (left  0) {
if (next_block(tarbuf, buffer_p, tbufsiz) = 0) {
DEBUG(0, (Empty file, short tar file, or read error: 
%s\n, strerror(errno)));
+   SAFE_FREE(longname);
return(NULL);
}
 



svn commit: samba r14329 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2006-03-13 Thread gd
Author: gd
Date: 2006-03-13 17:26:52 + (Mon, 13 Mar 2006)
New Revision: 14329

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14329

Log:
Fix the build on systems without libcom_err.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
   trunk/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-03-13 17:10:58 UTC 
(rev 14328)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-03-13 17:26:52 UTC 
(rev 14329)
@@ -576,13 +576,13 @@
ret = nscd_flush_cache(passwd);
if (ret) {
DEBUG(5,(failed to flush nscd cache for 'passwd' service: 
%s\n,
-   error_message(ret)));
+   strerror(ret)));
}
 
ret = nscd_flush_cache(group);
if (ret) {
DEBUG(5,(failed to flush nscd cache for 'group' service: %s\n,
-   error_message(ret)));
+   strerror(ret)));
}
 #endif
 

Modified: trunk/source/nsswitch/winbindd_dual.c
===
--- trunk/source/nsswitch/winbindd_dual.c   2006-03-13 17:10:58 UTC (rev 
14328)
+++ trunk/source/nsswitch/winbindd_dual.c   2006-03-13 17:26:52 UTC (rev 
14329)
@@ -576,13 +576,13 @@
ret = nscd_flush_cache(passwd);
if (ret) {
DEBUG(5,(failed to flush nscd cache for 'passwd' service: 
%s\n,
-   error_message(ret)));
+   strerror(ret)));
}
 
ret = nscd_flush_cache(group);
if (ret) {
DEBUG(5,(failed to flush nscd cache for 'group' service: %s\n,
-   error_message(ret)));
+   strerror(ret)));
}
 #endif
 



svn commit: samba r14330 - in trunk/source/passdb: .

2006-03-13 Thread idra
Author: idra
Date: 2006-03-13 17:31:01 + (Mon, 13 Mar 2006)
New Revision: 14330

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14330

Log:

Missed to restore pdb_nds.c


Modified:
   trunk/source/passdb/pdb_nds.c


Changeset:
Modified: trunk/source/passdb/pdb_nds.c
===
--- trunk/source/passdb/pdb_nds.c   2006-03-13 17:26:52 UTC (rev 14329)
+++ trunk/source/passdb/pdb_nds.c   2006-03-13 17:31:01 UTC (rev 14330)
@@ -662,14 +662,14 @@
 
 int pdb_nds_get_password(
struct smbldap_state *ldap_state,
-   const char *object_dn,
+   char *object_dn,
size_t *pwd_len,
char *pwd )
 {
LDAP *ld = ldap_state-ldap_struct;
int rc = -1;
 
-   rc = nmasldap_get_password(ld, CONST_DISCARD(char *, object_dn), 
pwd_len, (unsigned char *)pwd);
+   rc = nmasldap_get_password(ld, object_dn, pwd_len, (unsigned char 
*)pwd);
if (rc == LDAP_SUCCESS) {
 #ifdef DEBUG_PASSWORD
DEBUG(100,(nmasldap_get_password returned %s for %s\n, pwd, 
object_dn));
@@ -680,7 +680,7 @@
}
 
if (rc != LDAP_SUCCESS) {
-   rc = nmasldap_get_simple_pwd(ld, CONST_DISCARD(char *, 
object_dn), *pwd_len, pwd);
+   rc = nmasldap_get_simple_pwd(ld, object_dn, *pwd_len, pwd);
if (rc == LDAP_SUCCESS) {
 #ifdef DEBUG_PASSWORD
DEBUG(100,(nmasldap_get_simple_pwd returned %s for 
%s\n, pwd, object_dn));
@@ -703,7 +703,7 @@
 
 int pdb_nds_set_password(
struct smbldap_state *ldap_state,
-   const char *object_dn,
+   char *object_dn,
const char *pwd )
 {
LDAP *ld = ldap_state-ldap_struct;
@@ -744,17 +744,6 @@
struct samu *sam_acct, BOOL success)
 {
struct ldapsam_privates *ldap_state;
-   int rc = 0;
-   const char *dn;
-   LDAPMessage *result = NULL;
-   LDAPMessage *entry = NULL;
-   const char **attr_list;
-   size_t pwd_len;
-   char clear_text_pw[512];
-   LDAP *ld = NULL;
-   const char *username = pdb_get_username(sam_acct);
-   BOOL got_clear_text_pw = False;
-   TALLOC_CTX *mem_ctx;
 
if ((!methods) || (!sam_acct)) {
DEBUG(3,(pdb_nds_update_login_attempts: invalid 
parameter.\n));
@@ -763,98 +752,98 @@
 
ldap_state = (struct ldapsam_privates *)methods-private_data;
 
-   if ( ! ldap_state) {
-   return NT_STATUS_OK;
-   }
+   if (ldap_state) {
+   /* Attempt simple bind with user credentials to update 
eDirectory
+  password policy */
+   int rc = 0;
+   char *dn;
+   LDAPMessage *result = NULL;
+   LDAPMessage *entry = NULL;
+   const char **attr_list;
+   size_t pwd_len;
+   char clear_text_pw[512];
+   LDAP *ld = NULL;
+   const char *username = pdb_get_username(sam_acct);
+   BOOL got_clear_text_pw = False;
 
-   /* Attempt simple bind with user credentials to update eDirectory
-  password policy */
+   DEBUG(5,(pdb_nds_update_login_attempts: %s login for %s\n,
+   success ? Successful : Failed, username));
 
-   mem_ctx = talloc_new(sam_acct);
-   if (mem_ctx == NULL) {
-   DEBUG(0, (talloc_new failed\n));
-   return NT_STATUS_NO_MEMORY;
-   }
+   result = pdb_get_backend_private_data(sam_acct, methods);
+   if (!result) {
+   attr_list = get_userattr_list(NULL,
+ ldap_state-schema_ver);
+   rc = ldapsam_search_suffix_by_name(ldap_state, 
username, result, attr_list );
+   TALLOC_FREE( attr_list );
+   if (rc != LDAP_SUCCESS) {
+   return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+   }
+   pdb_set_backend_private_data(sam_acct, result, NULL,
+methods, PDB_CHANGED);
+   talloc_autofree_ldapmsg(sam_acct, result);
+   }
 
-   DEBUG(5,(pdb_nds_update_login_attempts: %s login for %s\n,
-   success ? Successful : Failed, username));
+   if (ldap_count_entries(ldap_state-smbldap_state-ldap_struct, 
result) == 0) {
+   DEBUG(0, (pdb_nds_update_login_attempts: No user to 
modify!\n));
+   return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+   }
 
-   result = pdb_get_backend_private_data(sam_acct, methods);
-   if (!result) {
-   attr_list = get_userattr_list(mem_ctx, ldap_state-schema_ver);
-   rc = ldapsam_search_suffix_by_name(ldap_state, mem_ctx, 
username, result, attr_list );
-   

svn commit: samba r14331 - branches/SAMBA_3_0/source trunk/source

2006-03-13 Thread lmuelle
Author: lmuelle
Date: 2006-03-13 17:45:04 + (Mon, 13 Mar 2006)
New Revision: 14331

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14331

Log:
Add a comment on top of test_pam_modules about what we're testing.

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   trunk/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-03-13 17:31:01 UTC (rev 
14330)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-03-13 17:45:04 UTC (rev 
14331)
@@ -846,6 +846,8 @@
@echo Running Samba 3 Test suite
@sh ./script/tests/runtests.sh t_dir
 
+# Check for PAM module problems.  Specifically, check that every module we
+# built can actually be loaded by a minimal PAM-aware application.
 test_pam_modules: pam_modules
@echo Testing $(PAM_MODULES) 
@for module in $(PAM_MODULES); do \

Modified: trunk/source/Makefile.in
===
--- trunk/source/Makefile.in2006-03-13 17:31:01 UTC (rev 14330)
+++ trunk/source/Makefile.in2006-03-13 17:45:04 UTC (rev 14331)
@@ -862,6 +862,8 @@
@echo Running Samba 3 Test suite
@sh ./script/tests/runtests.sh t_dir
 
+# Check for PAM module problems.  Specifically, check that every module we
+# built can actually be loaded by a minimal PAM-aware application.
 test_pam_modules: pam_modules
@echo Testing $(PAM_MODULES) 
@for module in $(PAM_MODULES); do \



svn commit: samba r14337 - in trunk/source/smbd: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:56:33 + (Mon, 13 Mar 2006)
New Revision: 14337

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14337

Log:
Try and quieten coverity #53 and #54. Make it obvious
we're using -1 as a special size_t case by casting.
Jeremy.

Modified:
   trunk/source/smbd/msdfs.c


Changeset:
Modified: trunk/source/smbd/msdfs.c
===
--- trunk/source/smbd/msdfs.c   2006-03-13 18:56:26 UTC (rev 14336)
+++ trunk/source/smbd/msdfs.c   2006-03-13 18:56:33 UTC (rev 14337)
@@ -680,7 +680,7 @@
SSVAL(pdata,offset+18,uni_reqpathoffset2-offset);
/* copy referred path into current offset */
unilen = rpcstr_push(pdata+uni_curroffset, ref-alternate_path,
--1, STR_UNICODE);
+(size_t)-1, STR_UNICODE);
 
SSVAL(pdata,offset+20,uni_curroffset-offset);
 
@@ -709,7 +709,7 @@

DEBUG(10,(setting up version3 referral\n));
 
-   reqpathlen = rpcstr_push(uni_reqpath, pathname, -1, STR_TERMINATE);
+   reqpathlen = rpcstr_push(uni_reqpath, pathname, (size_t)-1, 
STR_TERMINATE);

if (DEBUGLVL(10)) {
dump_data(0, (char *) uni_reqpath,reqpathlen);



svn commit: samba r14338 - in branches/SAMBA_3_0/source/rpc_server: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:59:31 + (Mon, 13 Mar 2006)
New Revision: 14338

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14338

Log:
Fix coverity #55 by explicit cast.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2006-03-13 
18:56:33 UTC (rev 14337)
+++ branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2006-03-13 
18:59:31 UTC (rev 14338)
@@ -416,11 +416,14 @@
if ( !info || (info-type != SVC_HANDLE_IS_SCM) )
return WERR_BADFID;

-   if ( !(info-access_granted  SC_RIGHT_MGR_ENUMERATE_SERVICE) )
+   if ( !(info-access_granted  SC_RIGHT_MGR_ENUMERATE_SERVICE) ) {
return WERR_ACCESS_DENIED;
+   }
 
-   if ( (num_services = enumerate_status( p-mem_ctx, services, token )) 
== -1 )
+   num_services = enumerate_status( p-mem_ctx, services, token );
+   if (num_services == (uint32)-1 ) {
return WERR_NOMEM;
+   }
 
 for ( i=0; inum_services; i++ ) {
buffer_size += svcctl_sizeof_enum_services_status(services[i]);



svn commit: samba r14334 - in trunk/source/modules: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:43:10 + (Mon, 13 Mar 2006)
New Revision: 14334

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14334

Log:
Fix coverity #77, ensure we can't exit after allocation.
Jeremy.

Modified:
   trunk/source/modules/vfs_full_audit.c


Changeset:
Modified: trunk/source/modules/vfs_full_audit.c
===
--- trunk/source/modules/vfs_full_audit.c   2006-03-13 18:42:57 UTC (rev 
14333)
+++ trunk/source/modules/vfs_full_audit.c   2006-03-13 18:43:10 UTC (rev 
14334)
@@ -821,6 +821,10 @@
const char *none[] = { NULL };
const char *all [] = { all };
 
+   if (!handle) {
+   return -1;
+   }
+
pd = SMB_MALLOC_P(struct vfs_full_audit_private_data);
if (!pd) {
return -1;



svn commit: samba r14333 - in branches/SAMBA_3_0/source/modules: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:42:57 + (Mon, 13 Mar 2006)
New Revision: 14333

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14333

Log:
Fix coverity #77, ensure we can't exit after allocation.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/modules/vfs_full_audit.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_full_audit.c
===
--- branches/SAMBA_3_0/source/modules/vfs_full_audit.c  2006-03-13 18:31:42 UTC 
(rev 14332)
+++ branches/SAMBA_3_0/source/modules/vfs_full_audit.c  2006-03-13 18:42:57 UTC 
(rev 14333)
@@ -816,6 +816,10 @@
const char *none[] = { NULL };
const char *all [] = { all };
 
+   if (!handle) {
+   return -1;
+   }
+
pd = SMB_MALLOC_P(struct vfs_full_audit_private_data);
if (!pd) {
return -1;



svn commit: samba r14336 - in branches/SAMBA_3_0/source/smbd: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:56:26 + (Mon, 13 Mar 2006)
New Revision: 14336

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14336

Log:
Try and quieten coverity #53 and #54. Make it obvious
we're using -1 as a special size_t case by casting.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_0/source/smbd/msdfs.c  2006-03-13 18:54:33 UTC (rev 
14335)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c  2006-03-13 18:56:26 UTC (rev 
14336)
@@ -680,7 +680,7 @@
SSVAL(pdata,offset+18,uni_reqpathoffset2-offset);
/* copy referred path into current offset */
unilen = rpcstr_push(pdata+uni_curroffset, ref-alternate_path,
--1, STR_UNICODE);
+(size_t)-1, STR_UNICODE);
 
SSVAL(pdata,offset+20,uni_curroffset-offset);
 
@@ -709,7 +709,7 @@

DEBUG(10,(setting up version3 referral\n));
 
-   reqpathlen = rpcstr_push(uni_reqpath, pathname, -1, STR_TERMINATE);
+   reqpathlen = rpcstr_push(uni_reqpath, pathname, (size_t)-1, 
STR_TERMINATE);

if (DEBUGLVL(10)) {
dump_data(0, (char *) uni_reqpath,reqpathlen);



svn commit: samba r14339 - in trunk/source/rpc_server: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 18:59:39 + (Mon, 13 Mar 2006)
New Revision: 14339

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14339

Log:
Fix coverity #55 by explicit cast.
Jeremy.

Modified:
   trunk/source/rpc_server/srv_svcctl_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_svcctl_nt.c
===
--- trunk/source/rpc_server/srv_svcctl_nt.c 2006-03-13 18:59:31 UTC (rev 
14338)
+++ trunk/source/rpc_server/srv_svcctl_nt.c 2006-03-13 18:59:39 UTC (rev 
14339)
@@ -416,11 +416,14 @@
if ( !info || (info-type != SVC_HANDLE_IS_SCM) )
return WERR_BADFID;

-   if ( !(info-access_granted  SC_RIGHT_MGR_ENUMERATE_SERVICE) )
+   if ( !(info-access_granted  SC_RIGHT_MGR_ENUMERATE_SERVICE) ) {
return WERR_ACCESS_DENIED;
+   }
 
-   if ( (num_services = enumerate_status( p-mem_ctx, services, token )) 
== -1 )
+   num_services = enumerate_status( p-mem_ctx, services, token );
+   if (num_services == (uint32)-1 ) {
return WERR_NOMEM;
+   }
 
 for ( i=0; inum_services; i++ ) {
buffer_size += svcctl_sizeof_enum_services_status(services[i]);



svn commit: samba r14335 - in branches/SAMBA_4_0/source: bin bin/modules build/smb_build

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 18:54:33 + (Mon, 13 Mar 2006)
New Revision: 14335

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14335

Log:
Build shared modules in bin/modules/$SUBSYSTEM when in developer mode.

Added:
   branches/SAMBA_4_0/source/bin/modules/
Modified:
   branches/SAMBA_4_0/source/build/smb_build/TODO
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/build/smb_build/output.pm


Changeset:

Property changes on: branches/SAMBA_4_0/source/bin/modules
___
Name: svn:ignore
   + *


Modified: branches/SAMBA_4_0/source/build/smb_build/TODO
===
--- branches/SAMBA_4_0/source/build/smb_build/TODO  2006-03-13 18:43:10 UTC 
(rev 14334)
+++ branches/SAMBA_4_0/source/build/smb_build/TODO  2006-03-13 18:54:33 UTC 
(rev 14335)
@@ -1,6 +1,4 @@
 - subdir handler for install headers into a specific directory
-- hack for loading modules locally
- - create 
 - saner names for some of the .pc files
 - .pc files also when there is a public header?
 - get rid of include/structs.h and include/proto.h
@@ -11,5 +9,14 @@
   for each subsystem:
   - include line in Makefile
   - rule in Makefile
-- determine dependencies from #include lines ?
 - install (parts of ?) autogenerated headers
+
+set of test scripts that check the code:
+- configure_check_unused.pl
+- find_unused_macros.pl
+- find_unused_makefilevars.pl
+- find_unused_options.sh
+- findstatic.pl
+- minimal_includes.pl
+- check dependencies based on #include lines ?
+- check whether private headers are not used outside their own subsystem

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
18:43:10 UTC (rev 14334)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
18:54:33 UTC (rev 14335)
@@ -206,15 +206,15 @@
my $init_obj = ;

if ($self-{duplicate_build}) {
-   $installdir = bin/install;
+   $installdir = $ctx-{INSTALLDIR};
} else {
-   $installdir = bin;
+   $installdir = $ctx-{BUILDDIR};
}
 
if ($ctx-{TYPE} eq LIBRARY) {
-   push (@{$self-{shared_libs}}, bin/$ctx-{LIBRARY_REALNAME});
+   push (@{$self-{shared_libs}}, 
$ctx-{BUILDDIR}/$ctx-{LIBRARY_REALNAME});
} elsif ($ctx-{TYPE} eq MODULE) {
-   push (@{$self-{shared_modules}}, 
bin/$ctx-{LIBRARY_REALNAME});
+   push (@{$self-{shared_modules}}, 
$ctx-{BUILDDIR}/$ctx-{LIBRARY_REALNAME});
push (@{$self-{plugins}}, 
$installdir/$ctx-{LIBRARY_REALNAME});
 
my $fixedname = $ctx-{NAME};
@@ -267,8 +267,9 @@
$self-output( __EOD__
 #
 
-bin/$ctx-{LIBRARY_REALNAME}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST) $init_obj
+$ctx-{TARGET}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST) $init_obj
[EMAIL PROTECTED] Linking \$\@
+   [EMAIL PROTECTED] -p $ctx-{BUILDDIR}
[EMAIL PROTECTED](SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\
\$($ctx-{TYPE}_$ctx-{NAME}_LINK_FLAGS) $soarg \\
$init_obj \$($ctx-{TYPE}_$ctx-{NAME}_LINK_LIST)

Modified: branches/SAMBA_4_0/source/build/smb_build/output.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-03-13 18:43:10 UTC 
(rev 14334)
+++ branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-03-13 18:54:33 UTC 
(rev 14335)
@@ -58,12 +58,17 @@
$lib_name = lib$link_name;
}
 
+   $lib-{BUILDDIR} = bin;
+   $lib-{INSTALLDIR} = bin/install;
$lib-{LIBRARY_REALNAME} = $lib-{LIBRARY_NAME} = 
$lib_name.\$(SHLIBEXT);
+
if (defined($lib-{VERSION})) {
$lib-{LIBRARY_SONAME} = 
$lib-{LIBRARY_NAME}..$lib-{SO_VERSION};
$lib-{LIBRARY_REALNAME} = 
$lib-{LIBRARY_NAME}..$lib-{VERSION};
+   } elsif ($lib-{TYPE} eq MODULE) {
+   $lib-{BUILDDIR} = bin/modules/$lib-{SUBSYSTEM};
}
-   $lib-{TARGET} = bin/$lib-{LIBRARY_REALNAME};
+   $lib-{TARGET} = $lib-{BUILDDIR}/$lib-{LIBRARY_REALNAME};
$lib-{OUTPUT} = $lib-{TARGET};
 }
 
@@ -93,7 +98,9 @@
@{$bin-{LINK_LIST}} = (\$($bin-{TYPE}_$bin-{NAME}\_OBJ_LIST));
@{$bin-{LINK_FLAGS}} = ();
 
-   $bin-{TARGET} = $bin-{OUTPUT} = bin/$bin-{NAME};
+   $bin-{INSTALLDIR} = bin/install;
+   $bin-{BUILDDIR} = bin/;
+   $bin-{TARGET} = $bin-{OUTPUT} = $bin-{BUILDDIR}/$bin-{NAME};
$bin-{BINARY} = $bin-{NAME};
 }
 



svn commit: samba r14332 - in branches/SAMBA_4_0/source: . build/smb_build gtk/common lib param

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 18:31:42 + (Mon, 13 Mar 2006)
New Revision: 14332

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14332

Log:
Built in different paths when running locally (from ./bin/) in developer 
mode (./configure.developer). This will change the hardcoded value of a few 
paths (BINDIR, SWATDIR, EJSDIR, SETUPDIR, DATADIR, MODULESDIR). The regular 
locations will be used when running 'make install'.

This enables developers to work on (shared built) modules, swat, ejs and 
setup files without having to run 'make install' each time.

Added:
   branches/SAMBA_4_0/source/lib/version.c
Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/dynconfig.c
   branches/SAMBA_4_0/source/dynconfig.h
   branches/SAMBA_4_0/source/gtk/common/gtk-smb.c
   branches/SAMBA_4_0/source/param/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
17:45:04 UTC (rev 14331)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2006-03-13 
18:31:42 UTC (rev 14332)
@@ -408,22 +408,22 @@
if ($self-{duplicate_build}) {
$self-output( __EOD__
 #
-bin/$ctx-{BINARY}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST)
+bin/$ctx-{BINARY}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST) \$(builddir)/dynconfig-devel.o
[EMAIL PROTECTED] Linking \$\@
[EMAIL PROTECTED](CC) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\
\$\($ctx-{TYPE}_$ctx-{NAME}_LINK_LIST) \\
-   \$\($ctx-{TYPE}_$ctx-{NAME}_LINK_FLAGS)
+   \$\($ctx-{TYPE}_$ctx-{NAME}_LINK_FLAGS) 
\$(builddir)/dynconfig-devel.o
 
 __EOD__
 );
}
 
 $self-output( __EOD__
-$installdir/$ctx-{BINARY}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST)
+$installdir/$ctx-{BINARY}: \$($ctx-{TYPE}_$ctx-{NAME}_DEPEND_LIST) 
\$($ctx-{TYPE}_$ctx-{NAME}_OBJ_LIST) \$(builddir)/dynconfig.o
[EMAIL PROTECTED] Linking \$\@
[EMAIL PROTECTED](CC) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$\($ctx-{TYPE}_$ctx-{NAME}_LINK_LIST) \\
-   \$\($ctx-{TYPE}_$ctx-{NAME}_LINK_FLAGS) 
+   \$\($ctx-{TYPE}_$ctx-{NAME}_LINK_FLAGS) 
\$(builddir)/dynconfig.o
 
 __EOD__
 );

Modified: branches/SAMBA_4_0/source/dynconfig.c
===
--- branches/SAMBA_4_0/source/dynconfig.c   2006-03-13 17:45:04 UTC (rev 
14331)
+++ branches/SAMBA_4_0/source/dynconfig.c   2006-03-13 18:31:42 UTC (rev 
14332)
@@ -20,7 +20,6 @@
 */
 
 #include includes.h
-#include version.h
 
 /**
  * @file dynconfig.c
@@ -42,9 +41,6 @@
  * table?  There's kind of a chicken-and-egg situation there...
  **/
 
-/** Directory with super-user binaries */
-_PUBLIC_ const char *dyn_SBINDIR = SBINDIR;
-
 /** Directory with generic binaries */
 _PUBLIC_ const char *dyn_BINDIR = BINDIR;
 
@@ -91,45 +87,4 @@
 _PUBLIC_ const char *dyn_JSDIR = JSDIR;
 
 /** Where to find the winbindd socket */
-
 _PUBLIC_ const char *dyn_WINBINDD_SOCKET_DIR = WINBINDD_SOCKET_DIR;
-
-_PUBLIC_ const char *samba_version_string(void)
-{
-   const char *official_string = SAMBA_VERSION_OFFICIAL_STRING;
-#ifdef SAMBA_VERSION_RELEASE_NICKNAME
-   const char *release_nickname = SAMBA_VERSION_RELEASE_NICKNAME;
-#else
-   const char *release_nickname = NULL;
-#endif
-#ifdef SAMBA_VERSION_VENDOR_SUFFIX
-   const char *vendor_suffix = SAMBA_VERSION_VENDOR_SUFFIX;
-#else
-   const char *vendor_suffix = NULL;
-#endif
-#ifdef SAMBA_VERSION_VENDOR_PATCH
-   const char *vendor_patch = SAMBA_VERSION_VENDOR_PATCH;
-#else
-   const char *vendor_patch = NULL;
-#endif
-   static char *samba_version;
-   static BOOL init_samba_version;
-
-   if (init_samba_version) {
-   return samba_version;
-   }
-
-   samba_version = talloc_asprintf(talloc_autofree_context(),
-   %s%s%s%s%s%s%s%s,
-   official_string,
-   (vendor_suffix?-:),
-   (vendor_suffix?vendor_suffix:),
-   (vendor_patch?-:),
-   (vendor_patch?vendor_patch:),
-   (release_nickname? (:),
-   (release_nickname?release_nickname:),
-   (release_nickname?):));
-
-   init_samba_version = True;
-   return samba_version;
-}

Modified: branches/SAMBA_4_0/source/dynconfig.h
===
--- branches/SAMBA_4_0/source/dynconfig.h   2006-03-13 17:45:04 UTC (rev 
14331)
+++ 

svn commit: samba r14340 - in branches/SAMBA_3_0/source/rpcclient: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 19:40:51 + (Mon, 13 Mar 2006)
New Revision: 14340

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14340

Log:
Fix coverity #78, resource leak in error path.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpcclient/rpcclient.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/rpcclient.c
===
--- branches/SAMBA_3_0/source/rpcclient/rpcclient.c 2006-03-13 18:59:39 UTC 
(rev 14339)
+++ branches/SAMBA_3_0/source/rpcclient/rpcclient.c 2006-03-13 19:40:51 UTC 
(rev 14340)
@@ -58,35 +58,43 @@
 #endif
 
/* make sure we have a list of valid commands */
-   if (!commands) 
+   if (!commands) {
return NULL;
+   }
 
matches = SMB_MALLOC_ARRAY(char *, MAX_COMPLETIONS);
-   if (!matches) return NULL;
+   if (!matches) {
+   return NULL;
+   }
 
matches[count++] = SMB_STRDUP(text);
-   if (!matches[0]) return NULL;
+   if (!matches[0]) {
+   SAFE_FREE(matches);
+   return NULL;
+   }
 
-   while (commands  count  MAX_COMPLETIONS-1) 
-   {
-   if (!commands-cmd_set)
+   while (commands  count  MAX_COMPLETIONS-1) {
+   if (!commands-cmd_set) {
break;
+   }

-   for (i=0; commands-cmd_set[i].name; i++)
-   {
+   for (i=0; commands-cmd_set[i].name; i++) {
if ((strncmp(text, commands-cmd_set[i].name, 
strlen(text)) == 0) 
(( commands-cmd_set[i].returntype == 
RPC_RTYPE_NTSTATUS 
 commands-cmd_set[i].ntfn ) || 
   ( commands-cmd_set[i].returntype == RPC_RTYPE_WERROR 
-commands-cmd_set[i].wfn)))
-   {
+commands-cmd_set[i].wfn))) {
matches[count] = 
SMB_STRDUP(commands-cmd_set[i].name);
-   if (!matches[count]) 
+   if (!matches[count]) {
+   for (i = 0; i  count; i++) {
+   SAFE_FREE(matches[count]);
+   }
+   SAFE_FREE(matches);
return NULL;
+   }
count++;
}
}
-   
commands = commands-next;

}



svn commit: samba r14341 - in trunk/source/rpcclient: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 19:40:55 + (Mon, 13 Mar 2006)
New Revision: 14341

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14341

Log:
Fix coverity #78, resource leak in error path.
Jeremy.

Modified:
   trunk/source/rpcclient/rpcclient.c


Changeset:
Modified: trunk/source/rpcclient/rpcclient.c
===
--- trunk/source/rpcclient/rpcclient.c  2006-03-13 19:40:51 UTC (rev 14340)
+++ trunk/source/rpcclient/rpcclient.c  2006-03-13 19:40:55 UTC (rev 14341)
@@ -58,35 +58,43 @@
 #endif
 
/* make sure we have a list of valid commands */
-   if (!commands) 
+   if (!commands) {
return NULL;
+   }
 
matches = SMB_MALLOC_ARRAY(char *, MAX_COMPLETIONS);
-   if (!matches) return NULL;
+   if (!matches) {
+   return NULL;
+   }
 
matches[count++] = SMB_STRDUP(text);
-   if (!matches[0]) return NULL;
+   if (!matches[0]) {
+   SAFE_FREE(matches);
+   return NULL;
+   }
 
-   while (commands  count  MAX_COMPLETIONS-1) 
-   {
-   if (!commands-cmd_set)
+   while (commands  count  MAX_COMPLETIONS-1) {
+   if (!commands-cmd_set) {
break;
+   }

-   for (i=0; commands-cmd_set[i].name; i++)
-   {
+   for (i=0; commands-cmd_set[i].name; i++) {
if ((strncmp(text, commands-cmd_set[i].name, 
strlen(text)) == 0) 
(( commands-cmd_set[i].returntype == 
RPC_RTYPE_NTSTATUS 
 commands-cmd_set[i].ntfn ) || 
   ( commands-cmd_set[i].returntype == RPC_RTYPE_WERROR 
-commands-cmd_set[i].wfn)))
-   {
+commands-cmd_set[i].wfn))) {
matches[count] = 
SMB_STRDUP(commands-cmd_set[i].name);
-   if (!matches[count]) 
+   if (!matches[count]) {
+   for (i = 0; i  count; i++) {
+   SAFE_FREE(matches[count]);
+   }
+   SAFE_FREE(matches);
return NULL;
+   }
count++;
}
}
-   
commands = commands-next;

}



svn commit: samba r14342 - in branches/SAMBA_3_0/source/lib: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 19:47:18 + (Mon, 13 Mar 2006)
New Revision: 14342

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14342

Log:
Fix coverity #68, resource leak on error path.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/sysquotas.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/sysquotas.c
===
--- branches/SAMBA_3_0/source/lib/sysquotas.c   2006-03-13 19:40:55 UTC (rev 
14341)
+++ branches/SAMBA_3_0/source/lib/sysquotas.c   2006-03-13 19:47:18 UTC (rev 
14342)
@@ -184,12 +184,12 @@
 static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, 
unid_t id, SMB_DISK_QUOTA *dp)
 {
const char *get_quota_command;
+   char **lines = NULL;

get_quota_command = lp_get_quota_command();
if (get_quota_command  *get_quota_command) {
const char *p;
char *p2;
-   char **lines;
pstring syscmd;
int _id = -1;
 
@@ -223,49 +223,79 @@
 
dp-qflags = (enum SMB_QUOTA_TYPE)strtoul(line, p2, 
10);
p = p2;
-   while (p  *p  isspace(*p))
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-curblocks = STR_TO_SMB_BIG_UINT(p, p);
-   else 
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-softlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-hardlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else 
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-curinodes = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-isoftlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-ihardlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param; 
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-bsize = STR_TO_SMB_BIG_UINT(p, NULL);
-   else
+   } else {
dp-bsize = 1024;
+   }
+
file_lines_free(lines);
+   lines = NULL;
+
DEBUG (3, (Parsed output of get_quota, ...\n));
 
 #ifdef LARGE_SMB_OFF_T
@@ -298,6 +328,8 @@
return -1;

 invalid_param:
+
+   file_lines_free(lines);
DEBUG(0,(The output of get_quota_command is invalid!\n));
return -1;
 }



svn commit: samba r14343 - in trunk/source/lib: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 19:47:23 + (Mon, 13 Mar 2006)
New Revision: 14343

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14343

Log:
Fix coverity #68, resource leak on error path.
Jeremy.

Modified:
   trunk/source/lib/sysquotas.c


Changeset:
Modified: trunk/source/lib/sysquotas.c
===
--- trunk/source/lib/sysquotas.c2006-03-13 19:47:18 UTC (rev 14342)
+++ trunk/source/lib/sysquotas.c2006-03-13 19:47:23 UTC (rev 14343)
@@ -184,12 +184,12 @@
 static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, 
unid_t id, SMB_DISK_QUOTA *dp)
 {
const char *get_quota_command;
+   char **lines = NULL;

get_quota_command = lp_get_quota_command();
if (get_quota_command  *get_quota_command) {
const char *p;
char *p2;
-   char **lines;
pstring syscmd;
int _id = -1;
 
@@ -223,49 +223,79 @@
 
dp-qflags = (enum SMB_QUOTA_TYPE)strtoul(line, p2, 
10);
p = p2;
-   while (p  *p  isspace(*p))
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-curblocks = STR_TO_SMB_BIG_UINT(p, p);
-   else 
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-softlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-hardlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else 
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-curinodes = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-isoftlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param;
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-ihardlimit = STR_TO_SMB_BIG_UINT(p, p);
-   else
+   } else {
goto invalid_param; 
-   while (p  *p  isspace(*p))
+   }
+
+   while (p  *p  isspace(*p)) {
p++;
-   if (p  *p)
+   }
+
+   if (p  *p) {
dp-bsize = STR_TO_SMB_BIG_UINT(p, NULL);
-   else
+   } else {
dp-bsize = 1024;
+   }
+
file_lines_free(lines);
+   lines = NULL;
+
DEBUG (3, (Parsed output of get_quota, ...\n));
 
 #ifdef LARGE_SMB_OFF_T
@@ -298,6 +328,8 @@
return -1;

 invalid_param:
+
+   file_lines_free(lines);
DEBUG(0,(The output of get_quota_command is invalid!\n));
return -1;
 }



svn commit: samba r14344 - in branches/SAMBA_4_0/source/lib/ldb: modules tools

2006-03-13 Thread idra
Author: idra
Date: 2006-03-13 21:05:55 + (Mon, 13 Mar 2006)
New Revision: 14344

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14344

Log:

More helpful messages on error for command line specified controls
fixes in paged_results
asq - async


Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/asq.c
   branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c


Changeset:
Sorry, the patch is too large (609 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14344


svn commit: samba r14345 - in branches/SAMBA_3_0/source/lib: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 21:11:15 + (Mon, 13 Mar 2006)
New Revision: 14345

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14345

Log:
Fix Coverity #71. We don't currently propagate *any*
alloc error back up the stack from smbldap_set_mod()
so ensure we abort correctly.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/smbldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/smbldap.c
===
--- branches/SAMBA_3_0/source/lib/smbldap.c 2006-03-13 21:05:55 UTC (rev 
14344)
+++ branches/SAMBA_3_0/source/lib/smbldap.c 2006-03-13 21:11:15 UTC (rev 
14345)
@@ -408,8 +408,9 @@
if (mods == NULL) {
mods = SMB_MALLOC_P(LDAPMod *);
if (mods == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[0] = NULL;
}
@@ -422,13 +423,15 @@
if (mods[i] == NULL) {
mods = SMB_REALLOC_ARRAY (mods, LDAPMod *, i + 2);
if (mods == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[i] = SMB_MALLOC_P(LDAPMod);
if (mods[i] == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[i]-mod_op = modop;
mods[i]-mod_values = NULL;
@@ -446,13 +449,15 @@
mods[i]-mod_values = SMB_REALLOC_ARRAY(mods[i]-mod_values, 
char *, j + 2);
   
if (mods[i]-mod_values == NULL) {
-   DEBUG (0, (make_a_mod: Memory allocation failure!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
 
if (push_utf8_allocate(utf8_value, value) == (size_t)-1) {
-   DEBUG (0, (make_a_mod: String conversion failure!\n));
-   return;
+   smb_panic(smbldap_set_mod: String conversion 
failure!\n);
+   /* notreached. */
+   abort();
}
 
mods[i]-mod_values[j] = utf8_value;



svn commit: samba r14346 - in trunk/source/lib: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 21:11:20 + (Mon, 13 Mar 2006)
New Revision: 14346

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14346

Log:
Fix Coverity #71. We don't currently propagate *any*
alloc error back up the stack from smbldap_set_mod()
so ensure we abort correctly.
Jeremy.

Modified:
   trunk/source/lib/smbldap.c


Changeset:
Modified: trunk/source/lib/smbldap.c
===
--- trunk/source/lib/smbldap.c  2006-03-13 21:11:15 UTC (rev 14345)
+++ trunk/source/lib/smbldap.c  2006-03-13 21:11:20 UTC (rev 14346)
@@ -408,8 +408,9 @@
if (mods == NULL) {
mods = SMB_MALLOC_P(LDAPMod *);
if (mods == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[0] = NULL;
}
@@ -422,13 +423,15 @@
if (mods[i] == NULL) {
mods = SMB_REALLOC_ARRAY (mods, LDAPMod *, i + 2);
if (mods == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[i] = SMB_MALLOC_P(LDAPMod);
if (mods[i] == NULL) {
-   DEBUG(0, (make_a_mod: out of memory!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
mods[i]-mod_op = modop;
mods[i]-mod_values = NULL;
@@ -446,13 +449,15 @@
mods[i]-mod_values = SMB_REALLOC_ARRAY(mods[i]-mod_values, 
char *, j + 2);
   
if (mods[i]-mod_values == NULL) {
-   DEBUG (0, (make_a_mod: Memory allocation failure!\n));
-   return;
+   smb_panic(smbldap_set_mod: out of memory!\n);
+   /* notreached. */
+   abort();
}
 
if (push_utf8_allocate(utf8_value, value) == (size_t)-1) {
-   DEBUG (0, (make_a_mod: String conversion failure!\n));
-   return;
+   smb_panic(smbldap_set_mod: String conversion 
failure!\n);
+   /* notreached. */
+   abort();
}
 
mods[i]-mod_values[j] = utf8_value;



svn commit: samba r14347 - in branches/SAMBA_4_0/source: build/smb_build torture torture/com

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 21:21:44 + (Mon, 13 Mar 2006)
New Revision: 14347

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14347

Log:
Add registration function to allow registering smbtorture test(suites)
Fix mechanism for breaking lines when printing test names.

Modified:
   branches/SAMBA_4_0/source/build/smb_build/header.pm
   branches/SAMBA_4_0/source/torture/com/simple.c
   branches/SAMBA_4_0/source/torture/config.mk
   branches/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/header.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-13 21:11:20 UTC 
(rev 14346)
+++ branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-13 21:21:44 UTC 
(rev 14347)
@@ -29,7 +29,9 @@
 
foreach my $key (values %{$depend}) {
my $DEFINE = ();
-   next if ($key-{TYPE} ne LIBRARY and $key-{TYPE} ne 
SUBSYSTEM);
+   next if ($key-{TYPE} ne LIBRARY and 
+$key-{TYPE} ne SUBSYSTEM and
+$key-{TYPE} ne BINARY);
next unless defined($key-{INIT_FUNCTIONS});
 
$DEFINE-{COMMENT} = $key-{TYPE} $key-{NAME} INIT;

Modified: branches/SAMBA_4_0/source/torture/com/simple.c
===
--- branches/SAMBA_4_0/source/torture/com/simple.c  2006-03-13 21:11:20 UTC 
(rev 14346)
+++ branches/SAMBA_4_0/source/torture/com/simple.c  2006-03-13 21:21:44 UTC 
(rev 14347)
@@ -24,6 +24,7 @@
 #include lib/com/dcom/dcom.h
 #include librpc/gen_ndr/com_dcom.h
 #include lib/cmdline/popt_common.h
+#include torture/torture.h
 
 #define DEFAULT_TRANS 4096
 
@@ -95,3 +96,8 @@
 
return ret;
 }
+
+NTSTATUS torture_com_init(void)
+{
+   return register_torture_op(COM-SIMPLE, torture_com_simple, 0);
+}

Modified: branches/SAMBA_4_0/source/torture/config.mk
===
--- branches/SAMBA_4_0/source/torture/config.mk 2006-03-13 21:11:20 UTC (rev 
14346)
+++ branches/SAMBA_4_0/source/torture/config.mk 2006-03-13 21:21:44 UTC (rev 
14347)
@@ -63,17 +63,15 @@
 
 include smb2/config.mk
 
-#
-# Start SUBSYSTEM TORTURE_COM
-[SUBSYSTEM::TORTURE_COM]
+[MODULE::torture_com]
+INIT_FUNCTION = torture_com_init
+SUBSYSTEM = smbtorture
 PRIVATE_PROTO_HEADER = \
com/proto.h
 OBJ_FILES = \
com/simple.o
 REQUIRED_SUBSYSTEMS = \
com dcom
-# End SUBSYSTEM TORTURE_COM
-#
 
 #
 # Start SUBSYSTEM TORTURE_RPC
@@ -235,7 +233,6 @@
TORTURE_LOCAL \
TORTURE_NBENCH \
TORTURE_LDAP \
-   TORTURE_COM \
TORTURE_NBT \
TORTURE_NET \
CONFIG \

Modified: branches/SAMBA_4_0/source/torture/torture.c
===
--- branches/SAMBA_4_0/source/torture/torture.c 2006-03-13 21:11:20 UTC (rev 
14346)
+++ branches/SAMBA_4_0/source/torture/torture.c 2006-03-13 21:21:44 UTC (rev 
14347)
@@ -44,6 +44,8 @@
 #include torture/nbt/proto.h
 #include torture/libnet/proto.h
 #include torture/torture.h
+#include build.h
+#include dlinklist.h
 
 int torture_nprocs=4;
 int torture_numops=10;
@@ -54,6 +56,7 @@
 static struct smbcli_state *current_cli;
 static BOOL use_oplocks;
 static BOOL use_level_II_oplocks;
+#define MAX_COLS 80 /* FIXME: Determine this at run-time */
 
 BOOL torture_showall = False;
 
@@ -2192,7 +2195,7 @@
const char *name;
BOOL (*fn)(void);
BOOL (*multi_fn)(struct smbcli_state *, int );
-} torture_ops[] = {
+} builtin_torture_ops[] = {
/* base tests */
{BASE-FDPASS, run_fdpasstest, 0},
{BASE-LOCK1,  torture_locktest1,  0},
@@ -2344,9 +2347,6 @@
{LOCAL-SDDL, torture_local_sddl, 0},
{LOCAL-NDR, torture_local_ndr, 0},
 
-   /* COM (Component Object Model) testers */
-   {COM-SIMPLE, torture_com_simple, 0 },
-
/* ldap testers */
{LDAP-BASIC, torture_ldap_basic, 0},
{LDAP-CLDAP, torture_cldap, 0},
@@ -2376,50 +2376,98 @@
 
{NULL, NULL, 0}};
 
+static void register_builtin_ops(void)
+{
+   int i;
+   for (i = 0; builtin_torture_ops[i].name; i++) {
+   register_torture_op(builtin_torture_ops[i].name, 
+   
builtin_torture_ops[i].fn, 
+   
builtin_torture_ops[i].multi_fn);
+   }
+}
 
 
+static struct torture_op {
+   const char *name;
+   BOOL (*fn)(void);
+   BOOL (*multi_fn)(struct smbcli_state *, int );
+   struct torture_op *prev, *next;
+}* torture_ops = NULL;;
+
+static struct torture_op *find_torture_op(const 

svn commit: samba r14348 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 22:32:41 + (Mon, 13 Mar 2006)
New Revision: 14348

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14348

Log:
Fix location of #endif

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2006-03-13 21:21:44 UTC (rev 14347)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2006-03-13 22:32:41 UTC (rev 14348)
@@ -2237,11 +2237,6 @@
 
my $count = 0;
 
-   pidl_hdr #ifndef _HEADER_RPC_$interface-{NAME};
-   pidl_hdr #define _HEADER_RPC_$interface-{NAME};
-
-   pidl_hdr ;
-
if (defined $interface-{PROPERTIES}-{depends}) {
my @d = split / /, $interface-{PROPERTIES}-{depends};
foreach my $i (@d) {
@@ -2293,7 +2288,6 @@
 
pidl_hdr #define DCERPC_ . uc $interface-{NAME} . _CALL_COUNT 
($val);
 
-   pidl_hdr #endif /* _HEADER_RPC_$interface-{NAME} */;
 }
 
 #
@@ -2302,6 +2296,11 @@
 {
my($interface,$needed) = @_;
 
+   pidl_hdr #ifndef _HEADER_RPC_$interface-{NAME};
+   pidl_hdr #define _HEADER_RPC_$interface-{NAME};
+
+   pidl_hdr ;
+
HeaderInterface($interface);
 
# Typedefs
@@ -2329,6 +2328,8 @@
}
 
FunctionTable($interface);
+
+   pidl_hdr #endif /* _HEADER_RPC_$interface-{NAME} */;
 }
 
 #
@@ -2422,4 +2423,3 @@
 }
 
 1;
-



svn commit: samba r14349 - in branches/SAMBA_4_0/source: . build/smb_build client include lib lib/ldb lib/ldb/include lib/ldb/samba lib/ldb/tools lib/registry/tools lib/replace libcli libcli/nbt librp

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 22:36:07 + (Mon, 13 Mar 2006)
New Revision: 14349

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14349

Log:
Kill proto.h!

Prototypes are now spread over multiple headers, usually one per subsystem.
This change is required to allow proper header dependencies later on, 
without recompiling Samba each time the mtime of any source file changes.

Modified:
   branches/SAMBA_4_0/source/build/smb_build/TODO
   branches/SAMBA_4_0/source/client/client.c
   branches/SAMBA_4_0/source/include/
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/lib/db_wrap.c
   branches/SAMBA_4_0/source/lib/ldb/config.mk
   branches/SAMBA_4_0/source/lib/ldb/include/includes.h
   branches/SAMBA_4_0/source/lib/ldb/samba/
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
   branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
   branches/SAMBA_4_0/source/lib/replace/
   branches/SAMBA_4_0/source/lib/replace/config.mk
   branches/SAMBA_4_0/source/lib/replace/readline.m4
   branches/SAMBA_4_0/source/libcli/config.mk
   branches/SAMBA_4_0/source/libcli/nbt/
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/librpc/ndr/
   branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/TODO
===
--- branches/SAMBA_4_0/source/build/smb_build/TODO  2006-03-13 22:32:41 UTC 
(rev 14348)
+++ branches/SAMBA_4_0/source/build/smb_build/TODO  2006-03-13 22:36:07 UTC 
(rev 14349)
@@ -1,15 +1,15 @@
-- subdir handler for install headers into a specific directory
 - saner names for some of the .pc files
 - .pc files also when there is a public header?
 - get rid of include/structs.h and include/proto.h
  - support including a custom header by librpc/gen_ndr/*.c files
+ - if a ndr_.*_man.h file exists, include it.
 - plugin loading support in ldb
-- add register function to smbtorture
 - proper #include dependencies:
   for each subsystem:
   - include line in Makefile
   - rule in Makefile
-- install (parts of ?) autogenerated headers
+- install autogenerated headers (seperate directory)
+- subdir handler for install headers into a specific directory
 
 set of test scripts that check the code:
 - configure_check_unused.pl

Modified: branches/SAMBA_4_0/source/client/client.c
===
--- branches/SAMBA_4_0/source/client/client.c   2006-03-13 22:32:41 UTC (rev 
14348)
+++ branches/SAMBA_4_0/source/client/client.c   2006-03-13 22:36:07 UTC (rev 
14349)
@@ -37,6 +37,7 @@
 #include system/time.h /* needed by some systems for asctime() */
 #include libcli/resolve/resolve.h
 #include libcli/security/proto.h
+#include lib/replace/readline.h
 
 static int io_bufsize = 64512;
 


Property changes on: branches/SAMBA_4_0/source/include
___
Name: svn:ignore
   - config.h
config.h.in
build.h
includes.h.gch
proto.h
stamp-h
version.h

   + config.h
config.h.in
build.h
includes.h.gch
stamp-h
version.h


Modified: branches/SAMBA_4_0/source/include/includes.h
===
--- branches/SAMBA_4_0/source/include/includes.h2006-03-13 22:32:41 UTC 
(rev 14348)
+++ branches/SAMBA_4_0/source/include/includes.h2006-03-13 22:36:07 UTC 
(rev 14349)
@@ -125,12 +125,19 @@
 #include libcli/nbt/libnbt.h
 #include libcli/util/proto.h
 
+/* These headers are used by the NDR parsers. They are globally 
+ * included at the moment, but will be included by the autogenerated 
+ * NDR parsers later on and removed from here. */
+#include libcli/nbt/nbtname.h
+#include librpc/ndr/ndr_sec.h
+#include librpc/ndr/ndr_drsuapi.h
+#include librpc/ndr/ndr_spoolss_buf.h
+#include librpc/ndr/ndr_krb5pac.h
+#include librpc/ndr/ndr_compression.h
+
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)
 
-/* automatically generated prototypes */
-#include include/proto.h
-
 /* String routines */
 
 #include util/safe_string.h

Modified: branches/SAMBA_4_0/source/lib/db_wrap.c
===
--- branches/SAMBA_4_0/source/lib/db_wrap.c 2006-03-13 22:32:41 UTC (rev 
14348)
+++ branches/SAMBA_4_0/source/lib/db_wrap.c 2006-03-13 22:36:07 UTC (rev 
14349)
@@ -32,6 +32,7 @@
 #include lib/events/events.h
 #include lib/tdb/include/tdb.h
 #include lib/ldb/include/ldb.h
+#include lib/ldb/samba/ldif_handlers.h
 #include db_wrap.h
 
 static struct tdb_wrap *tdb_list;

Modified: branches/SAMBA_4_0/source/lib/ldb/config.mk
===
--- branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-03-13 22:32:41 UTC (rev 
14348)
+++ branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-03-13 22:36:07 UTC (rev 
14349)
@@ -162,6 +162,7 @@
 

svn commit: samba r14350 - in branches/SAMBA_4_0/source: .

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-13 22:39:05 + (Mon, 13 Mar 2006)
New Revision: 14350

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14350

Log:
Keep make proto. It's hard to forget old habits. :-)

Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-03-13 22:36:07 UTC (rev 14349)
+++ branches/SAMBA_4_0/source/main.mk   2006-03-13 22:39:05 UTC (rev 14350)
@@ -248,8 +248,9 @@
 
 pch: clean_pch include/includes.h.gch
 
+proto: $(PROTO_HEADERS)
 basics: include/includes.h \
-   $(PROTO_HEADERS) \
+   proto \
idl \
heimdal_basics
 



svn commit: samba r14351 - in branches/SAMBA_3_0/source/client: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 22:49:56 + (Mon, 13 Mar 2006)
New Revision: 14351

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14351

Log:
Ensure we use the minimum of PATH_MAX and sizeof(pstring).
Fix Coverity #59.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/client/client.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===
--- branches/SAMBA_3_0/source/client/client.c   2006-03-13 22:39:05 UTC (rev 
14350)
+++ branches/SAMBA_3_0/source/client/client.c   2006-03-13 22:49:56 UTC (rev 
14351)
@@ -2919,16 +2919,22 @@
info.text = text;
info.len = len;

-   if (len = PATH_MAX)
+   if (len = MIN(PATH_MAX,sizeof(pstring))) {
return(NULL);
+   }
 
info.matches = SMB_MALLOC_ARRAY(char *,MAX_COMPLETIONS);
-   if (!info.matches) return NULL;
+   if (!info.matches) {
+   return NULL;
+   }
info.matches[0] = NULL;
 
-   for (i = len-1; i = 0; i--)
-   if ((text[i] == '/') || (text[i] == '\\'))
+   for (i = len-1; i = 0; i--) {
+   if ((text[i] == '/') || (text[i] == '\\')) {
break;
+   }
+   }
+
info.text = text+i+1;
info.samelen = info.len = len-i-1;
 
@@ -2936,8 +2942,9 @@
strncpy(info.dirmask, text, i+1);
info.dirmask[i+1] = 0;
pstr_sprintf(dirmask, %s%*s*, cur_dir, i-1, text);
-   } else
+   } else {
pstr_sprintf(dirmask, %s*, cur_dir);
+   }
 
if (cli_list(cli, dirmask, aDIR | aSYSTEM | aHIDDEN, 
completion_remote_filter, info)  0)
goto cleanup;



svn commit: samba r14352 - in trunk/source/client: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 22:50:02 + (Mon, 13 Mar 2006)
New Revision: 14352

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14352

Log:
Ensure we use the minimum of PATH_MAX and sizeof(pstring).
Fix Coverity #59.
Jeremy.

Modified:
   trunk/source/client/client.c


Changeset:
Modified: trunk/source/client/client.c
===
--- trunk/source/client/client.c2006-03-13 22:49:56 UTC (rev 14351)
+++ trunk/source/client/client.c2006-03-13 22:50:02 UTC (rev 14352)
@@ -2919,16 +2919,22 @@
info.text = text;
info.len = len;

-   if (len = PATH_MAX)
+   if (len = MIN(PATH_MAX,sizeof(pstring))) {
return(NULL);
+   }
 
info.matches = SMB_MALLOC_ARRAY(char *,MAX_COMPLETIONS);
-   if (!info.matches) return NULL;
+   if (!info.matches) {
+   return NULL;
+   }
info.matches[0] = NULL;
 
-   for (i = len-1; i = 0; i--)
-   if ((text[i] == '/') || (text[i] == '\\'))
+   for (i = len-1; i = 0; i--) {
+   if ((text[i] == '/') || (text[i] == '\\')) {
break;
+   }
+   }
+
info.text = text+i+1;
info.samelen = info.len = len-i-1;
 
@@ -2936,8 +2942,9 @@
strncpy(info.dirmask, text, i+1);
info.dirmask[i+1] = 0;
pstr_sprintf(dirmask, %s%*s*, cur_dir, i-1, text);
-   } else
+   } else {
pstr_sprintf(dirmask, %s*, cur_dir);
+   }
 
if (cli_list(cli, dirmask, aDIR | aSYSTEM | aHIDDEN, 
completion_remote_filter, info)  0)
goto cleanup;



svn commit: samba r14353 - in branches/SAMBA_3_0/source: include rpc_server

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:07:14 + (Mon, 13 Mar 2006)
New Revision: 14353

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14353

Log:
Fix coverity bugs #61 and #62. Remember to divide by
the size of the data table. Clean up the struct a little.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/rpc_spoolss.h
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/rpc_spoolss.h
===
--- branches/SAMBA_3_0/source/include/rpc_spoolss.h 2006-03-13 22:50:02 UTC 
(rev 14352)
+++ branches/SAMBA_3_0/source/include/rpc_spoolss.h 2006-03-13 23:07:14 UTC 
(rev 14353)
@@ -810,7 +810,7 @@
}
notify_data;
uint32 size;
-   BOOL enc_type;
+   uint32 enc_type;
 } SPOOL_NOTIFY_INFO_DATA;
 
 typedef struct spool_notify_info

Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2006-03-13 
22:50:02 UTC (rev 14352)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2006-03-13 
23:07:14 UTC (rev 14353)
@@ -3441,25 +3441,22 @@
 {
int i=0;
 
-   for (i = 0; i  sizeof(notify_info_data_table); i++) 
-   {
+   for (i = 0; i  (sizeof(notify_info_data_table)/sizeof(struct 
s_notify_info_data_table)); i++) {
if ( (notify_info_data_table[i].type == type)
-(notify_info_data_table[i].field == field) ) 
-   {
-   switch(notify_info_data_table[i].size) 
-   {
-   case NOTIFY_ONE_VALUE:
-   case NOTIFY_TWO_VALUE:
-   return 1;
-   case NOTIFY_STRING:
-   return 2;
+(notify_info_data_table[i].field == field) ) {
+   switch(notify_info_data_table[i].size) {
+   case NOTIFY_ONE_VALUE:
+   case NOTIFY_TWO_VALUE:
+   return 1;
+   case NOTIFY_STRING:
+   return 2;
 
-   /* The only pointer notify data I have seen on
-  the wire is the submitted time and this has
-  the notify size set to 4. -tpot */
+   /* The only pointer notify data I have seen on
+  the wire is the submitted time and this has
+  the notify size set to 4. -tpot */
 
-   case NOTIFY_POINTER:
-   return 4;
+   case NOTIFY_POINTER:
+   return 4;

case NOTIFY_SECDESC:
return 5;
@@ -3476,23 +3473,23 @@
  Return the type of notify_info_data.
 /
 
-static int type_of_notify_info_data(uint16 type, uint16 field)
+static uint32 type_of_notify_info_data(uint16 type, uint16 field)
 {
-   int i=0;
+   uint32 i=0;
 
-   for (i = 0; i  sizeof(notify_info_data_table); i++) {
+   for (i = 0; i  (sizeof(notify_info_data_table)/sizeof(struct 
s_notify_info_data_table)); i++) {
if (notify_info_data_table[i].type == type 
notify_info_data_table[i].field == field)
return notify_info_data_table[i].size;
}
 
-   return False;
+   return 0;
 }
 
 /
 /
 
-static int search_notify(uint16 type, uint16 field, int *value)
+static BOOL search_notify(uint16 type, uint16 field, int *value)
 {  
int i;
 
@@ -3521,10 +3518,8 @@
info_data-enc_type = type_of_notify_info_data(type, field);
 
info_data-id = id;
-
 }
 
-
 /***
  *
  * fill a notify_info struct with info asked



svn commit: samba r14354 - in trunk/source: include rpc_server

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:07:20 + (Mon, 13 Mar 2006)
New Revision: 14354

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14354

Log:
Fix coverity bugs #61 and #62. Remember to divide by
the size of the data table. Clean up the struct a little.
Jeremy.

Modified:
   trunk/source/include/rpc_spoolss.h
   trunk/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: trunk/source/include/rpc_spoolss.h
===
--- trunk/source/include/rpc_spoolss.h  2006-03-13 23:07:14 UTC (rev 14353)
+++ trunk/source/include/rpc_spoolss.h  2006-03-13 23:07:20 UTC (rev 14354)
@@ -810,7 +810,7 @@
}
notify_data;
uint32 size;
-   BOOL enc_type;
+   uint32 enc_type;
 } SPOOL_NOTIFY_INFO_DATA;
 
 typedef struct spool_notify_info

Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===
--- trunk/source/rpc_server/srv_spoolss_nt.c2006-03-13 23:07:14 UTC (rev 
14353)
+++ trunk/source/rpc_server/srv_spoolss_nt.c2006-03-13 23:07:20 UTC (rev 
14354)
@@ -3441,25 +3441,22 @@
 {
int i=0;
 
-   for (i = 0; i  sizeof(notify_info_data_table); i++) 
-   {
+   for (i = 0; i  (sizeof(notify_info_data_table)/sizeof(struct 
s_notify_info_data_table)); i++) {
if ( (notify_info_data_table[i].type == type)
-(notify_info_data_table[i].field == field) ) 
-   {
-   switch(notify_info_data_table[i].size) 
-   {
-   case NOTIFY_ONE_VALUE:
-   case NOTIFY_TWO_VALUE:
-   return 1;
-   case NOTIFY_STRING:
-   return 2;
+(notify_info_data_table[i].field == field) ) {
+   switch(notify_info_data_table[i].size) {
+   case NOTIFY_ONE_VALUE:
+   case NOTIFY_TWO_VALUE:
+   return 1;
+   case NOTIFY_STRING:
+   return 2;
 
-   /* The only pointer notify data I have seen on
-  the wire is the submitted time and this has
-  the notify size set to 4. -tpot */
+   /* The only pointer notify data I have seen on
+  the wire is the submitted time and this has
+  the notify size set to 4. -tpot */
 
-   case NOTIFY_POINTER:
-   return 4;
+   case NOTIFY_POINTER:
+   return 4;

case NOTIFY_SECDESC:
return 5;
@@ -3476,23 +3473,23 @@
  Return the type of notify_info_data.
 /
 
-static int type_of_notify_info_data(uint16 type, uint16 field)
+static uint32 type_of_notify_info_data(uint16 type, uint16 field)
 {
-   int i=0;
+   uint32 i=0;
 
-   for (i = 0; i  sizeof(notify_info_data_table); i++) {
+   for (i = 0; i  (sizeof(notify_info_data_table)/sizeof(struct 
s_notify_info_data_table)); i++) {
if (notify_info_data_table[i].type == type 
notify_info_data_table[i].field == field)
return notify_info_data_table[i].size;
}
 
-   return False;
+   return 0;
 }
 
 /
 /
 
-static int search_notify(uint16 type, uint16 field, int *value)
+static BOOL search_notify(uint16 type, uint16 field, int *value)
 {  
int i;
 
@@ -3521,10 +3518,8 @@
info_data-enc_type = type_of_notify_info_data(type, field);
 
info_data-id = id;
-
 }
 
-
 /***
  *
  * fill a notify_info struct with info asked



svn commit: samba r14355 - in branches/SAMBA_3_0/source/libsmb: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:48:13 + (Mon, 13 Mar 2006)
New Revision: 14355

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14355

Log:
Try and fix Coverity #158 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/smb_signing.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/smb_signing.c
===
--- branches/SAMBA_3_0/source/libsmb/smb_signing.c  2006-03-13 23:07:20 UTC 
(rev 14354)
+++ branches/SAMBA_3_0/source/libsmb/smb_signing.c  2006-03-13 23:48:13 UTC 
(rev 14355)
@@ -426,18 +426,20 @@
 static void simple_free_signing_context(struct smb_sign_info *si)
 {
struct smb_basic_signing_context *data = si-signing_context;
-   struct outstanding_packet_lookup *list = data-outstanding_packet_list;
+   struct outstanding_packet_lookup *list;
+   struct outstanding_packet_lookup *next;

-   while (list) {
-   struct outstanding_packet_lookup *old_head = list;
-   DLIST_REMOVE(list, list);
-   SAFE_FREE(old_head);
+   for (list = data-outstanding_packet_list; list; list = next) {
+   next = list-next;
+   DLIST_REMOVE(data-outstanding_packet_list, list);
+   SAFE_FREE(list);
}
 
data_blob_free(data-mac_key);
 
-   if (data-trans_info)
+   if (data-trans_info) {
SAFE_FREE(data-trans_info);
+   }
 
SAFE_FREE(si-signing_context);
 



svn commit: samba r14357 - in branches/SAMBA_3_0/source/smbd: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:56:02 + (Mon, 13 Mar 2006)
New Revision: 14357

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14357

Log:
Try and fix Coverity #169 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.
 line, and those below, will be ignored--

Msource/smbd/posix_acls.c

Modified:
   branches/SAMBA_3_0/source/smbd/posix_acls.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c
===
--- branches/SAMBA_3_0/source/smbd/posix_acls.c 2006-03-13 23:48:18 UTC (rev 
14356)
+++ branches/SAMBA_3_0/source/smbd/posix_acls.c 2006-03-13 23:56:02 UTC (rev 
14357)
@@ -516,10 +516,12 @@
 
 static void free_canon_ace_list( canon_ace *list_head )
 {
-   while (list_head) {
-   canon_ace *old_head = list_head;
-   DLIST_REMOVE(list_head, list_head);
-   SAFE_FREE(old_head);
+   canon_ace *list, *next;
+
+   for (list = list_head; list; list = next) {
+   next = list-next;
+   DLIST_REMOVE(list_head, list);
+   SAFE_FREE(list);
}
 }
 



svn commit: samba r14358 - in trunk/source/smbd: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:56:08 + (Mon, 13 Mar 2006)
New Revision: 14358

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14358

Log:
Try and fix Coverity #169 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.

Modified:
   trunk/source/smbd/posix_acls.c


Changeset:
Modified: trunk/source/smbd/posix_acls.c
===
--- trunk/source/smbd/posix_acls.c  2006-03-13 23:56:02 UTC (rev 14357)
+++ trunk/source/smbd/posix_acls.c  2006-03-13 23:56:08 UTC (rev 14358)
@@ -516,10 +516,12 @@
 
 static void free_canon_ace_list( canon_ace *list_head )
 {
-   while (list_head) {
-   canon_ace *old_head = list_head;
-   DLIST_REMOVE(list_head, list_head);
-   SAFE_FREE(old_head);
+   canon_ace *list, *next;
+
+   for (list = list_head; list; list = next) {
+   next = list-next;
+   DLIST_REMOVE(list_head, list);
+   SAFE_FREE(list);
}
 }
 



svn commit: samba r14360 - in trunk/source/client: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-13 23:59:03 + (Mon, 13 Mar 2006)
New Revision: 14360

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14360

Log:
Try and fix Coverity #176 by making the pointer
aliasing clearer. This isn't a bug but a code
clarification.
Jeremy.

Modified:
   trunk/source/client/client.c


Changeset:
Modified: trunk/source/client/client.c
===
--- trunk/source/client/client.c2006-03-13 23:58:58 UTC (rev 14359)
+++ trunk/source/client/client.c2006-03-13 23:59:03 UTC (rev 14360)
@@ -1336,15 +1336,15 @@
  Free a file_list structure.
 /
 
-static void free_file_list (struct file_list * list)
+static void free_file_list (struct file_list *list_head)
 {
-   struct file_list *tmp;
+   struct file_list *list, *next;

-   while (list) {
-   tmp = list;
-   DLIST_REMOVE(list, list);
-   SAFE_FREE(tmp-file_path);
-   SAFE_FREE(tmp);
+   for (list = list_head; list; list = next) {
+   next = list-next;
+   DLIST_REMOVE(list_head, list);
+   SAFE_FREE(list-file_path);
+   SAFE_FREE(list);
}
 }
 



svn commit: samba r14361 - in branches/SAMBA_4_0/source: . include librpc/idl pidl/lib/Parse/Pidl pidl/lib/Parse/Pidl/Samba4/NDR

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-14 00:12:58 + (Tue, 14 Mar 2006)
New Revision: 14361

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14361

Log:
Support 'helper' attribute in pidl and use it.
Remove some headers from include/includes.h (they're now only included 
in the file they are used)

Modified:
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl
   branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl
   branches/SAMBA_4_0/source/librpc/idl/nbt.idl
   branches/SAMBA_4_0/source/librpc/idl/security.idl
   branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm


Changeset:
Modified: branches/SAMBA_4_0/source/include/includes.h
===
--- branches/SAMBA_4_0/source/include/includes.h2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/include/includes.h2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -125,14 +125,7 @@
 #include libcli/nbt/libnbt.h
 #include libcli/util/proto.h
 
-/* These headers are used by the NDR parsers. They are globally 
- * included at the moment, but will be included by the autogenerated 
- * NDR parsers later on and removed from here. */
-#include libcli/nbt/nbtname.h
-#include librpc/ndr/ndr_sec.h
-#include librpc/ndr/ndr_drsuapi.h
-#include librpc/ndr/ndr_spoolss_buf.h
-#include librpc/ndr/ndr_krb5pac.h
+/* FIXME: This header should be included by pidl where necessary */
 #include librpc/ndr/ndr_compression.h
 
 #undef _PRINTF_ATTRIBUTE

Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -7,7 +7,8 @@
   authservice(ldap),
   helpstring(Active Directory Replication),
   pointer_default(unique),
-  depends(security)
+  depends(security),
+  helper(librpc/ndr/ndr_drsuapi.h)
 ] 
 interface drsuapi
 {

Modified: branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/librpc/idl/krb5pac.idl2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -7,7 +7,8 @@
 [
   version(0.0),
   pointer_default(unique),
-  depends(security,netlogon)
+  depends(security,netlogon),
+  helper(librpc/ndr/ndr_krb5pac.h)
 ]
 interface krb5pac
 {

Modified: branches/SAMBA_4_0/source/librpc/idl/nbt.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/nbt.idl2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/librpc/idl/nbt.idl2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -9,7 +9,8 @@
 */
 
 [
-  depends(security,svcctl)
+  depends(security,svcctl),
+  helper(libcli/nbt/nbtname.h)
 ] interface nbt
 {
const int NBT_NAME_SERVICE_PORT  = 137;

Modified: branches/SAMBA_4_0/source/librpc/idl/security.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/security.idl   2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/librpc/idl/security.idl   2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -6,7 +6,8 @@
 
 [
pointer_default(unique),
-   depends(misc)
+   depends(misc),
+   helper(librpc/ndr/ndr_sec.h)
 ]
 interface security
 {

Modified: branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/spoolss.idl2006-03-13 23:59:03 UTC 
(rev 14360)
+++ branches/SAMBA_4_0/source/librpc/idl/spoolss.idl2006-03-14 00:12:58 UTC 
(rev 14361)
@@ -10,7 +10,8 @@
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring(Spooler SubSystem),
-  depends(security)
+  depends(security),
+  helper(librpc/ndr/ndr_spoolss_buf.h)
 ] interface spoolss
 {
typedef struct {

Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-03-13 23:59:03 UTC (rev 14360)
+++ branches/SAMBA_4_0/source/main.mk   2006-03-14 00:12:58 UTC (rev 14361)
@@ -236,11 +236,6 @@
param/param.h \
libcli/util/proto.h \
librpc/ndr/ndr_orpc_proto.h \
-   libcli/nbt/nbtname.h \
-   librpc/ndr/ndr_sec.h \
-   librpc/ndr/ndr_drsuapi.h \
-   librpc/ndr/ndr_spoolss_buf.h \
-   librpc/ndr/ndr_krb5pac.h \
librpc/ndr/ndr_compression.h
 
 clean_pch: 

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm

svn commit: samba r14362 - in branches/SAMBA_4_0/source: include librpc/ndr librpc/rpc pidl/lib/Parse/Pidl/Samba4/NDR

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-14 00:37:05 + (Tue, 14 Mar 2006)
New Revision: 14362

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14362

Log:
Only include ndr_compression.h when necessary. 

Modified:
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm


Changeset:
Modified: branches/SAMBA_4_0/source/include/includes.h
===
--- branches/SAMBA_4_0/source/include/includes.h2006-03-14 00:12:58 UTC 
(rev 14361)
+++ branches/SAMBA_4_0/source/include/includes.h2006-03-14 00:37:05 UTC 
(rev 14362)
@@ -125,9 +125,6 @@
 #include libcli/nbt/libnbt.h
 #include libcli/util/proto.h
 
-/* FIXME: This header should be included by pidl where necessary */
-#include librpc/ndr/ndr_compression.h
-
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)
 

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h 2006-03-14 00:12:58 UTC 
(rev 14361)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h 2006-03-14 00:37:05 UTC 
(rev 14362)
@@ -34,6 +34,7 @@
struct SECURITYBINDING **securitybindings;
 };
 
+#include librpc/gen_ndr/orpc.h
 #include librpc/ndr/ndr_orpc_proto.h
 
 #endif /* __NDR_ORPC_H__ */

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
===
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h   2006-03-14 00:12:58 UTC 
(rev 14361)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h   2006-03-14 00:37:05 UTC 
(rev 14362)
@@ -24,6 +24,8 @@
 #ifndef __DCERPC_H__
 #define __DCERPC_H__
 
+#include librpc/gen_ndr/dcerpc.h
+
 enum dcerpc_transport_t {
NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC, NCACN_VNS_SPP, 
NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM, 
NCADG_UNIX_DGRAM,

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2006-03-14 00:12:58 UTC (rev 14361)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2006-03-14 00:37:05 UTC (rev 14362)
@@ -2307,6 +2307,10 @@
 
pidl_hdr ;
 
+   if ($needed-{compression}) {
+   pidl #include \librpc/ndr/ndr_compression.h\;
+   }
+   
HeaderInterface($interface);
 
# Typedefs
@@ -2403,6 +2407,9 @@
 
for my $e (@{$t-{DATA}-{ELEMENTS}}) {
$e-{PARENT} = $t-{DATA};
+   if (has_property($e, compression)) { 
+   $needed-{compression} = 1;
+   }
if ($needed-{pull_$t-{NAME}} and
not defined($needed-{pull_$e-{TYPE}})) {
$needed-{pull_$e-{TYPE}} = 1;



svn commit: samba r14363 - in branches/SAMBA_4_0/source: auth auth/credentials auth/gensec auth/kerberos build/smb_build dsdb/samdb/ldb_modules gtk/common gtk/tools include lib/cmdline lib/samba3 libc

2006-03-13 Thread jelmer
Author: jelmer
Date: 2006-03-14 01:29:56 + (Tue, 14 Mar 2006)
New Revision: 14363

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14363

Log:
Remove credentials.h from the global includes.

Modified:
   branches/SAMBA_4_0/source/auth/credentials/credentials.h
   branches/SAMBA_4_0/source/auth/credentials/credentials_files.c
   branches/SAMBA_4_0/source/auth/credentials/credentials_ntlm.c
   branches/SAMBA_4_0/source/auth/gensec/gensec.h
   branches/SAMBA_4_0/source/auth/kerberos/kerberos.h
   branches/SAMBA_4_0/source/auth/ntlm_check.c
   branches/SAMBA_4_0/source/build/smb_build/TODO
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c
   branches/SAMBA_4_0/source/gtk/common/credentials.c
   branches/SAMBA_4_0/source/gtk/tools/gregedit.c
   branches/SAMBA_4_0/source/gtk/tools/gwcrontab.c
   branches/SAMBA_4_0/source/gtk/tools/gwsam.c
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/lib/cmdline/credentials.c
   branches/SAMBA_4_0/source/lib/samba3/secrets.c
   branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c
   branches/SAMBA_4_0/source/libcli/cliconnect.c
   branches/SAMBA_4_0/source/libcli/smb_composite/connect.c
   branches/SAMBA_4_0/source/libcli/smb_composite/sesssetup.c
   branches/SAMBA_4_0/source/libnet/libnet_join.c
   branches/SAMBA_4_0/source/libnet/libnet_passwd.c
   branches/SAMBA_4_0/source/libnet/libnet_samdump_keytab.c
   branches/SAMBA_4_0/source/libnet/libnet_vampire.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_util.c
   branches/SAMBA_4_0/source/scripting/ejs/ejsnet.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_creds.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rpc.c
   branches/SAMBA_4_0/source/torture/basic/secleak.c
   branches/SAMBA_4_0/source/torture/nbt/dgram.c
   branches/SAMBA_4_0/source/torture/raw/context.c
   branches/SAMBA_4_0/source/torture/rpc/alter_context.c
   branches/SAMBA_4_0/source/torture/rpc/drsuapi.c
   branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c
   branches/SAMBA_4_0/source/torture/rpc/join.c
   branches/SAMBA_4_0/source/torture/rpc/lsa.c
   branches/SAMBA_4_0/source/torture/rpc/samr.c
   branches/SAMBA_4_0/source/torture/rpc/schannel.c
   branches/SAMBA_4_0/source/torture/rpc/session_key.c
   branches/SAMBA_4_0/source/torture/rpc/testjoin.c
   branches/SAMBA_4_0/source/torture/torture.c
   branches/SAMBA_4_0/source/utils/net/net_password.c
   branches/SAMBA_4_0/source/utils/net/net_user.c
   branches/SAMBA_4_0/source/winbind/wb_async_helpers.c
   branches/SAMBA_4_0/source/winbind/wb_init_domain.c
   branches/SAMBA_4_0/source/winbind/wb_pam_auth.c


Changeset:
Sorry, the patch is too large (656 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14363


svn commit: samba r14364 - in branches/SAMBA_4_0/source/lib/ldb/modules: .

2006-03-13 Thread idra
Author: idra
Date: 2006-03-14 05:38:05 + (Tue, 14 Mar 2006)
New Revision: 14364

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14364

Log:
operational - async (untested)
Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/operational.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/operational.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/operational.c 2006-03-14 
01:29:56 UTC (rev 14363)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/operational.c 2006-03-14 
05:38:05 UTC (rev 14364)
@@ -2,6 +2,7 @@
ldb database library
 
Copyright (C) Andrew Tridgell 2005
+   Copyright (C) Simo Sorce 2006
 
  ** NOTE! The following LGPL license applies to the ldb
  ** library. This does NOT imply that all of Samba is released
@@ -380,7 +381,248 @@
return ret;
 }
 
+/*
+  hook search operations
+*/
 
+struct operational_async_context {
+
+   struct ldb_module *module;
+   void *up_context;
+   int (*up_callback)(struct ldb_context *, void *, struct 
ldb_async_result *);
+   int timeout;
+
+   const char * const *attrs;
+};
+
+static int operational_async_callback(struct ldb_context *ldb, void *context, 
struct ldb_async_result *ares) {
+
+   struct operational_async_context *ac;
+
+   if (!context || !ares) {
+   ldb_set_errstring(ldb, talloc_asprintf(ldb, NULL Context or 
Result in callback));
+   goto error;
+   }
+
+   ac = talloc_get_type(context, struct operational_async_context);
+
+   if (ares-type == LDB_REPLY_ENTRY) {
+   /* for each record returned post-process to add any derived
+  attributes that have been asked for */
+   if (operational_search_post_process(ac-module, ares-message, 
ac-attrs) != 0) {
+   goto error;
+   }
+   }
+
+   return ac-up_callback(ldb, ac-up_context, ares);
+
+error:
+   talloc_free(ares);
+   return LDB_ERR_OPERATIONS_ERROR;
+}
+
+static int operational_search_async(struct ldb_module *module, struct 
ldb_request *req)
+{
+   struct operational_async_context *ac;
+   struct ldb_request *down_req;
+   const char **search_attrs = NULL;
+   int i, a, ret;
+
+   req-async.handle = NULL;
+
+   ac = talloc(req, struct operational_async_context);
+   if (ac == NULL) {
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
+   ac-module = module;
+   ac-up_context = req-async.context;
+   ac-up_callback = req-async.callback;
+   ac-timeout = req-async.timeout;
+   ac-attrs = req-op.search.attrs;
+
+   down_req = talloc_zero(req, struct ldb_request);
+   if (down_req == NULL) {
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
+   down_req-operation = req-operation;
+   down_req-op.search.base = req-op.search.base;
+   down_req-op.search.scope = req-op.search.scope;
+   down_req-op.search.tree = req-op.search.tree;
+
+   /*  FIXME: I hink we should copy the tree and keep the original
+*  unmodified. SSS */
+   /* replace any attributes in the parse tree that are
+  searchable, but are stored using a different name in the
+  backend */
+   for (i=0;iARRAY_SIZE(parse_tree_sub);i++) {
+   ldb_parse_tree_attr_replace(req-op.search.tree, 
+   parse_tree_sub[i].attr, 
+   parse_tree_sub[i].replace);
+   }
+
+   /* in the list of attributes we are looking for, rename any
+  attributes to the alias for any hidden attributes that can
+  be fetched directly using non-hidden names */
+   for (a=0;ac-attrs  ac-attrs[a];a++) {
+   for (i=0;iARRAY_SIZE(search_sub);i++) {
+   if (ldb_attr_cmp(ac-attrs[a], search_sub[i].attr) == 0 

+   search_sub[i].replace) {
+   if (!search_attrs) {
+   search_attrs = ldb_attr_list_copy(req, 
ac-attrs);
+   if (search_attrs == NULL) {
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+   }
+   search_attrs[a] = search_sub[i].replace;
+   }
+   }
+   }
+   
+   /* use new set of attrs if any */
+   if (search_attrs) down_req-op.search.attrs = search_attrs;
+   else down_req-op.search.attrs = req-op.search.attrs;
+   
+   down_req-controls = req-controls;
+   down_req-creds = req-creds;
+
+   down_req-async.context = ac;
+   down_req-async.callback = operational_async_callback;
+   down_req-async.timeout = req-async.timeout;
+
+   /* perform the search */
+   ret = 

svn commit: samba r14365 - in branches/SAMBA_3_0/source/nsswitch: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-14 06:22:18 + (Tue, 14 Mar 2006)
New Revision: 14365

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14365

Log:
As solaris nss includes includes.h, make sure we use
the correct malloc-macros.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c2006-03-14 
05:38:05 UTC (rev 14364)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c2006-03-14 
06:22:18 UTC (rev 14365)
@@ -185,7 +185,7 @@
 {
nss_backend_t *be;
   
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = passwd_ops;
@@ -329,7 +329,7 @@
 {
nss_backend_t* be;
 
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = group_ops;
@@ -580,7 +580,7 @@
 {
nss_backend_t* be;
 
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = ops;



svn commit: samba r14366 - in trunk/source/nsswitch: .

2006-03-13 Thread jra
Author: jra
Date: 2006-03-14 06:22:39 + (Tue, 14 Mar 2006)
New Revision: 14366

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=14366

Log:
As solaris nss includes includes.h, make sure we use
the correct malloc-macros.
Jeremy.

Modified:
   trunk/source/nsswitch/winbind_nss_solaris.c


Changeset:
Modified: trunk/source/nsswitch/winbind_nss_solaris.c
===
--- trunk/source/nsswitch/winbind_nss_solaris.c 2006-03-14 06:22:18 UTC (rev 
14365)
+++ trunk/source/nsswitch/winbind_nss_solaris.c 2006-03-14 06:22:39 UTC (rev 
14366)
@@ -185,7 +185,7 @@
 {
nss_backend_t *be;
   
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = passwd_ops;
@@ -329,7 +329,7 @@
 {
nss_backend_t* be;
 
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = group_ops;
@@ -580,7 +580,7 @@
 {
nss_backend_t* be;
 
-   if(!(be = (nss_backend_t*) malloc(sizeof(nss_backend_t))) )
+   if(!(be = SMB_MALLOC_P(nss_backend_t)) )
return NULL;
 
be-ops = ops;