[Samba] samba monitoring

2006-06-19 Thread Warren Beldad

Hi all,

In smbstatus I can view the active connections, PID, client, IP add, date,
etc...
I want to view what files are opened by a specific user? what files are
added or deleted? what if somebody deleted all the files, how can I trace
it?

thanks in advance for any info,
warren
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba keeps locks on files

2006-06-19 Thread schönfeld / in-medias-res
Hi there,

we recently migrated from an old novell server to a samba server with DOS
Clients.
Everything went well and while testing the whole setup everything went okay,
too.

Okay a little about the setup now, so that my explanations can be followed.
The system
consists of a linux client, mainly used as a service gateway, but also
there is a component
installed which is called update-server. Its purpose is to regular check a
specific file on the smbfs
for changes. There are also the already mentioned dos clients which are
faxservers with
special faxcards that need to run under dos. They also access the samba
server and does (but not only)
write entries to the file the update-server checks. The server itself is
Debian GNU/Linux

Well so far, so good. For the first 3 month everything went really well
except some problems
resolving netbios names in the network. But then it occured that the
update-server didn't find
changes in the specific file. A sight in the trace files of the above
mentioned faxservers did show up
permission errors which wouldn't alarm me much, as system is supposed to
work with dos locking and
a locked file results in such a message. But it was to many and everytime
the faxservers tried to
access the same file. Easy to guess: The changes file needed by the update
server. Hmm.. okay i thought
and checked with strace and lsof if the update server helds a lock on the
file. No no. It doesn't. It opens
the file, reads it and another file and closes all files again in a period
of a few ms. But on the samba server
it does show up one or to processes holding locks on a file for more then 2
days, as smbstatus states!
Again: According to strace and lsof that is impossible!

I don't know how i could trace it more, so i would appreciate every hint to
trace the problem down.
Hereafter is the samba configuration file.

Best regards

Patrick Schönfeld

[global]
; Server information
comment = Faccess Fileserver
server string = Faccess Fileserver
netbios name = faccess-fs
log level = 2
; Global configuration
; Elections -
local master = yes
os level = 65
preferred master = yes
domain master = yes
domain logons = no
wins support = yes
log file = /var/log/samba/log.%m

; Workgroup configuration
workgroup = faccess

; Security
security = share
guest only = yes
create mask = 0777
encrypt passwords = false
guest account = root

; Case configuration
case sensitive = no
preserve case = no
default case = lower

; Netlogon
logon script = %m.bat
logon path = /server/netlogon
root preexec = faxlogon %I %m
#root postexec = faxlogoff %m

; File shares
; -
[Faxpub]
path = /server/sys
guest only = yes
guest ok = yes
read only = no
writable = yes

[netlogon]
path = /server/netlogon
public = no
writeable = no
browsable = no

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


[Samba] pdc loosing domain sometimes

2006-06-19 Thread Markus Markert
hi list,

i have a strange problem. sometimes my samba pdc is loosing the domain master 
and a linux workstation with active samba on it gets the domain master 
status. maybee someone of you had the same problem or can help me.



the smb.conf global section of the pdc server


[global]
workgroup = WORKGROUP
netbios name = NETBIOSNAME
server string = SAMBA PDC Server
security = user
passdb backend = ldapsam:ldap://127.0.0.1 ldap://192.168.0.xx;
log level = 1
syslog = 0
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = wins lmhosts hosts bcast
time server = Yes
printcap name = CUPS
printing = cups
printer admin = samba @MY USER GROUP
use sendfile = no
show add printer wizard = yes
encrypt passwords = true
Dos charset = 850
Unix charset = ISO8859-1
local master = yes
os level = 255
domain master = Yes
prefered master = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
domain logons = yes
logon path = \\%L\profiles\%U
logon drive = U:
logon home = \\%L\%U
logon script = %U.bat
wins support = Yes
bind interfaces only = true
interfaces = eth0 127.0.0.1/8 192.168.0.xx/24

# LDAP Parameters deleted, works very well


smb.conf of the global sektion which is collect sometimes the domain master of 
the network
---
[global]
workgroup = WORKGROUP
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
printer admin = samba @MY USER GROUP
username map = /etc/samba/smbusers
map to guest = Bad User
include = /etc/samba/dhcp.conf
security = user
local master = yes
os level = 1


do you think it could be better if i write in the smb.conf`s of the clients, 
domain logons=no and domain master=no, can help me??

hope that someone can help me.

greetings

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


[Samba] smbd: nss_ldap: could not search LDAP server - Can't contact LDAP server and Samba shares are dropped

2006-06-19 Thread David Landgren

List,

I am encountering some really strange behaviour with Samba 3.0.20 and
OpenLDAP 2.2.28. Everything in terms of PAM and NSS has been working
correctly for a long time and have not been changed in months.

This week it has started playing up, with NT_STATUS_LOGON_FAILURE type
errors. The local ldap server is replicated from a master. In syslog,
I see things like

Jun 16 16:06:14 s-sophia smbd: nss_ldap: could not search LDAP server
- Can't contact LDAP server

At this point, the samba shares are no longer available, but LDAP is
not down: I can do a search:

s-sophia:~# ldapsearch -b ou=People,dc=bpinet,dc=com -xh localhost '(uid=xxx)'
# extended LDIF
#
# LDAPv3
# base ou=People,dc=bpinet,dc=com with scope sub
# filter: (uid=xxx)
# requesting: ALL
#

# xxx, Sophia Antipolis, People, bpinet.com
dn: uid=xxx,ou=Sophia Antipolis,ou=People,dc=bpinet,dc=com
cn: xxx
description: xxx
displayName: xxx
gecos: xxx
gidNumber: 513
homeDirectory: /home/xxx
loginShell: /bin/false
sambaHomeDrive: H:
[...stuff deleted...]

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

##

Also, while Samba is out to lunch, I can also see the account via pdbedit:

s-sophia:~# pdbedit -vu xxx
Unix username:xxx
NT username:  xxx
Account Flags:[U  ]
User SID: S-1-5-21-1150874807-1180408084-429402335-13524
Primary Group SID:S-1-5-21-1150874807-1180408084-429402335-513
[...etc etc...]

##

Things run fine for a number of minutes (never the same duration) and
then samba sessions begin to be refused. I've cranked up the openldap
logs, and see that queries continue to be sent and answered:

Jun 16 14:14:33 s-sophia slapd[7077]: conn=37 op=13 SRCH
base=ou=People,dc=bpinet,dc=com scope=2 deref=0
filter=((objectClass=posixAccount)(uidNumber=6739))
Jun 16 14:14:33 s-sophia slapd[7077]: conn=37 op=13 SRCH attr=uid
userPassword uidNumber gidNumber cn homeDirectory loginShell gecos
description objectClass
Jun 16 14:14:33 s-sophia slapd[7077]: conn=37 op=13 SEARCH RESULT
tag=101 err=0 nentries=1 text=

If I stop samba and slapd and restart slapd and samba (in that order),
things start working again. No db_recover, no nothing else. I don't
know what else to look at. Any ideas on how I can zero in on the
underlying cause?

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


Re: [Samba] pdc loosing domain sometimes

2006-06-19 Thread schönfeld / in-medias-res
Hi,

as far as i can see that in your posted configuration you run to smb servers
and
as your configuration file states: Both are configured to be local master.
In that
case each server will regular try to become the master browser, will be
lucky
for a moment, then the other server will become local master again. You
should
disable the local browser = yes on the system, that should not be the local
master.
(Would be the same in a homogene windows network: 2 servers configured as
local
master / PDC will fight each other stetic)

Greets

Patrick Schönfeld
in medias res Gesellschaft für Kommunikationstechnlogien mbH
Dahlenerstr. 570
D-41239 Mönchengladbach

tel. +49 (0) 2166 -  685
fax. +49 (0) 2166 -  800


- Original Message - 
From: Markus Markert
To: samba@lists.samba.org
Sent: Monday, June 19, 2006 10:31 AM
Subject: [Samba] pdc loosing domain sometimes


hi list,

i have a strange problem. sometimes my samba pdc is loosing the domain
master
and a linux workstation with active samba on it gets the domain master
status. maybee someone of you had the same problem or can help me.



the smb.conf global section of the pdc server


[global]
workgroup = WORKGROUP
netbios name = NETBIOSNAME
server string = SAMBA PDC Server
security = user
passdb backend = ldapsam:ldap://127.0.0.1 ldap://192.168.0.xx;
log level = 1
syslog = 0
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = wins lmhosts hosts bcast
time server = Yes
printcap name = CUPS
printing = cups
printer admin = samba @MY USER GROUP
use sendfile = no
show add printer wizard = yes
encrypt passwords = true
Dos charset = 850
Unix charset = ISO8859-1
local master = yes
os level = 255
domain master = Yes
prefered master = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
domain logons = yes
logon path = \\%L\profiles\%U
logon drive = U:
logon home = \\%L\%U
logon script = %U.bat
wins support = Yes
bind interfaces only = true
interfaces = eth0 127.0.0.1/8 192.168.0.xx/24

# LDAP Parameters deleted, works very well


smb.conf of the global sektion which is collect sometimes the domain master
of
the network
---
[global]
workgroup = WORKGROUP
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
printer admin = samba @MY USER GROUP
username map = /etc/samba/smbusers
map to guest = Bad User
include = /etc/samba/dhcp.conf
security = user
local master = yes
os level = 1


do you think it could be better if i write in the smb.conf`s of the clients,
domain logons=no and domain master=no, can help me??

hope that someone can help me.

greetings

markus
-- 
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] pdc loosing domain sometimes

2006-06-19 Thread Markus Markert
ah ok, i will try that, thx.

Am Montag, 19. Juni 2006 10:45 schrieb schönfeld / in-medias-res:
 Hi,

 as far as i can see that in your posted configuration you run to smb
 servers and
 as your configuration file states: Both are configured to be local master.
 In that
 case each server will regular try to become the master browser, will be
 lucky
 for a moment, then the other server will become local master again. You
 should
 disable the local browser = yes on the system, that should not be the local
 master.
 (Would be the same in a homogene windows network: 2 servers configured as
 local
 master / PDC will fight each other stetic)

 Greets

 Patrick Schönfeld
 in medias res Gesellschaft für Kommunikationstechnlogien mbH
 Dahlenerstr. 570
 D-41239 Mönchengladbach

 tel. +49 (0) 2166 -  685
 fax. +49 (0) 2166 -  800


 - Original Message -
 From: Markus Markert
 To: samba@lists.samba.org
 Sent: Monday, June 19, 2006 10:31 AM
 Subject: [Samba] pdc loosing domain sometimes


 hi list,

 i have a strange problem. sometimes my samba pdc is loosing the domain
 master
 and a linux workstation with active samba on it gets the domain master
 status. maybee someone of you had the same problem or can help me.



 the smb.conf global section of the pdc server
 

 [global]
 workgroup = WORKGROUP
 netbios name = NETBIOSNAME
 server string = SAMBA PDC Server
 security = user
 passdb backend = ldapsam:ldap://127.0.0.1 ldap://192.168.0.xx;
 log level = 1
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 50
 name resolve order = wins lmhosts hosts bcast
 time server = Yes
 printcap name = CUPS
 printing = cups
 printer admin = samba @MY USER GROUP
 use sendfile = no
 show add printer wizard = yes
 encrypt passwords = true
 Dos charset = 850
 Unix charset = ISO8859-1
 local master = yes
 os level = 255
 domain master = Yes
 prefered master = Yes
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 domain logons = yes
 logon path = \\%L\profiles\%U
 logon drive = U:
 logon home = \\%L\%U
 logon script = %U.bat
 wins support = Yes
 bind interfaces only = true
 interfaces = eth0 127.0.0.1/8 192.168.0.xx/24

 # LDAP Parameters deleted, works very well
 

 smb.conf of the global sektion which is collect sometimes the domain master
 of
 the network
 ---
 [global]
 workgroup = WORKGROUP
 printing = cups
 printcap name = cups
 printcap cache time = 750
 cups options = raw
 printer admin = samba @MY USER GROUP
 username map = /etc/samba/smbusers
 map to guest = Bad User
 include = /etc/samba/dhcp.conf
 security = user
 local master = yes
 os level = 1
 

 do you think it could be better if i write in the smb.conf`s of the
 clients, domain logons=no and domain master=no, can help me??

 hope that someone can help me.

 greetings

 markus
 --
 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] pdc loosing domain sometimes

2006-06-19 Thread Markus Markert | Suchtreffer AG
ah ok, i will try that, thx.


Am Montag, 19. Juni 2006 10:45 schrieb schönfeld / in-medias-res:
 Hi,

 as far as i can see that in your posted configuration you run to smb
 servers and
 as your configuration file states: Both are configured to be local master.
 In that
 case each server will regular try to become the master browser, will be
 lucky
 for a moment, then the other server will become local master again. You
 should
 disable the local browser = yes on the system, that should not be the local
 master.
 (Would be the same in a homogene windows network: 2 servers configured as
 local
 master / PDC will fight each other stetic)

 Greets

 Patrick Schönfeld
 in medias res Gesellschaft für Kommunikationstechnlogien mbH
 Dahlenerstr. 570
 D-41239 Mönchengladbach

 tel. +49 (0) 2166 -  685
 fax. +49 (0) 2166 -  800


 - Original Message -
 From: Markus Markert
 To: samba@lists.samba.org
 Sent: Monday, June 19, 2006 10:31 AM
 Subject: [Samba] pdc loosing domain sometimes


 hi list,

 i have a strange problem. sometimes my samba pdc is loosing the domain
 master
 and a linux workstation with active samba on it gets the domain master
 status. maybee someone of you had the same problem or can help me.



 the smb.conf global section of the pdc server
 

 [global]
 workgroup = WORKGROUP
 netbios name = NETBIOSNAME
 server string = SAMBA PDC Server
 security = user
 passdb backend = ldapsam:ldap://127.0.0.1 ldap://192.168.0.xx;
 log level = 1
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 50
 name resolve order = wins lmhosts hosts bcast
 time server = Yes
 printcap name = CUPS
 printing = cups
 printer admin = samba @MY USER GROUP
 use sendfile = no
 show add printer wizard = yes
 encrypt passwords = true
 Dos charset = 850
 Unix charset = ISO8859-1
 local master = yes
 os level = 255
 domain master = Yes
 prefered master = Yes
 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
 domain logons = yes
 logon path = \\%L\profiles\%U
 logon drive = U:
 logon home = \\%L\%U
 logon script = %U.bat
 wins support = Yes
 bind interfaces only = true
 interfaces = eth0 127.0.0.1/8 192.168.0.xx/24

 # LDAP Parameters deleted, works very well
 

 smb.conf of the global sektion which is collect sometimes the domain master
 of
 the network
 ---
 [global]
 workgroup = WORKGROUP
 printing = cups
 printcap name = cups
 printcap cache time = 750
 cups options = raw
 printer admin = samba @MY USER GROUP
 username map = /etc/samba/smbusers
 map to guest = Bad User
 include = /etc/samba/dhcp.conf
 security = user
 local master = yes
 os level = 1
 

 do you think it could be better if i write in the smb.conf`s of the
 clients, domain logons=no and domain master=no, can help me??

 hope that someone can help me.

 greetings

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

-- 
_
Suchtreffer AG
Dipl. Inform. (FH) 
Markus Markert
System Engineer
Bleicherstr. 20
D-78467 Konstanz
Germany
fon:   +49-(0)7531-89207-17
fax:   +49-(0)7531-89207-13
e-mail:   [EMAIL PROTECTED]
internet: http://www.suchtreffer.de
__
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Problem joining klient on a BDC

2006-06-19 Thread Ulf Norén
Hi

I have set up a Samba-environment with , at the moment, one PDC and three 
BDC's. LDAP-master at the PDC and slaves  on the BDC's.

I can logon to the domain through whichever DC is choosen but when i try to 
join a machine the PDC MUST be available. The client seems to check among the 
avilable DC's but if the PDC is down it just tells me it can't find a 
domain-controller for the domain. 
If the PDC is up and running it gets selected to process the join.

As I understand it, it should be possible to join a machine via the BDC as 
long as the LDAP-master is available. Correct?

If I configure the BDC with Domain master = yes  it is accepted as a valid 
DC and joining the client works.

The client i have tested with is WinXP SP2.

Anyone have any ideas or corrections?

It's not a major showstopper but for redundancy and load-balancing it would be 
nice to get this working if possible. After all the domaincontrollers reside 
in 4 different cities...

/Ulf

-- 
Ulf Norén
IT-division, Mid Sweden University
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] smbd: nss_ldap: could not search LDAP server - Can't contact LDAP server and Samba shares are dropped

2006-06-19 Thread Michael Cassaniti

Hi,
I Believe that this could be a corrupted secrets.tdb file that may be
losing your ldap password. Please note that this is only a guess. I
really can't offer you too much in the way of help.

Your logs show a search of ldap for a lot of posix account
information. I don't know if that is normal or not, but if it isn't,
then maybe winbind is causing some trouble cause that might be why the
search chases after those attributes. If I'm off track, sorry about
that.

You could also have one of the two of them causing some locking. How
are you doing for space, as in hard drive space?

I really hope someone else is much more helpful than I am.

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


Re: [Samba] smpasswd

2006-06-19 Thread rich

Pierre MARC wrote:

Le ven 16/06/2006 à 17:42, rich a écrit :

/Pierre MARC wrote:
 Le ven 16/06/2006 à 15:04, rich a écrit :

  
 Hi,
 I have just installed samba-3.0.22 and copied my smb.conf across from 
 my previous version on the same machine. With my previous version I 
 never had to run smbpasswd -a username. It would do the 
 authentication from /etc/passwd. ie when I added someone as a user 
 with useradd they would automatically be able to mount samab shares. 
 I am now having to add all my users with smbpasswd.
 I didn't compile the previous version. Could anyone tell me what I 
 need to do to allow authentication from /etc/passwd?


 TIA,
 Rich

 [global]
 workgroup = WORKGROUP
 server string = BLA
 unix password sync = Yes
 log level = 2
 log file = /var/log/samba/samba.log.%m
 max log size = 50
 wins support = Yes
 invalid users = root bin web
 create mask = 0777
 directory mask = 0777
 hosts allow = 192.168.1. localhost

 [homes]
 comment = Home Directories
 path = /userdata/home/%u
 read only = No
 guest ok = Yes
 browseable = No
 



 Try encrypt password = no

   
thanks. unfortunately it didn't make any difference


mount -t cifs -o username=testing //mendel/testing /mnt/testing
ount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/


What was your last samba version ?
And OS ?

Hi,
my OS is Solaris 8 and my version of samba is 2.0.5a

thanks
r


-- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
Semiconductors



  


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


[Samba] (no subject)

2006-06-19 Thread John Halfpenny

hi all.

i've installed samba with samba-vscan. the only way i can get this combination 
to work is to set permissions on the folder to be at least drwx---r-- (or in 
other words, the windows owner has full permissions, groups have none, other 
has read - this lets vscan work).

i also need to serve webpages from within these folders as the apache user, so 
this permission suits that too- 

however, i'm curious as to what the 'other' group refers to in a samba context. 
can anyone explain to me if i've made a security risk in doing this? ie. will 
any windows users other than the owner be able to look in this folder? if it 
simply refers to local nix users being able to read then i'm not concerned 
about that as there aren't any!

tia

john

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


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


Re: [Samba] smbd: nss_ldap: could not search LDAP server - Can't contact LDAP server and Samba shares are dropped

2006-06-19 Thread David Landgren

On 6/19/06, Michael Cassaniti [EMAIL PROTECTED] wrote:

Hi,
I Believe that this could be a corrupted secrets.tdb file that may be
losing your ldap password. Please note that this is only a guess. I
really can't offer you too much in the way of help.


If that were the case, then once it was corrupted, it wouldn't work
after a shutdown and restart, wouldn't it?


Your logs show a search of ldap for a lot of posix account
information. I don't know if that is normal or not, but if it isn't,
then maybe winbind is causing some trouble cause that might be why the
search chases after those attributes. If I'm off track, sorry about
that.


I'm not running winbind. Í'm using NSS to obtain account information.


You could also have one of the two of them causing some locking. How
are you doing for space, as in hard drive space?


No problem with respect to space. How would I see if locking was occurring?


I really hope someone else is much more helpful than I am.


So do I :) But thank-you for taking the time to respond


Good luck!!!
--
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] getpeername failed

2006-06-19 Thread Torsten Geile

Hi,

I am discovering several error messages from one of our samba servers. 
Logcheck says:



Security Events
=-=-=-=-=-=-=-=

getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected

System Events
=-=-=-=-=-=-=
[2006/06/16 08:12:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:24:34, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:40:53, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 08:40:53, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 08:45:55, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 08:45:55, 1] libsmb/cliconnect.c:cli_connect(1330)
...
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:28, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:29, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:29, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:06:22, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:06:23, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:09:59, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:10:00, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:14:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:22:02, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:42:14, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:42:14, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:47:16, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:47:16, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:57:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:02:39, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 10:02:39, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 10:07:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:09:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:09:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:21:44, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:27:56, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:40, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:38:24, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:45:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:45:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:48:52, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:49:06, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 10:49:06, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 10:57:33, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:57:34, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:19:11, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 11:19:11, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 11:21:27, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:21:27, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:21:27, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:32:29, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:32:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:33:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:39:36, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 11:39:36, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 

RE: [Samba] shadowLastChange not updated

2006-06-19 Thread Plant, Dean
Paul-Erik Törrönen wrote:
 Hello,
 
 We have an otherwise working Samba PDC+LDAP setup but for one minor
 detail. The shadowLastChange is not updated when the user sets his
 password from a Windows workstation (all the necessary Samba*-fields
 as well as userPassword is updated in LDAP).
 
 We've enabled 'ldap passwd sync = Yes' in smb.conf.
 
 slapd.conf contains the appropriate access rule for the said field.
 
 The 'passwd' command correctly updates the shadowLastChange-field, but
 enabling the 'unix password sync = yes' leads to the same problems
 reported by mikec a month and a half ago.
 
 We're running CentOS 4.3 with the latest updates as well as
 smbldap-tools from february 2005 by Idealix. Looking through the
 source of the latest versions of these two, I can't find any mention
 of the shadowLastChange field, which leads me to think that this
 still is not touched in any way by either software in their latest
 version (3.0.23 and 0.9.2).
 
 Googling I only found some references to ldapchpasswd but my
 understanding is that this was mainly used by Samba 2.0?
 
 How should the update of shadowLastChange field be handled with Samba
 3.0?

This worked for me.

http://lists.samba.org/archive/samba/2005-June/106335.html

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


Re: [Samba] smpasswd

2006-06-19 Thread Pierre MARC
Le lun 19/06/2006 à 12:46, rich a écrit :

 Pierre MARC wrote:
  Le ven 16/06/2006 à 17:42, rich a écrit :
  /Pierre MARC wrote:
   Le ven 16/06/2006 à 15:04, rich a écrit :
  

   Hi,
   I have just installed samba-3.0.22 and copied my smb.conf across from 
   my previous version on the same machine. With my previous version I 
   never had to run smbpasswd -a username. It would do the 
   authentication from /etc/passwd. ie when I added someone as a user 
   with useradd they would automatically be able to mount samab shares. 
   I am now having to add all my users with smbpasswd.
   I didn't compile the previous version. Could anyone tell me what I 
   need to do to allow authentication from /etc/passwd?
  
   TIA,
   Rich
  
   [global]
   workgroup = WORKGROUP
   server string = BLA
   unix password sync = Yes
   log level = 2
   log file = /var/log/samba/samba.log.%m
   max log size = 50
   wins support = Yes
   invalid users = root bin web
   create mask = 0777
   directory mask = 0777
   hosts allow = 192.168.1. localhost
  
   [homes]
   comment = Home Directories
   path = /userdata/home/%u
   read only = No
   guest ok = Yes
   browseable = No
   
  
  
   Try encrypt password = no
  
 
  thanks. unfortunately it didn't make any difference
 
  mount -t cifs -o username=testing //mendel/testing /mnt/testing
  ount error 13 = Permission denied
  Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/
 
  What was your last samba version ?
  And OS ?
 Hi,
 my OS is Solaris 8 and my version of samba is 2.0.5a
 
 thanks
 r

And If you try to use the smbmount command coming with the 3.0.22
version ?

 
 
  -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
  Semiconductors
 
 


-- 
Pierre MARC [EMAIL PROTECTED]
id3 Semiconductors
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] smpasswd

2006-06-19 Thread rich

Pierre MARC wrote:

Le lun 19/06/2006 à 12:46, rich a écrit :

/Pierre MARC wrote:
 Le ven 16/06/2006 à 17:42, rich a écrit :
 /Pierre MARC wrote:
  Le ven 16/06/2006 à 15:04, rich a écrit :
 
   
  Hi,
  I have just installed samba-3.0.22 and copied my smb.conf across from 
  my previous version on the same machine. With my previous version I 
  never had to run smbpasswd -a username. It would do the 
  authentication from /etc/passwd. ie when I added someone as a user 
  with useradd they would automatically be able to mount samab shares. 
  I am now having to add all my users with smbpasswd.
  I didn't compile the previous version. Could anyone tell me what I 
  need to do to allow authentication from /etc/passwd?

 
  TIA,
  Rich
 
  [global]
  workgroup = WORKGROUP
  server string = BLA
  unix password sync = Yes
  log level = 2
  log file = /var/log/samba/samba.log.%m
  max log size = 50
  wins support = Yes
  invalid users = root bin web
  create mask = 0777
  directory mask = 0777
  hosts allow = 192.168.1. localhost
 
  [homes]
  comment = Home Directories
  path = /userdata/home/%u
  read only = No
  guest ok = Yes
  browseable = No
  
 

 
  Try encrypt password = no
 

 thanks. unfortunately it didn't make any difference


 mount -t cifs -o username=testing //mendel/testing /mnt/testing
 ount error 13 = Permission denied
 Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/

 What was your last samba version ?
 And OS ?
Hi,
my OS is Solaris 8 and my version of samba is 2.0.5a

thanks
r/
And If you try to use the smbmount command coming with the 3.0.22 
version ?
I am trying to mount from a linux box using smbmount that comes with 
fedora core 5.

/

 -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
 Semiconductors



   /
-- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
Semiconductors



  


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


Re: [Samba] smpasswd

2006-06-19 Thread Pierre MARC
Le lun 19/06/2006 à 14:30, rich a écrit :

 Pierre MARC wrote:
  Le lun 19/06/2006 à 12:46, rich a écrit :
  /Pierre MARC wrote:
   Le ven 16/06/2006 à 17:42, rich a écrit :
   /Pierre MARC wrote:
Le ven 16/06/2006 à 15:04, rich a écrit :
   
 
Hi,
I have just installed samba-3.0.22 and copied my smb.conf across 
from 
my previous version on the same machine. With my previous version I 
never had to run smbpasswd -a username. It would do the 
authentication from /etc/passwd. ie when I added someone as a user 
with useradd they would automatically be able to mount samab shares. 
I am now having to add all my users with smbpasswd.
I didn't compile the previous version. Could anyone tell me what I 
need to do to allow authentication from /etc/passwd?
   
TIA,
Rich
   
[global]
workgroup = WORKGROUP
server string = BLA
unix password sync = Yes
log level = 2
log file = /var/log/samba/samba.log.%m
max log size = 50
wins support = Yes
invalid users = root bin web
create mask = 0777
directory mask = 0777
hosts allow = 192.168.1. localhost
   
[homes]
comment = Home Directories
path = /userdata/home/%u
read only = No
guest ok = Yes
browseable = No

   
   
Try encrypt password = no
   
  
   thanks. unfortunately it didn't make any difference
  
   mount -t cifs -o username=testing //mendel/testing /mnt/testing
   ount error 13 = Permission denied
   Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/
  
   What was your last samba version ?
   And OS ?
  Hi,
  my OS is Solaris 8 and my version of samba is 2.0.5a
 
  thanks
  r/
  And If you try to use the smbmount command coming with the 3.0.22 
  version ?
 I am trying to mount from a linux box using smbmount that comes with 
 fedora core 5.
  /
 
   -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
   Semiconductors
  
  
 /
  -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
  Semiconductors
 
 


OK, have you seen somethong wrong in the log.smb from the server or the
client.
If yes, it should be useful to post it.


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


[Samba] speed trouble ...

2006-06-19 Thread Jose Luis Maquieira Taboada

Hi !

In my lan I have some projects with eclipse located in windows at w:
drive; this w: is a samba resource in Debian.

A one file save it takes 4-5 seconds ... its a lot of time than
saving on local hard disk.
I test some tuning options like file system and samba ...

The files are .c and are little files ... a lot of them, gif, .c, .ogg, ...

The FS is EXT3 with News format options on debian instalation (
inodes ) and the same results on an EXT3 with standar format.

I´ve got a P4 with 1gb of ram and Debian Etch today updates ...

The version of the samba installed is 3.0.22-1 and the kernel is the
2.6.15-1-686

My file config is this one

  netbios name = BTEAM-2
  server string = (%L)
  workgroup = LABORATORIO
  encrypt passwords = yes
  hosts allow = 192.168.190. 127.
  os level = 120
  domain master = no
  preferred master = no
  wins support = yes
  name resolve order = hosts wins lmhosts bcast
  remote announce = 192.168.190.255
  remote browse sync = 192.168.190.255
  socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
IPTOS_LOWDELAY
  oplocks = yes
  level2 oplocks = False
  dos filetimes = yes
  dos filemode = yes
  use mmap = yes
  stat cache = Yes
  write cache size = 266144
  large readwrite = yes
  log level = 10
  read raw = yes
  write raw = yes
  dead time = 15
  max xmit = 65535
  getwd cache = yes



[adiaz]
 comment = Carpeta compartida para Alberto
 path = /srv/public/adiaz
 read only = no
 guest ok = yes
 browseable = yes
 writeable = Yes
 user=adiaz



Any better option to update ? ... any how-to to acelerate ? ...

tnx in advance ...

--
SaludOS/2!
MaQui.-)
http://joseluis.maquieira.info
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] speed trouble ...

2006-06-19 Thread Pierre MARC
Le lun 19/06/2006 à 14:49, Jose Luis Maquieira Taboada a écrit :

 Hi !
 
  In my lan I have some projects with eclipse located in windows at w:
 drive; this w: is a samba resource in Debian.
 
  A one file save it takes 4-5 seconds ... its a lot of time than
 saving on local hard disk.
 I test some tuning options like file system and samba ...
 
 The files are .c and are little files ... a lot of them, gif, .c, .ogg, ...
 
 The FS is EXT3 with News format options on debian instalation (
 inodes ) and the same results on an EXT3 with standar format.
 
 I´ve got a P4 with 1gb of ram and Debian Etch today updates ...
 
 The version of the samba installed is 3.0.22-1 and the kernel is the
 2.6.15-1-686
 
 My file config is this one
 
netbios name = BTEAM-2
server string = (%L)
workgroup = LABORATORIO
encrypt passwords = yes
hosts allow = 192.168.190. 127.
os level = 120
domain master = no
preferred master = no
wins support = yes
name resolve order = hosts wins lmhosts bcast
remote announce = 192.168.190.255
remote browse sync = 192.168.190.255
socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
 IPTOS_LOWDELAY
oplocks = yes
level2 oplocks = False
dos filetimes = yes
dos filemode = yes
use mmap = yes
stat cache = Yes
write cache size = 266144
large readwrite = yes
log level = 10
read raw = yes
write raw = yes
dead time = 15
max xmit = 65535
getwd cache = yes
 
 
 
 [adiaz]
   comment = Carpeta compartida para Alberto
   path = /srv/public/adiaz
   read only = no
   guest ok = yes
   browseable = yes
   writeable = Yes
   user=adiaz
 
 
 
  Any better option to update ? ... any how-to to acelerate ? ...
 
 tnx in advance ...
 
 -- 
 SaludOS/2!
 MaQui.-)
 http://joseluis.maquieira.info

The first thing to do is to look at yours samba logfiles.


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


Re: [Samba] smpasswd

2006-06-19 Thread rich

Pierre MARC wrote:

Le lun 19/06/2006 à 14:30, rich a écrit :

/Pierre MARC wrote:
 Le lun 19/06/2006 à 12:46, rich a écrit :
 /Pierre MARC wrote:
  Le ven 16/06/2006 à 17:42, rich a écrit :
  /Pierre MARC wrote:
   Le ven 16/06/2006 à 15:04, rich a écrit :
  

   Hi,
   I have just installed samba-3.0.22 and copied my smb.conf across from 
   my previous version on the same machine. With my previous version I 
   never had to run smbpasswd -a username. It would do the 
   authentication from /etc/passwd. ie when I added someone as a user 
   with useradd they would automatically be able to mount samab shares. 
   I am now having to add all my users with smbpasswd.
   I didn't compile the previous version. Could anyone tell me what I 
   need to do to allow authentication from /etc/passwd?

  
   TIA,
   Rich
  
   [global]
   workgroup = WORKGROUP
   server string = BLA
   unix password sync = Yes
   log level = 2
   log file = /var/log/samba/samba.log.%m
   max log size = 50
   wins support = Yes
   invalid users = root bin web
   create mask = 0777
   directory mask = 0777
   hosts allow = 192.168.1. localhost
  
   [homes]
   comment = Home Directories
   path = /userdata/home/%u
   read only = No
   guest ok = Yes
   browseable = No
   
  

  
   Try encrypt password = no
  
 
  thanks. unfortunately it didn't make any difference

 
  mount -t cifs -o username=testing //mendel/testing /mnt/testing
  ount error 13 = Permission denied
  Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/
 
  What was your last samba version ?
  And OS ?
 Hi,
 my OS is Solaris 8 and my version of samba is 2.0.5a

 thanks
 r/
 And If you try to use the smbmount command coming with the 3.0.22 
 version ?
I am trying to mount from a linux box using smbmount that comes with 
fedora core 5.

 /

  -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
  Semiconductors

 
 
/
 -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 
 Semiconductors



   /
OK, have you seen somethong wrong in the log.smb from the server or 
the client.

If yes, it should be useful to post it.


Hi Pierre,

thanks for the help.

what I was getting in the server logs was:

[2006/06/15 14:05:28, 2] auth/auth.c:check_ntlm_password(317)
 check_ntlm_password:  Authentication for user [richard] - [richard] 
FAILED with error NT_STATUS_NO_SUCH_USER


which of course disappeared when i added the user with smbpasswd -a richard

thanks


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


Re: [Samba] speed trouble ...

2006-06-19 Thread Gerald Drouillard

Jose Luis Maquieira Taboada wrote:

Hi !

In my lan I have some projects with eclipse located in windows at w:
drive; this w: is a samba resource in Debian.

A one file save it takes 4-5 seconds ... its a lot of time than
saving on local hard disk.
I test some tuning options like file system and samba ...

The files are .c and are little files ... a lot of them, gif, .c, .ogg, ...

The FS is EXT3 with News format options on debian instalation (
inodes ) and the same results on an EXT3 with standar format.

I´ve got a P4 with 1gb of ram and Debian Etch today updates ...

The version of the samba installed is 3.0.22-1 and the kernel is the
2.6.15-1-686


Try the following:
   netbios name = BTEAM-2
   server string = (%L)
   workgroup = LABORATORIO
   encrypt passwords = yes
   hosts allow = 192.168.190. 127.
   os level = 120
   domain master = no
   preferred master = no
   wins support = yes
   name resolve order = hosts wins lmhosts bcast
   remote announce = 192.168.190.255
   remote browse sync = 192.168.190.255

socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536 
IPTOS_LOWDELAY

lock spin time = 15
lock spin count = 100
   dos filetimes = yes
   dos filemode = yes
   log level = 1
   getwd cache = yes

[adiaz]
  comment = Carpeta compartida para Alberto
  path = /srv/public/adiaz
  read only = no
  guest ok = yes
  browseable = yes
  writeable = Yes
  user=adiaz



--
Regards
--
Gerald Drouillard
Technology Architect
Drouillard  Associates, Inc.
http://www.Drouillard.ca
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: password change on WinXP

2006-06-19 Thread Logan Shaw

On Sat, 17 Jun 2006, Petteri Larjos wrote:
Thank you Conrad for answering. If I remember correctly the laptop users need 
two accounts (local and remote) even though samba is PDC or one could not 
logon when not connected to LAN. How this is handled?


As I understand it, Windows clients will cache logon information.
So you can logon once while connected to the LAN and thus having
the PDC accessible, then in the future when you are disconnected
from the LAN, you can still logon and the Windows client will
authenticate you using the locally cached authentication info.
Here's a MS knowledge base article about it:

http://support.microsoft.com/kb/q172931/

Now, what I don't know is whether taking advantage of this is
considered a best practice in the Windows world.  For all I know,
the cached information might expire after a week or something, which
could leave someone in a bind if they are away from the LAN for
too long (say, on a business trip).  Anyone have comments about that?

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


[Samba] Filesys::SmbClient kerberos bug?

2006-06-19 Thread David Dorsey

I'm trying to use Filesys::SmbClient to connect to a windows share using
kerberos to authenticate, however, I get a permission denied error.  I've
tried this on a FC5 with samba 3.0.22 and on Solaris 9 with samba 3.0.22 and
3.0.23rc2.  Using kerberos with the command smbclient works however.  If I
specify a password, I can connect; however, I need to use kerberos.
Since the smbclient command works with kerberos, it seems to be a problem
with Filesys::SmbClient.  I've included my script just in case I'm doing
some completely wrong

use POSIX;
use Filesys::SmbClient;
use strict;

my $smb = new Filesys::SmbClient(
 username = ,
 workgroup = ,
 flags = SMB_CTX_FLAG_USE_KERBEROS | SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS,
 debug = 10
);

my $fd = $smb-opendir(smb://machine/share);
if($fd == 0)
{
 print Could not open directory: $!\n;
 exit;
}
foreach my $n($smb-readdir($fd))
{
 print $n, \n;
}

Thanks,


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


[Samba] file permissions

2006-06-19 Thread John Halfpenny

hi all.

apologies for the double post, i omitted the subject line (doh!)

i've installed samba with samba-vscan. the only way i can get this combination 
to work is to set permissions on the folder to be at least drwx---r-- (or in 
other words, the windows owner has full permissions, groups have none, other 
has read - this lets vscan work).

i also need to serve webpages from within these folders as the apache user, so 
this permission suits that too- 

however, i'm curious as to what the 'other' group refers to in a samba context. 
can anyone explain to me if i've made a security risk in doing this? ie. will 
any windows users other than the owner be able to look in this folder? if it 
simply refers to local nix users being able to read then i'm not concerned 
about that as there aren't any!

tia

john


___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


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


[Samba] wins vs. browsing, and documentation

2006-06-19 Thread Logan Shaw

I've been reading Chapter 9 (Network Browsing) of the Official
Samba-3 HOWTO and Reference Guide, and the documentation is
causing me some confusion.

Up at the very top of the chapter, it says:

WINS is the best tool for resolution of NetBIOS names to
IP addresses; however, WINS is not involved in browse list
handling except by way of name-to-address resolution.

But then there is a whole section in this chapter called WINS:
The Windows Internetworking Name Server.  If the two aren't
related[1], then why is WINS covered in the browsing chapter?
Is this just a quirk of the way the documentation is laid out,
or does it imply there is a closer connection between browsing
and WINS?

I think it is the former, but it gets a little confusing,
particularly when the same chapter is discussing two different
types of synchronization:  synchronization between LMBs and DMBs
(which Samba *does* support -- I think) and also discussing
synchronization of data between WINS servers (which Samba does
*not* support).

  - Logan

[1] except that browse servers use WINS name services to
find each other, but then lots of other things use WINS
to find each other, so that's hardly a special situation.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Printing from Windows over samba

2006-06-19 Thread malcolm
I have the following problem printing from Windoze with the Brother DCP 7010. 

The printer is local on a Linux box running under SuSE 10.0. The printer is 
running under CUPS with the drivers downloaded from Brother. For Windows I 
have set up a raw device which is accessed over samba.

When I print from windows, which I can from various situations --- i.e. 
Firefox, Excel, etc, printing is very slow (up to 2 minutes).

But I cannot print at all from WinWord. A message box appears saying that the 
printer is not available, and suggests I should see whether the printer is 
switched on. 

Anybody there with a suggestion?

Malcolm

Malcolm Agnew
eMail: [EMAIL PROTECTED]
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Stange printer driver problem

2006-06-19 Thread Nicki Messerschmidt, Linksystem Muenchen GmbH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
I have a strange problem with samba (3.0.23), cups (1.2.1), windows 2k
(all patches up2date) and the printer drivers (cups 5, cups 6).
I setup samba to share the printers configured in cups and added the
printer admin privilege to some users.
Now I can upload the printer drivers using cupsaddsmb. This works
without any problems.
Even my Windows 2k clients connect without any problems. But...
But when I try to access the settings panel of any of my printers
windows asks me to install new drivers.
The error message is (translated from the german message):
The device settings cannot be displayed. The driver for this driver is
not installed. Only spooling preferences are displayed. Do you want to
install the driver now?

I checked everything I know about this field (I already have about 10
similar settings all working fine (using samba 3.0.14 and cups 1.1.21).
But now I'm out of ideas on how to go on.

Does anyone out there have a hint on where to look?


Cheers
Nicki


Here my smb.conf (relevant parts):
[global]
   netbios name = amonre
   netbios aliases = sphinx sphinx2
   os level = 65
   workgroup = Link-M
   server string = Linuxserver (Samba %v)
   announce as = NT Samba Server
   announce version = 4.0
   domain master = yes
   domain logons = yes
   local master = true
   preferred master = yes
   guest account = nobody
   security = user
   encrypt passwords = true

   passdb backend = tdbsam guest
   enable privileges = yes

   printing = cups
   printcap name = /etc/printcap.cups
   load printers = yes

   use sendfile = no
   lock spin time = 15
   lock spin count = 100
   oplocks = no
   level2 oplocks = no
   name resolve order = host wins bcast
   dns proxy = yes

   preserve case = yes
   short preserve case = yes
   unix password sync = true
   hide files = /desktop.ini/Desktop.ini/
   csc policy = disable

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   guest ok = no
   write list = root,@lpadmin
   force create mode = 4660
   force directory mode = 4770
   force group = lpadmin

[printers]
   comment = Netzwerk Drucker
   browseable = no
   path = /var/spool/sambaspool
   printable = yes
   writable = no
   create mode = 0700
   write list = @lpadmin,@root
   guest ok = no

- --
Linksystem Muenchen GmbH  [EMAIL PROTECTED]
Schloerstrasse 10   http://www.link-m.de
80634 Muenchen  Tel. 089 / 890 518-0
We make the Net work.   Fax 089 / 890 518-77
PGP Keys: https://www.link-m.de/pgp/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)
Comment: Get keys at: https://www.link-m.de/pgp

iD8DBQFElt8j6zWc+bXuIEMRAnIoAJ9y0QNapB6yW7B32bw0Vgde3w2HUwCgnS7s
dYC5ZLKuZ+z79XYIa1kbshA=
=0ZoE
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Slightly OT: Browsing issues with Windows 2003 Server, Win 2K server and Windows 2000 clients

2006-06-19 Thread Stephen Bosch

Hi, everybody:

Forgive me for bringing this to you. We normally use Samba servers but 
are dealing with a situation involving two Windows 2003 servers and 
browsing, and the truth is, I can't think of a better forum to bring 
questions about browsing.


We have the following situation:

Domain controller is a Windows 2000 machine at 192.168.0.100
The backup domain controller is a Windows 2003 machine at 192.168.0.150

There are two subnets connected by a VPN tunnel.

192.168.0.0/24
10.10.20.0/24

The machines in one subnet cannot see machines in the other subnet.

We are using WINS on the backup controller at 192.168.0.150. This 
machine is also the Active Directory DNS server.


I have configured machines on 10.10.20.0 to use 192.168.0.150 as WINS
server and a couple of the machines on 192.168.0.0 to use
192.168.0.150 as the WINS server, but it doesn't matter with the 
machines are registering to WINS or not; if they are on the remote 
subnet they are invisible.


When I use the NETBIOS Browsing Console on a machine on 10.10.20.0, it
pukes immediately saying that the Domain Master Browser for the 
specified domain could not be found.


When I use the NetBIOS Browsing Console on a machine on 192.168.0.0,
it completes successfully but tells me that it cannot find a machine 
on 192.168.0.0 in the browse list of a machine on 10.10.20.0.


Traffic flows freely between the two networks. I can ping the PDC and 
BDC from the remote subnet (10.10.20.0/24).


What have I missed here? Where do I need to be looking? The lack of 
cross-subnet browsing is interfering with some printing functions.


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


Re: [Samba] Slightly OT: Browsing issues with Windows 2003 Server, Win 2K server and Windows 2000 clients

2006-06-19 Thread Edmundo Valle Neto

Stephen Bosch escreveu:

Hi, everybody:

Forgive me for bringing this to you. We normally use Samba servers but 
are dealing with a situation involving two Windows 2003 servers and 
browsing, and the truth is, I can't think of a better forum to bring 
questions about browsing.


We have the following situation:

Domain controller is a Windows 2000 machine at 192.168.0.100
The backup domain controller is a Windows 2003 machine at 192.168.0.150

There are two subnets connected by a VPN tunnel.

192.168.0.0/24
10.10.20.0/24

The machines in one subnet cannot see machines in the other subnet.
That I know WINS only resolve IPs to netbios names it is not responsible 
for browsing, but it registers with the names the record types of the 
machines that it knows about (this is part of netbios), answering who 
acts as what in the network (in that case, who is the LMB and has the 
browse list). The machine that holds the list of available machines of 
its network segment is the Local Master Browser of that segment.


Theres a chapter in TOSHARG called Network Browsing showing an example 
of a routed network using WINS.




We are using WINS on the backup controller at 192.168.0.150. This 
machine is also the Active Directory DNS server.


I have configured machines on 10.10.20.0 to use 192.168.0.150 as WINS
server and a couple of the machines on 192.168.0.0 to use
192.168.0.150 as the WINS server, but it doesn't matter with the 
machines are registering to WINS or not; if they are on the remote 
subnet they are invisible.


Configured machines in one subnet and a couple of machines in another?
Hmm. A network with a half of machines using WINS and a half not can 
show that behavior.


The Local Master Browsers in each segment of the domain search for a 
Domain Master Browser and ask to sync the lists. Have you sure that the 
machines that are acting as LMBs in each segment are doing this? That 
they can find the DMB and ask to sync the browse list? Maybe one of them 
isnt doing that, maybe you excluded an LMB of using the WINS server and 
its not finding the DMB?


When I use the NETBIOS Browsing Console on a machine on 10.10.20.0, it
pukes immediately saying that the Domain Master Browser for the 
specified domain could not be found.
As above, is that machine using WINS and the WINS server knows who is 
the DMB?


When I use the NetBIOS Browsing Console on a machine on 192.168.0.0,
it completes successfully but tells me that it cannot find a machine 
on 192.168.0.0 in the browse list of a machine on 10.10.20.0.


Traffic flows freely between the two networks. I can ping the PDC and 
BDC from the remote subnet (10.10.20.0/24).


What have I missed here? Where do I need to be looking? The lack of 
cross-subnet browsing is interfering with some printing functions.


-Stephen-

Regards.

Edmundo Valle Neto.


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


[Samba] Mommy, where do RIDs come from?

2006-06-19 Thread Logan Shaw

Hey everyone,

I'm preparing for a transition in which I'll be moving
everything (PDC, WINS server, big file shares) off an old
Linux server running Samba 2.2.7 onto a much newer Linux system
running Samba 3.0.22.

In the process, I'll be switching from smbpasswd (only thing
supported under Samba 2.x, if I understand correctly) to
ldapsam on Samba 3.x.

I want to keep the same domain name and preserve SIDs for users
and machine accounts (and the domain) so that clients can just
start using the new PDC without disruption (except possible
reboot, which is OK), so my plan is to populate the password
database on the new server with the exact same usernames and
SIDs and hashes that are in use on the old server.  (I may
clean up the UIDs, though.)

However, I've noticed something odd:  /etc/samba/smbpasswd
on 2.2.7 doesn't contain any RIDs or SIDs.  And yet, if I run
rpcclient and do lookupnames lshaw against the 2.x server,
I can see that my (lshaw's) SID is formed of the domain SID
plus some RID that comes from somewhere.  But, *where* is
that RID coming from?  I presume it is some sort of persistent
mapping, but what stores it?  It's not in smbpasswd, because
it doesn't contain RIDs (only UIDs).  It doesn't seem to be
in any of the files /var/cache/samba/*.tdb either, but I could
be missing something.

I suppose since I can use rpcclient to get the correct SID,
this is partly just a matter of curiousity, but I think I'd
feel better if I knew what was really going on...

Also, as long as I'm asking questions, can anyone spot holes
in my idea of swapping out the PDC with a new one that has
identical data?  It seems like as long as the data is identical,
the clients should be able to transition over with no problems.
It'd be just like a client switching from a PDC to a BDC, right?

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


[Samba] getpeername failed

2006-06-19 Thread Torsten Geile

Hi,

I am discovering several error messages from one of our samba servers. 
Logcheck says:



Security Events
=-=-=-=-=-=-=-=

getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected
getpeername failed. Error was Transport endpoint is not connected

System Events
=-=-=-=-=-=-=
[2006/06/16 08:12:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:12:38, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:24:34, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:36:31, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:40:53, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 08:40:53, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 08:45:55, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 08:45:55, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 08:48:27, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:48:27, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:48:28, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:51:12, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:51:13, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:51:13, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:51:13, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:51:13, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:53:45, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:53:45, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 08:59:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:28, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:29, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:04:29, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:06:22, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:06:23, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:09:59, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:10:00, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:14:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:22:02, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:33:58, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:42:14, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:42:14, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:45:54, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 09:47:16, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 09:47:16, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 09:57:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:02:39, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 10:02:39, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 10:07:01, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:09:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:09:47, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:21:44, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:27:56, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:40, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:33:41, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:38:24, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:45:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:45:37, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:48:52, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:49:06, 1] lib/util_sock.c:open_socket_out(774)
[2006/06/16 10:49:06, 1] libsmb/cliconnect.c:cli_connect(1330)
[2006/06/16 10:57:33, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 10:57:34, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:09:30, 0] lib/util_sock.c:get_peer_addr(1150)
[2006/06/16 11:19:11, 1] 

[Samba] Snap server can't resolve master browser

2006-06-19 Thread WHanchett
Did you ever figure this out i know this post is old but im having the 
same problems with my 4100, I am unable to get it on domain MS2003. any 
help would be appreciated 

thanks

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


[Samba] Hard Solaris 8 compile

2006-06-19 Thread Bruce W Lundberg

We currently have a samba install on Solaris 8 providing a front-end to a
Rational ClearCase system. Because of some recent changes, we are having
Kerberose issues in validating files (too many open files). After some research,
I found that the best way to resolve these is to re-compile samba as a 64bit
application to increase the open file restrictions on a Solaris 32 bit app.

The problem I am having is this:

I cannot get the 64bit compile to work properly under Solaris 8 (it seems to
revolve around the 32 bit ld commmand in /usr/ccs/bin. Since I am compiling from
the ground up w/ AD support, there's a lot of things going on.

The errors I run into are very consistant

ld consistantly fails w/


ld: fatal: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to...

In various of the supporting libraries

I've tried using the 64 bit ld in /usr/ccs/bin/sparcv9/
Built a GNU ld (I had problems w/ gcc -m64 there also). I've gotten some thing
working by logical links to both the GNU and sparcv9 ld commands, however
whenever a shared library (*.so) is actually built, it still comes out as a 32
bit ELF file even though all the object files are 64 bit ELF formats

I have gcc v3.4.2 from Sun Freeware and have noticed that is was compiled using
the 32 bit ld  (/usr/ccs/bin/ld) and am going to try to re-compile gcc using the
64 bit ld (/usr/ccs/bin/sparcv9/ld)


If anyone has been through this wringer, I'd appreciate a place to look to get
going again, and maybe some pointers of what I'm missing in this process.

pertinent environment varibles:

gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.4.2


CFLAGS=-mcpu=v9 -mv8plus -m64 -pthreads

CPPFLAGS=-I/usr/local/include -I/usr/local/BerkeleyDB.4.2/include
-I/usr/local/ssl/include

LDFLAGS=-L/usr/local/lib/sparcv9 -L/usr/lib/sparcv9 -L/usr/local/lib
-L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/lib

LD_LIBRARY_PATH=/usr/local/lib/sparcv9:/usr/lib/sparv9:/usr/local/ssl/lib:/usr/sfw/lib:/usr/lib:/usr/local/BerkeleyDB.4.2/lib

TIA

Bruce Lundberg
Sr. Unix Systems Administrator

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


[Samba] disable BDC-functionality

2006-06-19 Thread Detlef Jockheck
Hi!

I have some domains with thrusting between. My primary domain is CAD. For 
this domain I have a windows NT PDC. Now I enable Samba nmbd on my SLES9-Box 
to make sure that the machine is accessible by name. It has been configured 
as BDC before, but this was not a good idea because I have multiple domains 
with trusting. This feature should be disabled.
When samba is running on the SLES9 the NT-PDC seems to disable his 
PDC-facilities because no further Logons in CAD are possible.
The only way to fix this is to disable Samba on SLES9 and reboot the PDC.
I would like to use samba, but not configured as BDC. How can this be managed.

regards
Detlef
-- 
# Detlef Jockheck
# [EMAIL PROTECTED]


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

[Samba] svn and samba - make file writable problems

2006-06-19 Thread Tom Haerens
Hi,

A couple of weeks ago, we moved from a Samba 2.2x to a 3.0.x server.
Everything works fine, except our svn.

SVN is not able to make a file writable. 
However, we can change the read-only flag manually on a Windows XP client.

When we try to lock a file with TurtoiseSVN, we get the following error
Error: Can't get default file perms for file at 
'//sambaserver/mweb/Sites/svntest2/x.pbl' (file stat error): Access is 
denied. 

I think it's a samba problem, because we didn't have these problems on the 
old samba server and we don't have them on a Windows share.

The smb.conf looks like this for the milesweb share:

[mweb]
   comment = Milesweb Folder
   path = /x/MILESWEB
   write list = @MILESWEB
   force user = pvcswi
   force group = MILESWEB
   create mask = 0775
   writeable = yes


Can somebody helps us out?

Thank you very much!!


Kind Regards,
Tom

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


[Samba] 3.0.23 + afsacl build problem

2006-06-19 Thread Greszler Szilárd

Hi!

I've tried to compile samba 3.0.23rc2 --with-vfs-afsacl --fake-kaserver, 
but I've got errors.


The first error and its solution is: I've to add -lssl to the LIBS line 
in the top level Makefile.


Then I've got this:

Compiling modules/vfs_afsacl.c with -fPIC
modules/vfs_afsacl.c: In function `new_afs_ace':
modules/vfs_afsacl.c:145: warning: passing arg 2 of `lookup_sid' from 
incompatible pointer type
modules/vfs_afsacl.c:145: warning: passing arg 3 of `lookup_sid' from 
incompatible pointer type
modules/vfs_afsacl.c:145: warning: passing arg 4 of `lookup_sid' from 
incompatible pointer type

modules/vfs_afsacl.c:145: error: too few arguments to function `lookup_sid'
modules/vfs_afsacl.c:153: warning: passing arg 2 of `strchr_m' makes 
integer from pointer without a cast
modules/vfs_afsacl.c:158: error: `LOOKUP_NAME_FULL' undeclared (first 
use in this function)
modules/vfs_afsacl.c:158: error: (Each undeclared identifier is reported 
only once

modules/vfs_afsacl.c:158: error: for each function it appears in.)
modules/vfs_afsacl.c:159: warning: passing arg 1 of `lookup_name' 
discards qualifiers from pointer target type
modules/vfs_afsacl.c:159: warning: passing arg 3 of `lookup_name' makes 
integer from pointer without a cast
modules/vfs_afsacl.c:159: warning: passing arg 4 of `lookup_name' from 
incompatible pointer type
modules/vfs_afsacl.c:159: warning: passing arg 5 of `lookup_name' from 
incompatible pointer type
modules/vfs_afsacl.c:159: warning: passing arg 6 of `lookup_name' from 
incompatible pointer type

modules/vfs_afsacl.c:159: error: too few arguments to function `lookup_name'
modules/vfs_afsacl.c: In function `nt_to_afs_acl':
modules/vfs_afsacl.c:754: warning: passing arg 2 of `lookup_sid' from 
incompatible pointer type
modules/vfs_afsacl.c:754: warning: passing arg 3 of `lookup_sid' from 
incompatible pointer type
modules/vfs_afsacl.c:754: warning: passing arg 4 of `lookup_sid' from 
incompatible pointer type

modules/vfs_afsacl.c:754: error: too few arguments to function `lookup_sid'
modules/vfs_afsacl.c: In function `afsacl_connect':
modules/vfs_afsacl.c:1012: warning: assignment discards qualifiers from 
pointer target type

make: *** [modules/vfs_afsacl.po] Error 1

Then I added to lookup_sid in line 145 and to lookup_name in line 159 
the mem_ctx argument, and changed LOOKUP_NAME_FULL to LOOKUP_NAME_ALL.


Now I should add the mystic mem_ctx argument in line 754, but it's not 
defined in this (nt_to_afs_acl) function, so I've stucked.
I've tried to pass a NULL instead of it to check for further build 
problems, but it has been compiled. (And made funny things with acls, if 
you tried to change them :) )


So the question is, how can I get a mem_ctx variable in that function, 
where can I learn more about mem_ctx, because now I don't know what is it.
The other purpose of this mail is to inform you about these problems. I 
hope this is the right place for it, and I can see the solution for 
these problems in the final 3.0.23 at least, if I can't get over this 
problem with your help.


Thanks for any help in advance!

Szilard


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


[Samba] inital access need some seconds - kerberos(?) error in log - 3.0.22-1 Debian

2006-06-19 Thread Steffen Kolbe

Systems:
- Win2003R2 Domain Controller
- Debian AMD64 with Samba 3.0.22-1 as ADS member; Users via nssldap / 
pam_krb5; MIT-Kerberos 1.4.3-7


On Win2003SP1 Terminalserver (ADS member, machine name: TS ; domain VW) 
with shares from Samba (see above) the access to these shares needs very 
often some seconds (sometime time out) for open folders/files. This 
occurs @ inital file/folder opening, sometime also if the file is opened 
- but it's working in general.



In Samba log I found:

[2006/06/19 16:52:01, 1] smbd/sesssetup.c:reply_spnego_kerberos(303)
 Username VW\TS$ is invalid on this system

Any ideas?

Steffen
---
my smb.conf:
[global]
   workgroup = VW
   realm = VW.x
   security = ADS
   log level = 1
   syslog = 0
   log file = /var/log/samba/log.%m
   socket options = TCP_NODELAY
   max log size = 1000
   os level = 20
   preferred master = No
   local master = No
   admin users = Administrator root
   hosts allow = xx
   interfaces = eth2:0
   bind interfaces only = yes
   netbios name = SMB
   server string = SMB - FILE SERVER
   hide files = /desktop.ini/
   csc policy = disable
   load printers = yes
   printing = cups
   printcap = cups

[printers]
   comment = all printers
   path = /var/spool/samba
   browsable = yes
   public = yes
   guest ok = yes
   writable = yes
   printable = yes
   printer admin = root, Administrator, X

[print$]
   comment = printer drivers
   path = /etc/samba/drivers
   browsable =yes
   guest ok = yes
   writable = yes
   write list = root, Administrator, xx

## shares
[home]
   comment = home directories all users (700)
   path = /home
   read only = No
   browseable = Yes
   create mask = 0700
   directory mask = 0711
   root preexec = /etc/samba/scripts/mk_samba_homedir -h %u %g
  .
  .


my krb5.conf:
[libdefaults]
   default_realm = VW.X
   clockskew = 300
   dns_lookup_kdc = true
   default_keytab_name = FILE:/etc/krb5.keytab
   default_tgs_enctypes = des-cbc-md5 des-cbc-crc arcfour-hmac-md5
   default_tkt_enctypes = des-cbc-md5 des-cbc-crc arcfour-hmac-md5
   permitted_enctypes = des-cbc-md5 des-cbc-crc arcfour-hmac-md5
   kdc_timeout = 1500
   max_retries = 2
[domain_realm]
   vw.vkw.tu-dresden.de = VW.XXX
   .vw.vkw.tu-dresden.de = VW.XXX
[logging]
   default = FILE:/var/log/krb5libs.lo



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


svn commit: samba r16343 - in branches/tmp/vl-posixacls: packaging/RHEL packaging/RHEL/setup packaging/RedHat-9 source source/auth source/client source/include source/lib source/libads source/libsmb s

2006-06-19 Thread vlendec
Author: vlendec
Date: 2006-06-19 07:46:35 + (Mon, 19 Jun 2006)
New Revision: 16343

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

Log:
svn merge -r15636:16342 /branches/SAMBA_3_0
Added:
   branches/tmp/vl-posixacls/source/lib/timegm.c
   branches/tmp/vl-posixacls/source/libads/ldap_schema.c
   branches/tmp/vl-posixacls/source/sam/nss_info.c
   branches/tmp/vl-posixacls/source/script/tests/tests_smbclient_s3.sh
   branches/tmp/vl-posixacls/source/utils/net_domain.c
Modified:
   branches/tmp/vl-posixacls/packaging/RHEL/samba.spec.tmpl
   branches/tmp/vl-posixacls/packaging/RHEL/setup/filter-requires-samba.sh
   branches/tmp/vl-posixacls/packaging/RedHat-9/filter-requires-samba_rh8.sh
   branches/tmp/vl-posixacls/packaging/RedHat-9/filter-requires-samba_rh9.sh
   branches/tmp/vl-posixacls/packaging/RedHat-9/samba.spec.tmpl
   branches/tmp/vl-posixacls/source/Makefile.in
   branches/tmp/vl-posixacls/source/VERSION
   branches/tmp/vl-posixacls/source/aclocal.m4
   branches/tmp/vl-posixacls/source/auth/auth_domain.c
   branches/tmp/vl-posixacls/source/auth/auth_sam.c
   branches/tmp/vl-posixacls/source/auth/auth_util.c
   branches/tmp/vl-posixacls/source/auth/pass_check.c
   branches/tmp/vl-posixacls/source/client/client.c
   branches/tmp/vl-posixacls/source/client/clitar.c
   branches/tmp/vl-posixacls/source/client/smbctool.c
   branches/tmp/vl-posixacls/source/configure.in
   branches/tmp/vl-posixacls/source/dynconfig.c
   branches/tmp/vl-posixacls/source/include/ads.h
   branches/tmp/vl-posixacls/source/include/dynconfig.h
   branches/tmp/vl-posixacls/source/include/includes.h
   branches/tmp/vl-posixacls/source/include/popt_common.h
   branches/tmp/vl-posixacls/source/include/rpc_samr.h
   branches/tmp/vl-posixacls/source/include/smb.h
   branches/tmp/vl-posixacls/source/include/smbldap.h
   branches/tmp/vl-posixacls/source/include/talloc.h
   branches/tmp/vl-posixacls/source/lib/gencache.c
   branches/tmp/vl-posixacls/source/lib/getsmbpass.c
   branches/tmp/vl-posixacls/source/lib/ldap_escape.c
   branches/tmp/vl-posixacls/source/lib/module.c
   branches/tmp/vl-posixacls/source/lib/popt_common.c
   branches/tmp/vl-posixacls/source/lib/readline.c
   branches/tmp/vl-posixacls/source/lib/replace.c
   branches/tmp/vl-posixacls/source/lib/smbldap.c
   branches/tmp/vl-posixacls/source/lib/talloc.c
   branches/tmp/vl-posixacls/source/lib/time.c
   branches/tmp/vl-posixacls/source/lib/util_sock.c
   branches/tmp/vl-posixacls/source/lib/xfile.c
   branches/tmp/vl-posixacls/source/libads/ads_struct.c
   branches/tmp/vl-posixacls/source/libads/kerberos.c
   branches/tmp/vl-posixacls/source/libads/krb5_setpw.c
   branches/tmp/vl-posixacls/source/libads/ldap.c
   branches/tmp/vl-posixacls/source/libads/ldap_printer.c
   branches/tmp/vl-posixacls/source/libads/ldap_utils.c
   branches/tmp/vl-posixacls/source/libads/util.c
   branches/tmp/vl-posixacls/source/libsmb/asn1.c
   branches/tmp/vl-posixacls/source/libsmb/cliconnect.c
   branches/tmp/vl-posixacls/source/libsmb/clidfs.c
   branches/tmp/vl-posixacls/source/libsmb/clikrb5.c
   branches/tmp/vl-posixacls/source/libsmb/clilist.c
   branches/tmp/vl-posixacls/source/libsmb/clispnego.c
   branches/tmp/vl-posixacls/source/libsmb/libsmbclient.c
   branches/tmp/vl-posixacls/source/locking/locking.c
   branches/tmp/vl-posixacls/source/locking/posix.c
   branches/tmp/vl-posixacls/source/modules/vfs_full_audit.c
   branches/tmp/vl-posixacls/source/modules/vfs_recycle.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_become_dmb.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_namelistdb.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_responserecordsdb.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_serverlistdb.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_subnetdb.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_winsserver.c
   branches/tmp/vl-posixacls/source/nmbd/nmbd_workgroupdb.c
   branches/tmp/vl-posixacls/source/nsswitch/pam_winbind.c
   branches/tmp/vl-posixacls/source/nsswitch/wbinfo.c
   branches/tmp/vl-posixacls/source/nsswitch/winbind_nss_aix.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_ads.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_cache.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_cm.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_group.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_nss.h
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_pam.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_passdb.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_rpc.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_user.c
   branches/tmp/vl-posixacls/source/nsswitch/winbindd_util.c
   branches/tmp/vl-posixacls/source/pam_smbpass/pam_smb_acct.c
   branches/tmp/vl-posixacls/source/pam_smbpass/pam_smb_auth.c
   branches/tmp/vl-posixacls/source/param/loadparm.c
   

svn commit: samba r16344 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-06-19 Thread gd
Author: gd
Date: 2006-06-19 09:54:00 + (Mon, 19 Jun 2006)
New Revision: 16344

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

Log:
Allow to set passwords directly when creating users via net rpc user
add (as the documentation says, and currently onle net ads user add
did). Fixes #3843.

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_help.c
   branches/SAMBA_3_0/source/utils/net_rpc.c
   trunk/source/utils/net_help.c
   trunk/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_help.c
===
--- branches/SAMBA_3_0/source/utils/net_help.c  2006-06-19 07:46:35 UTC (rev 
16343)
+++ branches/SAMBA_3_0/source/utils/net_help.c  2006-06-19 09:54:00 UTC (rev 
16344)
@@ -73,7 +73,7 @@
 \n\tDelete specified user\n);
d_printf(\nnet [method] user INFO name [misc. options] [targets]\
 \n\tList the domain groups of the specified user\n);
-   d_printf(\nnet [method] user ADD name [-c container] \
+   d_printf(\nnet [method] user ADD name [password] [-c container] \
 [-F user flags] [misc. options]\
  [targets]\n\tAdd specified user\n);
d_printf(\nnet [method] user RENAME oldusername newusername\

Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2006-06-19 07:46:35 UTC (rev 
16343)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2006-06-19 09:54:00 UTC (rev 
16344)
@@ -583,7 +583,7 @@
uint32 acb_info;
uint32 unknown, user_rid;
 
-   if (argc != 1) {
+   if (argc  1) {
d_printf(User must be specified\n);
rpc_user_usage(argc, argv);
return NT_STATUS_OK;
@@ -620,6 +620,60 @@
goto done;
}
 
+   if (argc == 2) {
+
+   uint32 *user_rids, num_rids, *name_types;
+   uint32 flags = 0x03e8; /* Unknown */
+   SAM_USERINFO_CTR ctr;
+   SAM_USER_INFO_24 p24;
+   uchar pwbuf[516];
+
+   result = rpccli_samr_lookup_names(pipe_hnd, mem_ctx, 
domain_pol,
+ flags, 1, acct_name,
+ num_rids, user_rids,
+ name_types);
+
+   if (!NT_STATUS_IS_OK(result)) {
+   goto done;
+   }
+
+   result = rpccli_samr_open_user(pipe_hnd, mem_ctx, domain_pol,
+  MAXIMUM_ALLOWED_ACCESS,
+  user_rids[0], user_pol);
+
+   if (!NT_STATUS_IS_OK(result)) {
+   goto done;
+   }
+
+   /* Set password on account */
+
+   ZERO_STRUCT(ctr);
+   ZERO_STRUCT(p24);
+
+   encode_pw_buffer(pwbuf, argv[1], STR_UNICODE);
+
+   init_sam_user_info24(p24, (char *)pwbuf,24);
+
+   ctr.switch_value = 24;
+   ctr.info.id24 = p24;
+
+   result = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, user_pol, 
24, 
+  cli-user_session_key, ctr);
+
+   if (!NT_STATUS_IS_OK(result)) {
+   d_fprintf(stderr, Failed to set password for user %s - 
%s\n, 
+acct_name, nt_errstr(result));
+
+   result = rpccli_samr_delete_dom_user(pipe_hnd, mem_ctx, 
user_pol);
+
+   if (!NT_STATUS_IS_OK(result)) {
+   d_fprintf(stderr, Failed to delete user %s - 
%s\n, 
+acct_name, nt_errstr(result));
+return result;
+   }
+   }
+
+   }
  done:
if (!NT_STATUS_IS_OK(result)) {
d_fprintf(stderr, Failed to add user %s - %s\n, acct_name, 

Modified: trunk/source/utils/net_help.c
===
--- trunk/source/utils/net_help.c   2006-06-19 07:46:35 UTC (rev 16343)
+++ trunk/source/utils/net_help.c   2006-06-19 09:54:00 UTC (rev 16344)
@@ -73,7 +73,7 @@
 \n\tDelete specified user\n);
d_printf(\nnet [method] user INFO name [misc. options] [targets]\
 \n\tList the domain groups of the specified user\n);
-   d_printf(\nnet [method] user ADD name [-c container] \
+   d_printf(\nnet [method] user ADD name [password] [-c container] \
 [-F user flags] [misc. options]\
  [targets]\n\tAdd specified user\n);
d_printf(\nnet [method] user RENAME oldusername newusername\

Modified: trunk/source/utils/net_rpc.c

svn commit: samba r16345 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-06-19 Thread gd
Author: gd
Date: 2006-06-19 10:01:02 + (Mon, 19 Jun 2006)
New Revision: 16345

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

Log:
Improve the chance that our users can discover one of the coolest 'net'
features.

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc.c
   trunk/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc.c   2006-06-19 09:54:00 UTC (rev 
16344)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c   2006-06-19 10:01:02 UTC (rev 
16345)
@@ -6665,6 +6665,7 @@
d_printf(  net rpc registry\t\tto manage registry hives\n);
d_printf(  net rpc service\t\tto start, stop and query services\n);
d_printf(  net rpc audit\t\t\tto modify global auditing settings\n);
+   d_printf(  net rpc shell\t\t\tto open an interactive shell for remote 
server/account management\n);
d_printf(\n);
d_printf('net rpc shutdown' also accepts the following miscellaneous 
options:\n); /* misc options */
d_printf(\t-r or --reboot\trequest remote server reboot on 
shutdown\n);

Modified: trunk/source/utils/net_rpc.c
===
--- trunk/source/utils/net_rpc.c2006-06-19 09:54:00 UTC (rev 16344)
+++ trunk/source/utils/net_rpc.c2006-06-19 10:01:02 UTC (rev 16345)
@@ -6665,6 +6665,7 @@
d_printf(  net rpc registry\t\tto manage registry hives\n);
d_printf(  net rpc service\t\tto start, stop and query services\n);
d_printf(  net rpc audit\t\t\tto modify global auditing settings\n);
+   d_printf(  net rpc shell\t\t\tto open an interactive shell for remote 
server/account management\n);
d_printf(\n);
d_printf('net rpc shutdown' also accepts the following miscellaneous 
options:\n); /* misc options */
d_printf(\t-r or --reboot\trequest remote server reboot on 
shutdown\n);



svn commit: samba r16346 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-06-19 Thread gd
Author: gd
Date: 2006-06-19 10:02:04 + (Mon, 19 Jun 2006)
New Revision: 16346

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

Log:
Allow to exit a net rpc shell with 'quit' or 'exit'.

Guenther

Modified:
   branches/SAMBA_3_0/source/utils/net_rpc_shell.c
   trunk/source/utils/net_rpc_shell.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc_shell.c
===
--- branches/SAMBA_3_0/source/utils/net_rpc_shell.c 2006-06-19 10:01:02 UTC 
(rev 16345)
+++ branches/SAMBA_3_0/source/utils/net_rpc_shell.c 2006-06-19 10:02:04 UTC 
(rev 16346)
@@ -116,6 +116,10 @@
}
}
 
+   if (strequal(argv[0], exit) || strequal(argv[0], quit)) {
+   return False;
+   }
+
if (strequal(argv[0], help) || strequal(argv[0], ?)) {
for (c = ctx-cmds; c-name != NULL; c++) {
if (ctx != this_ctx) {

Modified: trunk/source/utils/net_rpc_shell.c
===
--- trunk/source/utils/net_rpc_shell.c  2006-06-19 10:01:02 UTC (rev 16345)
+++ trunk/source/utils/net_rpc_shell.c  2006-06-19 10:02:04 UTC (rev 16346)
@@ -116,6 +116,10 @@
}
}
 
+   if (strequal(argv[0], exit) || strequal(argv[0], quit)) {
+   return False;
+   }
+
if (strequal(argv[0], help) || strequal(argv[0], ?)) {
for (c = ctx-cmds; c-name != NULL; c++) {
if (ctx != this_ctx) {



svn commit: samba r16347 - in branches/tmp/vl-posixacls/source/modules: .

2006-06-19 Thread vlendec
Author: vlendec
Date: 2006-06-19 10:28:07 + (Mon, 19 Jun 2006)
New Revision: 16347

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

Log:
Restore Solaris ACLs. Thanks to Michael Adam [EMAIL PROTECTED].

Volker

Modified:
   branches/tmp/vl-posixacls/source/modules/vfs_solarisacl.c


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


svn commit: samba r16348 - in branches/SAMBA_3_0_RELEASE: . source source/client source/include source/lib source/libads source/libsmb source/locking source/nmbd source/nsswitch source/passdb source/r

2006-06-19 Thread jerry
Author: jerry
Date: 2006-06-19 12:13:46 + (Mon, 19 Jun 2006)
New Revision: 16348

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

Log:
* merging changes from SAMBA_3_0 r16346
* updating release notes to match

Added:
   branches/SAMBA_3_0_RELEASE/source/script/tests/tests_smbclient_s3.sh
Modified:
   branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
   branches/SAMBA_3_0_RELEASE/source/aclocal.m4
   branches/SAMBA_3_0_RELEASE/source/client/client.c
   branches/SAMBA_3_0_RELEASE/source/client/smbctool.c
   branches/SAMBA_3_0_RELEASE/source/configure.in
   branches/SAMBA_3_0_RELEASE/source/include/ads.h
   branches/SAMBA_3_0_RELEASE/source/include/includes.h
   branches/SAMBA_3_0_RELEASE/source/lib/gencache.c
   branches/SAMBA_3_0_RELEASE/source/lib/getsmbpass.c
   branches/SAMBA_3_0_RELEASE/source/lib/readline.c
   branches/SAMBA_3_0_RELEASE/source/lib/xfile.c
   branches/SAMBA_3_0_RELEASE/source/libads/kerberos.c
   branches/SAMBA_3_0_RELEASE/source/libads/krb5_setpw.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap_printer.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/asn1.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/clikrb5.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/clispnego.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/libsmbclient.c
   branches/SAMBA_3_0_RELEASE/source/locking/locking.c
   branches/SAMBA_3_0_RELEASE/source/locking/posix.c
   branches/SAMBA_3_0_RELEASE/source/nmbd/nmbd_subnetdb.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_ds.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_lsarpc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_srvsvc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_spoolss.c
   branches/SAMBA_3_0_RELEASE/source/script/tests/test_smbclient_s3.sh
   branches/SAMBA_3_0_RELEASE/source/smbd/conn.c
   branches/SAMBA_3_0_RELEASE/source/smbd/ipc.c
   branches/SAMBA_3_0_RELEASE/source/smbd/notify_fam.c
   branches/SAMBA_3_0_RELEASE/source/smbd/nttrans.c
   branches/SAMBA_3_0_RELEASE/source/smbd/trans2.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_ads.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_cache.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_help.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_idmap.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_shell.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_sam.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_usershare.c


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


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

2006-06-19 Thread gd
Author: gd
Date: 2006-06-19 16:00:32 + (Mon, 19 Jun 2006)
New Revision: 16349

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

Log:
Another fix to make winbind more robust in large domains:

We may only feed rpc_useraliases with chunks of 1024 entries.  This is
important as the token generation otherwise fails when a user is member
of more then 1024 groups.

Volker, please check.

Guenther

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2006-06-19 12:13:46 UTC 
(rev 16348)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2006-06-19 16:00:32 UTC 
(rev 16349)
@@ -473,9 +473,14 @@
 {
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
POLICY_HND dom_pol;
-   DOM_SID2 *sid2;
+   DOM_SID2 *query_sids;
+   uint32 num_query_sids = 0;
int i;
struct rpc_pipe_client *cli;
+   uint32 *alias_rids_query, num_aliases_query;
+   int rangesize = MAX_SAM_ENTRIES_W2K;
+   uint32 total_sids = 0;
+   int num_queries = 1;
 
*num_aliases = 0;
*alias_rids = NULL;
@@ -486,20 +491,56 @@
if (!NT_STATUS_IS_OK(result))
return result;
 
-   sid2 = TALLOC_ARRAY(mem_ctx, DOM_SID2, num_sids);
+   do {
+   /* prepare query */
 
-   if (sid2 == NULL)
-   return NT_STATUS_NO_MEMORY;
+   num_query_sids = MIN(num_sids - total_sids, rangesize);
 
-   for (i=0; inum_sids; i++) {
-   sid_copy(sid2[i].sid, sids[i]);
-   sid2[i].num_auths = sid2[i].sid.num_auths;
-   }
+   DEBUG(10,(rpc: lookup_useraliases: entering query %d for %d 
sids\n, 
+   num_queries, num_query_sids));  
 
-   result = rpccli_samr_query_useraliases(cli, mem_ctx, dom_pol,
-  num_sids, sid2,
-  num_aliases, alias_rids);
 
+   query_sids = TALLOC_ARRAY(mem_ctx, DOM_SID2, num_query_sids);
+   if (query_sids == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   for (i=0; inum_query_sids; i++) {
+   sid_copy(query_sids[i].sid, sids[total_sids++]);
+   query_sids[i].num_auths = query_sids[i].sid.num_auths;
+   }
+
+   /* do request */
+
+   result = rpccli_samr_query_useraliases(cli, mem_ctx, dom_pol,
+  num_query_sids, 
query_sids,
+  num_aliases_query, 
+  alias_rids_query);
+
+   if (!NT_STATUS_IS_OK(result)) {
+   *num_aliases = 0;
+   *alias_rids = NULL;
+   TALLOC_FREE(query_sids);
+   goto done;
+   }
+
+   /* process output */
+
+   for (i=0; inum_aliases_query; i++) {
+   add_rid_to_array_unique(mem_ctx, alias_rids_query[i], 
+   alias_rids, num_aliases);
+   }
+
+   TALLOC_FREE(query_sids);
+
+   num_queries++;
+
+   } while (total_sids  num_sids);
+
+ done:
+   DEBUG(10,(rpc: lookup_useraliases: got %d aliases in %d queries 
+   (rangesize: %d)\n, *num_aliases, num_queries, rangesize));
+
return result;
 }
 

Modified: trunk/source/nsswitch/winbindd_rpc.c
===
--- trunk/source/nsswitch/winbindd_rpc.c2006-06-19 12:13:46 UTC (rev 
16348)
+++ trunk/source/nsswitch/winbindd_rpc.c2006-06-19 16:00:32 UTC (rev 
16349)
@@ -525,9 +525,14 @@
 {
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
POLICY_HND dom_pol;
-   DOM_SID2 *sid2;
+   DOM_SID2 *query_sids;
+   uint32 num_query_sids = 0;
int i;
struct rpc_pipe_client *cli;
+   uint32 *alias_rids_query, num_aliases_query;
+   int rangesize = MAX_SAM_ENTRIES_W2K;
+   uint32 total_sids = 0;
+   int num_queries = 1;
 
*num_aliases = 0;
*alias_rids = NULL;
@@ -538,20 +543,56 @@
if (!NT_STATUS_IS_OK(result))
return result;
 
-   sid2 = TALLOC_ARRAY(mem_ctx, DOM_SID2, num_sids);
+   do {
+   /* prepare query */
 
-   if (sid2 == NULL)
-   return NT_STATUS_NO_MEMORY;
+   num_query_sids = MIN(num_sids - total_sids, rangesize);
 
-   for (i=0; inum_sids; i++) {
-   sid_copy(sid2[i].sid, sids[i]);
-   sid2[i].num_auths = sid2[i].sid.num_auths;
-   }
+   

svn commit: samba r16350 - branches/SAMBA_3_0/source/lib branches/SAMBA_3_0/source/passdb trunk/source/lib trunk/source/passdb

2006-06-19 Thread gd
Author: gd
Date: 2006-06-19 16:25:19 + (Mon, 19 Jun 2006)
New Revision: 16350

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

Log:
Fix the build.

GUenther

Modified:
   branches/SAMBA_3_0/source/lib/util_sid.c
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   trunk/source/lib/util_sid.c
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_sid.c
===
--- branches/SAMBA_3_0/source/lib/util_sid.c2006-06-19 16:00:32 UTC (rev 
16349)
+++ branches/SAMBA_3_0/source/lib/util_sid.c2006-06-19 16:25:19 UTC (rev 
16350)
@@ -647,6 +647,25 @@
return;
 }
 
+void add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
+   uint32 rid, uint32 **pp_rids, size_t *p_num)
+{
+   size_t i;
+
+   for (i=0; i*p_num; i++) {
+   if ((*pp_rids)[i] == rid)
+   return;
+   }
+   
+   *pp_rids = TALLOC_REALLOC_ARRAY(mem_ctx, *pp_rids, uint32, *p_num+1);
+
+   if (*pp_rids == NULL)
+   return;
+
+   (*pp_rids)[*p_num] = rid;
+   *p_num += 1;
+}
+
 BOOL is_null_sid(const DOM_SID *sid)
 {
static const DOM_SID null_sid = {0};

Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2006-06-19 16:00:32 UTC (rev 
16349)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2006-06-19 16:25:19 UTC (rev 
16350)
@@ -2274,25 +2274,6 @@
return ldapsam_getgroup(methods, filter, map);
 }
 
-static void add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
-   uint32 rid, uint32 **pp_rids, size_t *p_num)
-{
-   size_t i;
-
-   for (i=0; i*p_num; i++) {
-   if ((*pp_rids)[i] == rid)
-   return;
-   }
-   
-   *pp_rids = TALLOC_REALLOC_ARRAY(mem_ctx, *pp_rids, uint32, *p_num+1);
-
-   if (*pp_rids == NULL)
-   return;
-
-   (*pp_rids)[*p_num] = rid;
-   *p_num += 1;
-}
-
 static BOOL ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
   LDAPMessage *entry,
   const DOM_SID *domain_sid,

Modified: trunk/source/lib/util_sid.c
===
--- trunk/source/lib/util_sid.c 2006-06-19 16:00:32 UTC (rev 16349)
+++ trunk/source/lib/util_sid.c 2006-06-19 16:25:19 UTC (rev 16350)
@@ -647,6 +647,25 @@
return;
 }
 
+void add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
+   uint32 rid, uint32 **pp_rids, size_t *p_num)
+{
+   size_t i;
+
+   for (i=0; i*p_num; i++) {
+   if ((*pp_rids)[i] == rid)
+   return;
+   }
+   
+   *pp_rids = TALLOC_REALLOC_ARRAY(mem_ctx, *pp_rids, uint32, *p_num+1);
+
+   if (*pp_rids == NULL)
+   return;
+
+   (*pp_rids)[*p_num] = rid;
+   *p_num += 1;
+}
+
 BOOL is_null_sid(const DOM_SID *sid)
 {
static const DOM_SID null_sid = {0};

Modified: trunk/source/passdb/pdb_ldap.c
===
--- trunk/source/passdb/pdb_ldap.c  2006-06-19 16:00:32 UTC (rev 16349)
+++ trunk/source/passdb/pdb_ldap.c  2006-06-19 16:25:19 UTC (rev 16350)
@@ -2275,25 +2275,6 @@
return ldapsam_getgroup(methods, filter, map);
 }
 
-static void add_rid_to_array_unique(TALLOC_CTX *mem_ctx,
-   uint32 rid, uint32 **pp_rids, size_t *p_num)
-{
-   size_t i;
-
-   for (i=0; i*p_num; i++) {
-   if ((*pp_rids)[i] == rid)
-   return;
-   }
-   
-   *pp_rids = TALLOC_REALLOC_ARRAY(mem_ctx, *pp_rids, uint32, *p_num+1);
-
-   if (*pp_rids == NULL)
-   return;
-
-   (*pp_rids)[*p_num] = rid;
-   *p_num += 1;
-}
-
 static BOOL ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
   LDAPMessage *entry,
   const DOM_SID *domain_sid,



svn commit: samba r16351 - in trunk/source/libsmb: .

2006-06-19 Thread derrell
Author: derrell
Date: 2006-06-19 16:45:01 + (Mon, 19 Jun 2006)
New Revision: 16351

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

Log:
Only set the DFS capability flag if the share is a DFS root.  Fixes bug 3814.
Modified:
   trunk/source/libsmb/clientgen.c


Changeset:
Modified: trunk/source/libsmb/clientgen.c
===
--- trunk/source/libsmb/clientgen.c 2006-06-19 16:25:19 UTC (rev 16350)
+++ trunk/source/libsmb/clientgen.c 2006-06-19 16:45:01 UTC (rev 16351)
@@ -198,7 +198,7 @@
flags2 = FLAGS2_LONG_PATH_COMPONENTS;
if (cli-capabilities  CAP_UNICODE)
flags2 |= FLAGS2_UNICODE_STRINGS;
-   if (cli-capabilities  CAP_DFS)
+   if ((cli-capabilities  CAP_DFS)  cli-dfsroot)
flags2 |= FLAGS2_DFS_PATHNAMES;
if (cli-capabilities  CAP_STATUS32)
flags2 |= FLAGS2_32_BIT_ERROR_CODES;



svn commit: samba r16352 - in branches/SAMBA_3_0: .

2006-06-19 Thread derrell
Author: derrell
Date: 2006-06-19 16:48:43 + (Mon, 19 Jun 2006)
New Revision: 16352

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

Log:
 [EMAIL PROTECTED]:  derrell | 2006-05-08 23:57:53 -0400
 Adding a directory to do some tests.  This directory may be deleted.

Added:
   branches/SAMBA_3_0/derrell-test/
Modified:
   branches/SAMBA_3_0/


Changeset:

Property changes on: branches/SAMBA_3_0
___
Name: svk:merge
   - 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:13868
   + 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:14593



svn commit: samba r16353 - in branches/SAMBA_3_0: . derrell-test

2006-06-19 Thread derrell
Author: derrell
Date: 2006-06-19 16:48:51 + (Mon, 19 Jun 2006)
New Revision: 16353

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

Log:
 [EMAIL PROTECTED]:  derrell | 2006-05-08 23:59:42 -0400
 Added first draft of README file, testing SVK's --patch facility

Added:
   branches/SAMBA_3_0/derrell-test/README
Modified:
   branches/SAMBA_3_0/


Changeset:

Property changes on: branches/SAMBA_3_0
___
Name: svk:merge
   - 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:14593
   + 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:14594

Added: branches/SAMBA_3_0/derrell-test/README
===
--- branches/SAMBA_3_0/derrell-test/README  2006-06-19 16:48:43 UTC (rev 
16352)
+++ branches/SAMBA_3_0/derrell-test/README  2006-06-19 16:48:51 UTC (rev 
16353)
@@ -0,0 +1,4 @@
+This is a test of SVK's --patch facility.  I think we should be able to
+generate a patch without write access to the repository, which contains all
+relevant information regarding check-ins.  Let's see.
+



svn commit: samba r16354 - in branches/SAMBA_3_0: . derrell-test

2006-06-19 Thread derrell
Author: derrell
Date: 2006-06-19 16:48:59 + (Mon, 19 Jun 2006)
New Revision: 16354

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

Log:
 [EMAIL PROTECTED]:  derrell | 2006-05-09 00:00:35 -0400
 Made a trivial change to the file so I can have one more check-in

Modified:
   branches/SAMBA_3_0/
   branches/SAMBA_3_0/derrell-test/README


Changeset:

Property changes on: branches/SAMBA_3_0
___
Name: svk:merge
   - 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:14594
   + 3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba3:14595

Modified: branches/SAMBA_3_0/derrell-test/README
===
--- branches/SAMBA_3_0/derrell-test/README  2006-06-19 16:48:51 UTC (rev 
16353)
+++ branches/SAMBA_3_0/derrell-test/README  2006-06-19 16:48:59 UTC (rev 
16354)
@@ -2,3 +2,4 @@
 generate a patch without write access to the repository, which contains all
 relevant information regarding check-ins.  Let's see.
 
+This line is just a simple change to have one more check-in.



svn commit: samba r16355 - in branches/SAMBA_3_0: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 17:22:53 + (Mon, 19 Jun 2006)
New Revision: 16355

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

Log:
Remove derrell-test created by mistake.
Jeremy.

Removed:
   branches/SAMBA_3_0/derrell-test/


Changeset:


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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 17:23:54 + (Mon, 19 Jun 2006)
New Revision: 16356

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

Log:
Helping derrell out. Jeremy.

Only set the DFS capability flag if the share is a DFS root.  Fixes bug 3814.


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


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clientgen.c
===
--- branches/SAMBA_3_0/source/libsmb/clientgen.c2006-06-19 17:22:53 UTC 
(rev 16355)
+++ branches/SAMBA_3_0/source/libsmb/clientgen.c2006-06-19 17:23:54 UTC 
(rev 16356)
@@ -198,7 +198,7 @@
flags2 = FLAGS2_LONG_PATH_COMPONENTS;
if (cli-capabilities  CAP_UNICODE)
flags2 |= FLAGS2_UNICODE_STRINGS;
-   if (cli-capabilities  CAP_DFS)
+   if ((cli-capabilities  CAP_DFS)  cli-dfsroot)
flags2 |= FLAGS2_DFS_PATHNAMES;
if (cli-capabilities  CAP_STATUS32)
flags2 |= FLAGS2_32_BIT_ERROR_CODES;



svn commit: samba r16357 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-06-19 Thread metze
Author: metze
Date: 2006-06-19 18:01:27 + (Mon, 19 Jun 2006)
New Revision: 16357

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

Log:
- start get rid of void parsing functions
- there will more changes come but I want to do them in 
  relative small chunks

metze 
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/trans2.c


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


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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 18:49:51 + (Mon, 19 Jun 2006)
New Revision: 16358

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

Log:
ALWAYS compile this stuff on a 64-bit box before
checking in. size_t != uint32 on a 64-bit machine.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2006-06-19 18:01:27 UTC 
(rev 16357)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2006-06-19 18:49:51 UTC 
(rev 16358)
@@ -527,8 +527,10 @@
/* process output */
 
for (i=0; inum_aliases_query; i++) {
+   size_t na = *num_aliases;
add_rid_to_array_unique(mem_ctx, alias_rids_query[i], 
-   alias_rids, num_aliases);
+   alias_rids, na);
+   *num_aliases = na;
}
 
TALLOC_FREE(query_sids);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 18:50:01 + (Mon, 19 Jun 2006)
New Revision: 16359

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

Log:
ALWAYS compile this stuff on a 64-bit box before
checking in. size_t != uint32 on a 64-bit machine.
Jeremy.

Modified:
   trunk/source/nsswitch/winbindd_rpc.c


Changeset:
Modified: trunk/source/nsswitch/winbindd_rpc.c
===
--- trunk/source/nsswitch/winbindd_rpc.c2006-06-19 18:49:51 UTC (rev 
16358)
+++ trunk/source/nsswitch/winbindd_rpc.c2006-06-19 18:50:01 UTC (rev 
16359)
@@ -579,8 +579,10 @@
/* process output */
 
for (i=0; inum_aliases_query; i++) {
+   size_t na = *num_aliases;
add_rid_to_array_unique(mem_ctx, alias_rids_query[i], 
-   alias_rids, num_aliases);
+   alias_rids, na);
+   *num_aliases = na;
}
 
TALLOC_FREE(query_sids);



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

2006-06-19 Thread vlendec
Author: vlendec
Date: 2006-06-19 19:41:56 + (Mon, 19 Jun 2006)
New Revision: 16361

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

Log:
Fix Klocwork ID 1731 1770 1771 1775 1796

Volker

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c
   trunk/source/nsswitch/winbindd_ads.c
   trunk/source/nsswitch/winbindd_cache.c
   trunk/source/nsswitch/winbindd_cm.c
   trunk/source/nsswitch/winbindd_misc.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2006-06-19 19:07:39 UTC 
(rev 16360)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c   2006-06-19 19:41:56 UTC 
(rev 16361)
@@ -904,7 +904,11 @@
members = NULL;
num_members = 0;
 
-   attrs = TALLOC_ARRAY(mem_ctx, const char *, 3);
+   if ((attrs = TALLOC_ARRAY(mem_ctx, const char *, 3)) == NULL) {
+   status = NT_STATUS_NO_MEMORY;
+   goto done;
+   }
+   
attrs[1] = talloc_strdup(mem_ctx, usnChanged);
attrs[2] = NULL;


Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-06-19 19:07:39 UTC 
(rev 16360)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-06-19 19:41:56 UTC 
(rev 16361)
@@ -276,7 +276,7 @@
 {
char *sid_string;
sid_string = centry_string(centry, mem_ctx);
-   if (!string_to_sid(sid, sid_string)) {
+   if ((sid_string == NULL) || (!string_to_sid(sid, sid_string))) {
return False;
}
return True;
@@ -2136,6 +2136,7 @@
 
if (!wcache-tdb) {
DEBUG(0,(Failed to open winbindd_cache.tdb!\n));
+   return;
}
 
tdb_traverse(wcache-tdb, traverse_fn_cleanup, NULL);

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-06-19 19:07:39 UTC 
(rev 16360)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-06-19 19:41:56 UTC 
(rev 16361)
@@ -723,6 +723,9 @@
if ((num_dcnames == 0) || (num_dcnames != num_addrs))
return False;
 
+   if ((addrs == NULL) || (dcnames == NULL))
+   return False;
+
if ( !open_any_socket_out(addrs, num_addrs, 1, fd_index, fd) ) 
{
for (i=0; inum_dcs; i++) {

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c  2006-06-19 19:07:39 UTC 
(rev 16360)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_misc.c  2006-06-19 19:41:56 UTC 
(rev 16361)
@@ -158,7 +158,10 @@
/* This is a bit excessive, but the extra data sooner or later will be
   talloc'ed */
 
-   extra_data_len = strlen(extra_data);
+   extra_data_len = 0;
+   if (extra_data != NULL) {
+   extra_data_len = strlen(extra_data);
+   }
 
if (extra_data_len  0) {
state-response.extra_data.data = SMB_STRDUP(extra_data);

Modified: trunk/source/nsswitch/winbindd_ads.c
===
--- trunk/source/nsswitch/winbindd_ads.c2006-06-19 19:07:39 UTC (rev 
16360)
+++ trunk/source/nsswitch/winbindd_ads.c2006-06-19 19:41:56 UTC (rev 
16361)
@@ -904,7 +904,11 @@
members = NULL;
num_members = 0;
 
-   attrs = TALLOC_ARRAY(mem_ctx, const char *, 3);
+   if ((attrs = TALLOC_ARRAY(mem_ctx, const char *, 3)) == NULL) {
+   status = NT_STATUS_NO_MEMORY;
+   goto done;
+   }
+   
attrs[1] = talloc_strdup(mem_ctx, usnChanged);
attrs[2] = NULL;


Modified: trunk/source/nsswitch/winbindd_cache.c
===
--- trunk/source/nsswitch/winbindd_cache.c  2006-06-19 19:07:39 UTC (rev 
16360)
+++ trunk/source/nsswitch/winbindd_cache.c  2006-06-19 19:41:56 UTC (rev 
16361)
@@ -276,7 +276,7 @@
 {
char *sid_string;
sid_string = centry_string(centry, mem_ctx);
-   if (!string_to_sid(sid, sid_string)) {
+   if ((sid_string == NULL) || (!string_to_sid(sid, sid_string))) {
return False;
}
return True;
@@ -2258,6 +2258,7 @@
 
if (!wcache-tdb) {
DEBUG(0,(Failed to open winbindd_cache.tdb!\n));
+   return;
}
 
tdb_traverse(wcache-tdb, traverse_fn_cleanup, NULL);

Modified: 

svn commit: samba r16362 - branches/SAMBA_3_0/source/rpc_parse trunk/source/rpc_parse

2006-06-19 Thread vlendec
Author: vlendec
Date: 2006-06-19 19:56:22 + (Mon, 19 Jun 2006)
New Revision: 16362

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

Log:
That's the best way to fix a Klocwork bug: Remove the (unused...;-) code
altogether. This was essentially a second implementation if string_to_sid.

Klocwork ID 1038

Volker

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   trunk/source/rpc_parse/parse_misc.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2006-06-19 19:41:56 UTC 
(rev 16361)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2006-06-19 19:56:22 UTC 
(rev 16362)
@@ -227,56 +227,6 @@
 }
 
 /***
- Inits a DOM_SID structure.
-
- BIG NOTE: this function only does SIDS where the identauth is not = 2^32 
- identauth = 2^32 can be detected because it will be specified in hex
-/
-
-void init_dom_sid(DOM_SID *sid, const char *str_sid)
-{
-   pstring domsid;
-   int identauth;
-   char *p;
-
-   if (str_sid == NULL) {
-   DEBUG(4,(netlogon domain SID: none\n));
-   sid-sid_rev_num = 0;
-   sid-num_auths = 0;
-   return;
-   }
-   
-   pstrcpy(domsid, str_sid);
-
-   DEBUG(4,(init_dom_sid %d SID:  %s\n, __LINE__, domsid));
-
-   /* assume, but should check, that domsid starts S- */
-   p = strtok(domsid+2,-);
-   sid-sid_rev_num = atoi(p);
-
-   /* identauth in decimal should be   2^32 */
-   /* identauth in hex should be = 2^32 */
-   identauth = atoi(strtok(0,-));
-
-   DEBUG(4,(netlogon rev %d\n, sid-sid_rev_num));
-   DEBUG(4,(netlogon %s ia %d\n, p, identauth));
-
-   sid-id_auth[0] = 0;
-   sid-id_auth[1] = 0;
-   sid-id_auth[2] = (identauth  0xff00)  24;
-   sid-id_auth[3] = (identauth  0x00ff)  16;
-   sid-id_auth[4] = (identauth  0xff00)  8;
-   sid-id_auth[5] = (identauth  0x00ff);
-
-   sid-num_auths = 0;
-
-   while ((p = strtok(0, -)) != NULL  sid-num_auths  MAXSUBAUTHS)
-   sid-sub_auths[sid-num_auths++] = atoi(p);
-
-   DEBUG(4,(init_dom_sid: %d SID:  %s\n, __LINE__, domsid));
-}
-
-/***
  Inits a DOM_SID2 structure.
 /
 

Modified: trunk/source/rpc_parse/parse_misc.c
===
--- trunk/source/rpc_parse/parse_misc.c 2006-06-19 19:41:56 UTC (rev 16361)
+++ trunk/source/rpc_parse/parse_misc.c 2006-06-19 19:56:22 UTC (rev 16362)
@@ -227,56 +227,6 @@
 }
 
 /***
- Inits a DOM_SID structure.
-
- BIG NOTE: this function only does SIDS where the identauth is not = 2^32 
- identauth = 2^32 can be detected because it will be specified in hex
-/
-
-void init_dom_sid(DOM_SID *sid, const char *str_sid)
-{
-   pstring domsid;
-   int identauth;
-   char *p;
-
-   if (str_sid == NULL) {
-   DEBUG(4,(netlogon domain SID: none\n));
-   sid-sid_rev_num = 0;
-   sid-num_auths = 0;
-   return;
-   }
-   
-   pstrcpy(domsid, str_sid);
-
-   DEBUG(4,(init_dom_sid %d SID:  %s\n, __LINE__, domsid));
-
-   /* assume, but should check, that domsid starts S- */
-   p = strtok(domsid+2,-);
-   sid-sid_rev_num = atoi(p);
-
-   /* identauth in decimal should be   2^32 */
-   /* identauth in hex should be = 2^32 */
-   identauth = atoi(strtok(0,-));
-
-   DEBUG(4,(netlogon rev %d\n, sid-sid_rev_num));
-   DEBUG(4,(netlogon %s ia %d\n, p, identauth));
-
-   sid-id_auth[0] = 0;
-   sid-id_auth[1] = 0;
-   sid-id_auth[2] = (identauth  0xff00)  24;
-   sid-id_auth[3] = (identauth  0x00ff)  16;
-   sid-id_auth[4] = (identauth  0xff00)  8;
-   sid-id_auth[5] = (identauth  0x00ff);
-
-   sid-num_auths = 0;
-
-   while ((p = strtok(0, -)) != NULL  sid-num_auths  MAXSUBAUTHS)
-   sid-sub_auths[sid-num_auths++] = atoi(p);
-
-   DEBUG(4,(init_dom_sid: %d SID:  %s\n, __LINE__, domsid));
-}
-
-/***
  Inits a DOM_SID2 structure.
 /
 



svn commit: samba r16363 - branches/SAMBA_3_0/source/libsmb branches/SAMBA_3_0/source/utils trunk/source/libsmb trunk/source/utils

2006-06-19 Thread vlendec
Author: vlendec
Date: 2006-06-19 20:00:51 + (Mon, 19 Jun 2006)
New Revision: 16363

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

Log:
Fix Klocwork ID 981 1652

Volker

Modified:
   branches/SAMBA_3_0/source/libsmb/trusts_util.c
   branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c
   trunk/source/libsmb/trusts_util.c
   trunk/source/utils/ntlm_auth_diagnostics.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/trusts_util.c
===
--- branches/SAMBA_3_0/source/libsmb/trusts_util.c  2006-06-19 19:56:22 UTC 
(rev 16362)
+++ branches/SAMBA_3_0/source/libsmb/trusts_util.c  2006-06-19 20:00:51 UTC 
(rev 16363)
@@ -86,7 +86,11 @@

/* Create a random machine account password */
str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
-   new_trust_passwd = talloc_strdup(mem_ctx, str);
+
+   if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) {
+   DEBUG(0, (talloc_strdup failed\n));
+   return NT_STATUS_NO_MEMORY;
+   }

E_md4hash(new_trust_passwd, new_trust_passwd_hash);
 

Modified: branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c
===
--- branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2006-06-19 
19:56:22 UTC (rev 16362)
+++ branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2006-06-19 
20:00:51 UTC (rev 16363)
@@ -464,7 +464,10 @@
 
nt_response.length = strlen_w(((void 
*)nt_response.data))*sizeof(smb_ucs2_t);
 
-   password = strdup_upper(opt_password);
+   if ((password = strdup_upper(opt_password)) == NULL) {
+   DEBUG(0, (strdup_upper failed!\n));
+   exit(1);
+   }
 
if ((convert_string_allocate(NULL, CH_UNIX, 
 CH_DOS, password,

Modified: trunk/source/libsmb/trusts_util.c
===
--- trunk/source/libsmb/trusts_util.c   2006-06-19 19:56:22 UTC (rev 16362)
+++ trunk/source/libsmb/trusts_util.c   2006-06-19 20:00:51 UTC (rev 16363)
@@ -86,7 +86,11 @@

/* Create a random machine account password */
str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
-   new_trust_passwd = talloc_strdup(mem_ctx, str);
+
+   if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) {
+   DEBUG(0, (talloc_strdup failed\n));
+   return NT_STATUS_NO_MEMORY;
+   }

E_md4hash(new_trust_passwd, new_trust_passwd_hash);
 

Modified: trunk/source/utils/ntlm_auth_diagnostics.c
===
--- trunk/source/utils/ntlm_auth_diagnostics.c  2006-06-19 19:56:22 UTC (rev 
16362)
+++ trunk/source/utils/ntlm_auth_diagnostics.c  2006-06-19 20:00:51 UTC (rev 
16363)
@@ -464,7 +464,10 @@
 
nt_response.length = strlen_w(((void 
*)nt_response.data))*sizeof(smb_ucs2_t);
 
-   password = strdup_upper(opt_password);
+   if ((password = strdup_upper(opt_password)) == NULL) {
+   DEBUG(0, (strdup_upper failed!\n));
+   exit(1);
+   }
 
if ((convert_string_allocate(NULL, CH_UNIX, 
 CH_DOS, password,



svn commit: samba r16364 - in trunk/source: printing rpc_parse

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:36:12 + (Mon, 19 Jun 2006)
New Revision: 16364

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

Log:
Fix Klocwork #895, #898, #899, #915, #932, #938 and a
few other problems Klocwork missed.
Jeremy.

Modified:
   trunk/source/printing/nt_printing.c
   trunk/source/rpc_parse/parse_prs.c


Changeset:
Modified: trunk/source/printing/nt_printing.c
===
--- trunk/source/printing/nt_printing.c 2006-06-19 20:00:51 UTC (rev 16363)
+++ trunk/source/printing/nt_printing.c 2006-06-19 21:36:12 UTC (rev 16364)
@@ -250,7 +250,7 @@
  generate a new TDB_DATA key for storing a printer security descriptor
 /
 
-static char* make_printers_secdesc_tdbkey( const char* sharename  )
+static char *make_printers_secdesc_tdbkey( const char* sharename  )
 {
fstring share;
static pstring keystr;
@@ -346,32 +346,41 @@
size_t size_new_sec;
DOM_SID sid;
 
-   if (!data.dptr || data.dsize == 0)
+   if (!data.dptr || data.dsize == 0) {
return 0;
+   }
 
-   if ( strncmp( key.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX) ) != 0 )
+   if ( strncmp( key.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX) ) != 0 ) 
{
return 0;
+   }
 
/* upgrade the security descriptor */
 
ZERO_STRUCT( ps );
 
prs_init( ps, 0, ctx, UNMARSHALL );
-   prs_give_memory( ps, data.dptr, data.dsize, True );
+   prs_give_memory( ps, data.dptr, data.dsize, False );
 
if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_orig, ps, 1 ) ) {
/* delete bad entries */
DEBUG(0,(sec_desc_upg_fn: Failed to parse original sec_desc 
for %si.  Deleting\n, key.dptr ));
tdb_delete( tdb_printers, key );
+   prs_mem_free( ps );
return 0;
}
 
+   if (!sd_orig) {
+   prs_mem_free( ps );
+   return 0;
+   }
sec = sd_orig-sec;

/* is this even valid? */

-   if ( !sec-dacl )
+   if ( !sec-dacl ) {
+   prs_mem_free( ps );
return 0;
+   }

/* update access masks */

@@ -399,13 +408,24 @@
new_sec = make_sec_desc( ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
sid, sid,
NULL, NULL, size_new_sec );
+   if (!new_sec) {
+   prs_mem_free( ps );
+   return 0;
+   }
sd_new = make_sec_desc_buf( ctx, size_new_sec, new_sec );
+   if (!sd_new) {
+   prs_mem_free( ps );
+   return 0;
+   }
 
if ( !(sd_store = sec_desc_merge( ctx, sd_new, sd_orig )) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to update sec_desc for %s\n, 
key.dptr ));
+   prs_mem_free( ps );
return 0;
}

+   prs_mem_free( ps );
+
/* store it back */

sd_size = sec_desc_size(sd_store-sec) + sizeof(SEC_DESC_BUF);
@@ -413,6 +433,7 @@
 
if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_store, ps, 1 ) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to parse new sec_desc for 
%s\n, key.dptr ));
+   prs_mem_free( ps );
return 0;
}
 
@@ -943,6 +964,10 @@
TDB_DATA kbuf, newkey;
 
short_archi = get_short_archi(architecture);
+   if (!short_archi) {
+   return 0;
+   }
+
slprintf(key, sizeof(key)-1, %s%s/%d/, DRIVERS_PREFIX, short_archi, 
version);
 
for (kbuf = tdb_firstkey(tdb_drivers);
@@ -965,9 +990,10 @@
 }
 
 /
-function to do the mapping between the long architecture name and
-the short one.
+ Function to do the mapping between the long architecture name and
+ the short one.
 /
+
 const char *get_short_archi(const char *long_archi)
 {
 int i=-1;
@@ -985,7 +1011,6 @@
 
/* this might be client code - but shouldn't this be an fstrcpy etc? */
 
-
 DEBUGADD(108,(index: [%d]\n, i));
 DEBUGADD(108,(long architecture: [%s]\n, archi_table[i].long_archi));
 DEBUGADD(108,(short architecture: [%s]\n, 
archi_table[i].short_archi));
@@ -1549,6 +1574,9 @@
}
 
architecture = get_short_archi(driver-environment);
+   if (!architecture) {
+   return WERR_UNKNOWN_PRINTER_DRIVER;
+   }

/* jfm:7/16/2000 the client always sends the cversion=0.
 * The server should check which version the driver is by reading
@@ -1562,7 +1590,7 @@
 *  NT2K: cversion=3
 */
if ((driver-cversion = get_correct_cversion( architecture, 
driver-driverpath, user, err)) == -1)
- 

svn commit: samba r16365 - in branches/SAMBA_3_0/source: printing rpc_parse

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:36:19 + (Mon, 19 Jun 2006)
New Revision: 16365

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

Log:
Fix Klocwork #895, #898, #899, #915, #932, #938 and a
few other problems Klocwork missed.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/rpc_parse/parse_prs.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===
--- branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-19 21:36:12 UTC 
(rev 16364)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-19 21:36:19 UTC 
(rev 16365)
@@ -250,7 +250,7 @@
  generate a new TDB_DATA key for storing a printer security descriptor
 /
 
-static char* make_printers_secdesc_tdbkey( const char* sharename  )
+static char *make_printers_secdesc_tdbkey( const char* sharename  )
 {
fstring share;
static pstring keystr;
@@ -346,32 +346,41 @@
size_t size_new_sec;
DOM_SID sid;
 
-   if (!data.dptr || data.dsize == 0)
+   if (!data.dptr || data.dsize == 0) {
return 0;
+   }
 
-   if ( strncmp( key.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX) ) != 0 )
+   if ( strncmp( key.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX) ) != 0 ) 
{
return 0;
+   }
 
/* upgrade the security descriptor */
 
ZERO_STRUCT( ps );
 
prs_init( ps, 0, ctx, UNMARSHALL );
-   prs_give_memory( ps, data.dptr, data.dsize, True );
+   prs_give_memory( ps, data.dptr, data.dsize, False );
 
if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_orig, ps, 1 ) ) {
/* delete bad entries */
DEBUG(0,(sec_desc_upg_fn: Failed to parse original sec_desc 
for %si.  Deleting\n, key.dptr ));
tdb_delete( tdb_printers, key );
+   prs_mem_free( ps );
return 0;
}
 
+   if (!sd_orig) {
+   prs_mem_free( ps );
+   return 0;
+   }
sec = sd_orig-sec;

/* is this even valid? */

-   if ( !sec-dacl )
+   if ( !sec-dacl ) {
+   prs_mem_free( ps );
return 0;
+   }

/* update access masks */

@@ -399,13 +408,24 @@
new_sec = make_sec_desc( ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
sid, sid,
NULL, NULL, size_new_sec );
+   if (!new_sec) {
+   prs_mem_free( ps );
+   return 0;
+   }
sd_new = make_sec_desc_buf( ctx, size_new_sec, new_sec );
+   if (!sd_new) {
+   prs_mem_free( ps );
+   return 0;
+   }
 
if ( !(sd_store = sec_desc_merge( ctx, sd_new, sd_orig )) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to update sec_desc for %s\n, 
key.dptr ));
+   prs_mem_free( ps );
return 0;
}

+   prs_mem_free( ps );
+
/* store it back */

sd_size = sec_desc_size(sd_store-sec) + sizeof(SEC_DESC_BUF);
@@ -413,6 +433,7 @@
 
if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_store, ps, 1 ) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to parse new sec_desc for 
%s\n, key.dptr ));
+   prs_mem_free( ps );
return 0;
}
 
@@ -943,6 +964,10 @@
TDB_DATA kbuf, newkey;
 
short_archi = get_short_archi(architecture);
+   if (!short_archi) {
+   return 0;
+   }
+
slprintf(key, sizeof(key)-1, %s%s/%d/, DRIVERS_PREFIX, short_archi, 
version);
 
for (kbuf = tdb_firstkey(tdb_drivers);
@@ -965,9 +990,10 @@
 }
 
 /
-function to do the mapping between the long architecture name and
-the short one.
+ Function to do the mapping between the long architecture name and
+ the short one.
 /
+
 const char *get_short_archi(const char *long_archi)
 {
 int i=-1;
@@ -985,7 +1011,6 @@
 
/* this might be client code - but shouldn't this be an fstrcpy etc? */
 
-
 DEBUGADD(108,(index: [%d]\n, i));
 DEBUGADD(108,(long architecture: [%s]\n, archi_table[i].long_archi));
 DEBUGADD(108,(short architecture: [%s]\n, 
archi_table[i].short_archi));
@@ -1546,6 +1571,9 @@
}
 
architecture = get_short_archi(driver-environment);
+   if (!architecture) {
+   return WERR_UNKNOWN_PRINTER_DRIVER;
+   }

/* jfm:7/16/2000 the client always sends the cversion=0.
 * The server should check which version the driver is by reading
@@ -1559,7 +1587,7 @@
 *  NT2K: cversion=3
 */
if ((driver-cversion = 

svn commit: samba r16366 - in trunk/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:41:59 + (Mon, 19 Jun 2006)
New Revision: 16366

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

Log:
Missed one, Klocwork #915.
Jeremy.

Modified:
   trunk/source/printing/nt_printing.c


Changeset:
Modified: trunk/source/printing/nt_printing.c
===
--- trunk/source/printing/nt_printing.c 2006-06-19 21:36:19 UTC (rev 16365)
+++ trunk/source/printing/nt_printing.c 2006-06-19 21:41:59 UTC (rev 16366)
@@ -3115,6 +3115,10 @@
 
if (ADS_ERR_OK(ads_rc)  ads_count_replies(ads, res)) {
prt_dn = ads_get_dn(ads, res);
+   if (!prt_dn) {
+   ads_msgfree(ads, res);
+   return WERR_NOMEM;
+   }
ads_rc = ads_del_dn(ads, prt_dn);
ads_memfree(ads, prt_dn);
}



svn commit: samba r16367 - in branches/SAMBA_3_0/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:42:07 + (Mon, 19 Jun 2006)
New Revision: 16367

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

Log:
Missed one, Klocwork #915.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/printing/nt_printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===
--- branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-19 21:41:59 UTC 
(rev 16366)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-19 21:42:07 UTC 
(rev 16367)
@@ -3112,6 +3112,10 @@
 
if (ADS_ERR_OK(ads_rc)  ads_count_replies(ads, res)) {
prt_dn = ads_get_dn(ads, res);
+   if (!prt_dn) {
+   ads_msgfree(ads, res);
+   return WERR_NOMEM;
+   }
ads_rc = ads_del_dn(ads, prt_dn);
ads_memfree(ads, prt_dn);
}



svn commit: samba r16368 - in trunk/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:47:40 + (Mon, 19 Jun 2006)
New Revision: 16368

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

Log:
Klocwork #1035.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_lsa.c


Changeset:
Modified: trunk/source/rpc_parse/parse_lsa.c
===
--- trunk/source/rpc_parse/parse_lsa.c  2006-06-19 21:42:07 UTC (rev 16367)
+++ trunk/source/rpc_parse/parse_lsa.c  2006-06-19 21:47:40 UTC (rev 16368)
@@ -738,6 +738,9 @@
 
if (UNMARSHALLING(ps)) {
d_q-auditsettings = TALLOC_ZERO_ARRAY(ps-mem_ctx, 
uint32, d_q-count2);
+   if (!d_q-auditsettings) {
+   return False;
+   }
}
 
if (!prs_uint32s(False, auditsettings, ps, depth, 
d_q-auditsettings, d_q-count2))



svn commit: samba r16369 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 21:47:46 + (Mon, 19 Jun 2006)
New Revision: 16369

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

Log:
Klocwork #1035.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c 2006-06-19 21:47:40 UTC 
(rev 16368)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c 2006-06-19 21:47:46 UTC 
(rev 16369)
@@ -738,6 +738,9 @@
 
if (UNMARSHALLING(ps)) {
d_q-auditsettings = TALLOC_ZERO_ARRAY(ps-mem_ctx, 
uint32, d_q-count2);
+   if (!d_q-auditsettings) {
+   return False;
+   }
}
 
if (!prs_uint32s(False, auditsettings, ps, depth, 
d_q-auditsettings, d_q-count2))



svn commit: samba r16370 - in trunk/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 22:54:58 + (Mon, 19 Jun 2006)
New Revision: 16370

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

Log:
Fix Klocwork #1048.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_ntsvcs.c


Changeset:
Modified: trunk/source/rpc_parse/parse_ntsvcs.c
===
--- trunk/source/rpc_parse/parse_ntsvcs.c   2006-06-19 21:47:46 UTC (rev 
16369)
+++ trunk/source/rpc_parse/parse_ntsvcs.c   2006-06-19 22:54:58 UTC (rev 
16370)
@@ -299,8 +299,12 @@
 
q_u-buffer_size = 0x00a8;
 
-   if ( UNMARSHALLING(ps) )
+   if ( UNMARSHALLING(ps) ) {
q_u-buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, 
q_u-buffer_size );
+   if (!q_u-buffer) {
+   return False;
+   }
+   }
 
if ( !prs_uint8s(True, buffer, ps, depth, q_u-buffer, 
q_u-buffer_size) )
return False;
@@ -329,8 +333,12 @@
if ( !prs_align(ps) )
return False;
 
-   if ( UNMARSHALLING(ps) )
+   if ( UNMARSHALLING(ps) ) {
r_u-buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, 
r_u-buffer_size );
+   if (!r_u-buffer) {
+   return False;
+   }
+   }
 
if ( !prs_uint8s(True, buffer, ps, depth, r_u-buffer, 
r_u-buffer_size) )
return False;



svn commit: samba r16371 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 22:55:03 + (Mon, 19 Jun 2006)
New Revision: 16371

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

Log:
Fix Klocwork #1048.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_ntsvcs.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_ntsvcs.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_ntsvcs.c  2006-06-19 22:54:58 UTC 
(rev 16370)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_ntsvcs.c  2006-06-19 22:55:03 UTC 
(rev 16371)
@@ -299,8 +299,12 @@
 
q_u-buffer_size = 0x00a8;
 
-   if ( UNMARSHALLING(ps) )
+   if ( UNMARSHALLING(ps) ) {
q_u-buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, 
q_u-buffer_size );
+   if (!q_u-buffer) {
+   return False;
+   }
+   }
 
if ( !prs_uint8s(True, buffer, ps, depth, q_u-buffer, 
q_u-buffer_size) )
return False;
@@ -329,8 +333,12 @@
if ( !prs_align(ps) )
return False;
 
-   if ( UNMARSHALLING(ps) )
+   if ( UNMARSHALLING(ps) ) {
r_u-buffer = TALLOC_ARRAY(get_talloc_ctx(), uint8, 
r_u-buffer_size );
+   if (!r_u-buffer) {
+   return False;
+   }
+   }
 
if ( !prs_uint8s(True, buffer, ps, depth, r_u-buffer, 
r_u-buffer_size) )
return False;



svn commit: samba r16372 - in trunk/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 22:58:57 + (Mon, 19 Jun 2006)
New Revision: 16372

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

Log:
Fix Klocwork #1071.
Jeremy

Modified:
   trunk/source/rpc_parse/parse_samr.c


Changeset:
Modified: trunk/source/rpc_parse/parse_samr.c
===
--- trunk/source/rpc_parse/parse_samr.c 2006-06-19 22:55:03 UTC (rev 16371)
+++ trunk/source/rpc_parse/parse_samr.c 2006-06-19 22:58:57 UTC (rev 16372)
@@ -6471,8 +6471,14 @@
 void init_sam_user_info20A(SAM_USER_INFO_20 *usr, struct samu *pw)
 {
const char *munged_dial = pdb_get_munged_dial(pw);
-   DATA_BLOB blob = base64_decode_data_blob(munged_dial);
-   
+   DATA_BLOB blob;
+
+   if (munged_dial) {
+   blob = base64_decode_data_blob(munged_dial);
+   } else {
+   blob = data_blob(NULL, 0);
+   }
+
init_unistr2_from_datablob(usr-uni_munged_dial, blob);
init_uni_hdr(usr-hdr_munged_dial, usr-uni_munged_dial);
data_blob_free(blob);



svn commit: samba r16373 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 22:59:03 + (Mon, 19 Jun 2006)
New Revision: 16373

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

Log:
Fix Klocwork #1071.
Jeremy

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_samr.c2006-06-19 22:58:57 UTC 
(rev 16372)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_samr.c2006-06-19 22:59:03 UTC 
(rev 16373)
@@ -6471,8 +6471,14 @@
 void init_sam_user_info20A(SAM_USER_INFO_20 *usr, struct samu *pw)
 {
const char *munged_dial = pdb_get_munged_dial(pw);
-   DATA_BLOB blob = base64_decode_data_blob(munged_dial);
-   
+   DATA_BLOB blob;
+
+   if (munged_dial) {
+   blob = base64_decode_data_blob(munged_dial);
+   } else {
+   blob = data_blob(NULL, 0);
+   }
+
init_unistr2_from_datablob(usr-uni_munged_dial, blob);
init_uni_hdr(usr-hdr_munged_dial, usr-uni_munged_dial);
data_blob_free(blob);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 23:19:19 + (Mon, 19 Jun 2006)
New Revision: 16374

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

Log:
Klocwork #1670.
Jeremy.

Modified:
   trunk/source/lib/util_str.c


Changeset:
Modified: trunk/source/lib/util_str.c
===
--- trunk/source/lib/util_str.c 2006-06-19 22:59:03 UTC (rev 16373)
+++ trunk/source/lib/util_str.c 2006-06-19 23:19:19 UTC (rev 16374)
@@ -2251,15 +2251,21 @@
SMB_BIG_UINT val = -1;
const char *p = nptr;

-   while (p  *p  isspace(*p))
+   if (!p) {
+   *entptr = p;
+   return val;
+   }
+
+   while (*p  isspace(*p))
p++;
+
 #ifdef LARGE_SMB_OFF_T
sscanf(p,%llu,val);  
 #else /* LARGE_SMB_OFF_T */
sscanf(p,%lu,val);
 #endif /* LARGE_SMB_OFF_T */
if (entptr) {
-   while (p  *p  isdigit(*p))
+   while (*p  isdigit(*p))
p++;
*entptr = p;
}



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 23:19:24 + (Mon, 19 Jun 2006)
New Revision: 16375

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

Log:
Klocwork #1670.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_str.c
===
--- branches/SAMBA_3_0/source/lib/util_str.c2006-06-19 23:19:19 UTC (rev 
16374)
+++ branches/SAMBA_3_0/source/lib/util_str.c2006-06-19 23:19:24 UTC (rev 
16375)
@@ -2250,15 +2250,21 @@
SMB_BIG_UINT val = -1;
const char *p = nptr;

-   while (p  *p  isspace(*p))
+   if (!p) {
+   *entptr = p;
+   return val;
+   }
+
+   while (*p  isspace(*p))
p++;
+
 #ifdef LARGE_SMB_OFF_T
sscanf(p,%llu,val);  
 #else /* LARGE_SMB_OFF_T */
sscanf(p,%lu,val);
 #endif /* LARGE_SMB_OFF_T */
if (entptr) {
-   while (p  *p  isdigit(*p))
+   while (*p  isdigit(*p))
p++;
*entptr = p;
}



svn commit: samba r16376 - in trunk/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 23:21:41 + (Mon, 19 Jun 2006)
New Revision: 16376

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

Log:
Klocwork #1077.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: trunk/source/rpc_parse/parse_spoolss.c
===
--- trunk/source/rpc_parse/parse_spoolss.c  2006-06-19 23:19:24 UTC (rev 
16375)
+++ trunk/source/rpc_parse/parse_spoolss.c  2006-06-19 23:21:41 UTC (rev 
16376)
@@ -5005,11 +5005,16 @@
rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
src = skip_unibuf(src, 2*buf5-buf_len - 
PTR_DIFF(src,buf5-buffer));
*ar = SMB_REALLOC_ARRAY(*ar, fstring, n+2);
-   if (!*ar)
+   if (!*ar) {
return False;
+   }
fstrcpy((*ar)[n], f);
n++;
}
+   if (!*ar) {
+   return False;
+   }
+
fstrcpy((*ar)[n], );
  
return True;



svn commit: samba r16377 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-19 23:21:47 + (Mon, 19 Jun 2006)
New Revision: 16377

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

Log:
Klocwork #1077.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-06-19 23:21:41 UTC 
(rev 16376)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-06-19 23:21:47 UTC 
(rev 16377)
@@ -5005,11 +5005,16 @@
rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
src = skip_unibuf(src, 2*buf5-buf_len - 
PTR_DIFF(src,buf5-buffer));
*ar = SMB_REALLOC_ARRAY(*ar, fstring, n+2);
-   if (!*ar)
+   if (!*ar) {
return False;
+   }
fstrcpy((*ar)[n], f);
n++;
}
+   if (!*ar) {
+   return False;
+   }
+
fstrcpy((*ar)[n], );
  
return True;



Build status as of Tue Jun 20 00:00:02 2006

2006-06-19 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-06-19 
00:00:03.0 +
+++ /home/build/master/cache/broken_results.txt 2006-06-20 00:00:19.0 
+
@@ -1,18 +1,18 @@
-Build status as of Mon Jun 19 00:00:01 2006
+Build status as of Tue Jun 20 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
-ccache   36 5  0 
-distcc   40 5  0 
-lorikeet-heimdal 1  0  0 
+ccache   35 4  0 
+distcc   39 4  0 
+lorikeet-heimdal 2  0  0 
 ppp  20 0  0 
-rsync39 3  0 
-samba32 7  0 
+rsync38 2  0 
+samba31 8  0 
 samba-docs   0  0  0 
-samba4   44 31 7 
-samba_3_043 20 6 
-smb-build31 1  0 
-talloc   30 15 0 
-tdb  30 4  0 
+samba4   43 30 7 
+samba_3_042 20 4 
+smb-build29 1  0 
+talloc   30 14 0 
+tdb  27 4  0 
 


svn commit: samba r16378 - in branches/SAMBA_3_0/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 00:21:39 + (Tue, 20 Jun 2006)
New Revision: 16378

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

Log:
Klocwork #1079. Allow BUFFER5 to cope with a NULL
dependentfiles pointer.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-06-19 23:21:47 UTC 
(rev 16377)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c 2006-06-20 00:21:39 UTC 
(rev 16378)
@@ -4989,6 +4989,7 @@
  dynamically allocate memory
  
 /  
+
 static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
 {
fstring f;
@@ -4999,7 +5000,10 @@
return False;
 
src = (char *)buf5-buffer;
-   *ar = NULL;
+   *ar = SMB_MALLOC_ARRAY(fstring, 1);
+   if (!*ar) {
+   return False;
+   }
 
while (src  ((char *)buf5-buffer) + buf5-buf_len*2) {
rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
@@ -5011,18 +5015,12 @@
fstrcpy((*ar)[n], f);
n++;
}
-   if (!*ar) {
-   return False;
-   }
 
fstrcpy((*ar)[n], );
  
return True;
 }
 
-
-
-
 /***
  read a UNICODE array with null terminated strings 
  and null terminated array 
@@ -5120,9 +5118,6 @@
DRIVER_INFO_3 *info3)
 {
uint32  len = 0;
-   uint16  *ptr = info3-dependentfiles;
-   BOOLdone = False;
-   BOOLnull_char = False;
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *inf;
 
if (!(inf=TALLOC_ZERO_P(mem_ctx, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3)))
@@ -5147,31 +5142,35 @@
init_unistr2_from_unistr(inf-monitorname, info3-monitorname);
init_unistr2_from_unistr(inf-defaultdatatype, 
info3-defaultdatatype);
 
-   while (!done)
-   {
-   switch (*ptr)
-   {
-   case 0:
-   /* the null_char BOOL is used to help locate
-  two '\0's back to back */
-   if (null_char)
-   done = True;
-   else
-   null_char = True;
-   break;
+   if (info3-dependentfiles) {
+   BOOL done = False;
+   BOOL null_char = False;
+   uint16 *ptr = info3-dependentfiles;
+
+   while (!done) {
+   switch (*ptr) {
+   case 0:
+   /* the null_char BOOL is used to help 
locate
+  two '\0's back to back */
+   if (null_char) {
+   done = True;
+   } else {
+   null_char = True;
+   }
+   break;

-   default:
-   null_char = False;
-   ;;
-   break;  
+   default:
+   null_char = False;
+   break;  
+   }
+   len++;
+   ptr++;
}
-   len++;
-   ptr++;
}
+
inf-dependentfiles_ptr = (info3-dependentfiles != NULL) ? 1 : 0;
-   inf-dependentfilessize = len;
-   if(!make_spoolss_buffer5(mem_ctx, inf-dependentfiles, len, 
info3-dependentfiles))
-   {
+   inf-dependentfilessize = (info3-dependentfiles != NULL) ? len : 0;
+   if(!make_spoolss_buffer5(mem_ctx, inf-dependentfiles, len, 
info3-dependentfiles)) {
SAFE_FREE(inf);
return False;
}
@@ -5184,13 +5183,18 @@
 /***
  make a BUFFER5 struct from a uint16*
  **/
+
 BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, 
uint16 *src)
 {
 
buf5-buf_len = len;
-   if((buf5-buffer=(uint16*)TALLOC_MEMDUP(mem_ctx, src, 
sizeof(uint16)*len)) == NULL) {
-   DEBUG(0,(make_spoolss_buffer5: Unable to malloc memory for 
buffer!\n));
-   return False;
+   if (src) {
+   

svn commit: samba r16379 - in trunk/source/rpc_parse: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 00:21:44 + (Tue, 20 Jun 2006)
New Revision: 16379

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

Log:
Klocwork #1079. Allow BUFFER5 to cope with a NULL
dependentfiles pointer.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_spoolss.c


Changeset:
Modified: trunk/source/rpc_parse/parse_spoolss.c
===
--- trunk/source/rpc_parse/parse_spoolss.c  2006-06-20 00:21:39 UTC (rev 
16378)
+++ trunk/source/rpc_parse/parse_spoolss.c  2006-06-20 00:21:44 UTC (rev 
16379)
@@ -4989,6 +4989,7 @@
  dynamically allocate memory
  
 /  
+
 static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
 {
fstring f;
@@ -4999,7 +5000,10 @@
return False;
 
src = (char *)buf5-buffer;
-   *ar = NULL;
+   *ar = SMB_MALLOC_ARRAY(fstring, 1);
+   if (!*ar) {
+   return False;
+   }
 
while (src  ((char *)buf5-buffer) + buf5-buf_len*2) {
rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
@@ -5011,18 +5015,12 @@
fstrcpy((*ar)[n], f);
n++;
}
-   if (!*ar) {
-   return False;
-   }
 
fstrcpy((*ar)[n], );
  
return True;
 }
 
-
-
-
 /***
  read a UNICODE array with null terminated strings 
  and null terminated array 
@@ -5120,9 +5118,6 @@
DRIVER_INFO_3 *info3)
 {
uint32  len = 0;
-   uint16  *ptr = info3-dependentfiles;
-   BOOLdone = False;
-   BOOLnull_char = False;
SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *inf;
 
if (!(inf=TALLOC_ZERO_P(mem_ctx, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3)))
@@ -5147,31 +5142,35 @@
init_unistr2_from_unistr(inf-monitorname, info3-monitorname);
init_unistr2_from_unistr(inf-defaultdatatype, 
info3-defaultdatatype);
 
-   while (!done)
-   {
-   switch (*ptr)
-   {
-   case 0:
-   /* the null_char BOOL is used to help locate
-  two '\0's back to back */
-   if (null_char)
-   done = True;
-   else
-   null_char = True;
-   break;
+   if (info3-dependentfiles) {
+   BOOL done = False;
+   BOOL null_char = False;
+   uint16 *ptr = info3-dependentfiles;
+
+   while (!done) {
+   switch (*ptr) {
+   case 0:
+   /* the null_char BOOL is used to help 
locate
+  two '\0's back to back */
+   if (null_char) {
+   done = True;
+   } else {
+   null_char = True;
+   }
+   break;

-   default:
-   null_char = False;
-   ;;
-   break;  
+   default:
+   null_char = False;
+   break;  
+   }
+   len++;
+   ptr++;
}
-   len++;
-   ptr++;
}
+
inf-dependentfiles_ptr = (info3-dependentfiles != NULL) ? 1 : 0;
-   inf-dependentfilessize = len;
-   if(!make_spoolss_buffer5(mem_ctx, inf-dependentfiles, len, 
info3-dependentfiles))
-   {
+   inf-dependentfilessize = (info3-dependentfiles != NULL) ? len : 0;
+   if(!make_spoolss_buffer5(mem_ctx, inf-dependentfiles, len, 
info3-dependentfiles)) {
SAFE_FREE(inf);
return False;
}
@@ -5184,13 +5183,18 @@
 /***
  make a BUFFER5 struct from a uint16*
  **/
+
 BOOL make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, 
uint16 *src)
 {
 
buf5-buf_len = len;
-   if((buf5-buffer=(uint16*)TALLOC_MEMDUP(mem_ctx, src, 
sizeof(uint16)*len)) == NULL) {
-   DEBUG(0,(make_spoolss_buffer5: Unable to malloc memory for 
buffer!\n));
-   return False;
+   if (src) {
+   if((buf5-buffer=(uint16*)TALLOC_MEMDUP(mem_ctx, src, 
sizeof(uint16)*len)) == NULL) 

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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:00:33 + (Tue, 20 Jun 2006)
New Revision: 16380

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

Log:
Now samu can't be null don't check it on set. Klockwork
related fix.
Jeremy.

Modified:
   trunk/source/passdb/pdb_get_set.c


Changeset:
Modified: trunk/source/passdb/pdb_get_set.c
===
--- trunk/source/passdb/pdb_get_set.c   2006-06-20 00:21:44 UTC (rev 16379)
+++ trunk/source/passdb/pdb_get_set.c   2006-06-20 01:00:33 UTC (rev 16380)
@@ -328,101 +328,61 @@
 
 BOOL pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-   
sampass-acct_ctrl = acct_ctrl;
-
return pdb_set_init_flags(sampass, PDB_ACCTCTRL, flag);
 }
 
 BOOL pdb_set_logon_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logon_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_LOGONTIME, flag);
 }
 
 BOOL pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logoff_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_LOGOFFTIME, flag);
 }
 
 BOOL pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-kickoff_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_KICKOFFTIME, flag);
 }
 
 BOOL pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-bad_password_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_BAD_PASSWORD_TIME, flag);
 }
 
 BOOL pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_can_change_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_CANCHANGETIME, flag);
 }
 
 BOOL pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_must_change_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_MUSTCHANGETIME, flag);
 }
 
 BOOL pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_last_set_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_PASSLASTSET, flag);
 }
 
 BOOL pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state 
flag)
 {
-   if (!sampass)
-   return False;
-
sampass-hours_len = len;
-
return pdb_set_init_flags(sampass, PDB_HOURSLEN, flag);
 }
 
 BOOL pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logon_divs = hours;
-
return pdb_set_init_flags(sampass, PDB_LOGONDIVS, flag);
 }
 
@@ -435,9 +395,6 @@
  
 BOOL pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum 
pdb_value_state value_flag)
 {
-if (!sampass || !sampass)
-return False;
-
 if (!sampass-set_flags) {
if ((sampass-set_flags = 
bitmap_talloc(sampass, 
@@ -497,7 +454,7 @@
 
 BOOL pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum 
pdb_value_state flag)
 {
-   if (!sampass || !u_sid)
+   if (!u_sid)
return False;

sid_copy(sampass-user_sid, u_sid);
@@ -512,7 +469,7 @@
 {
DOM_SID new_sid;

-   if (!sampass || !u_sid)
+   if (!u_sid)
return False;
 
DEBUG(10, (pdb_set_user_sid_from_string: setting user sid %s\n,
@@ -543,7 +500,7 @@
 {
gid_t gid;
 
-   if (!sampass || !g_sid)
+   if (!g_sid)
return False;
 
if ( !(sampass-group_sid = TALLOC_P( sampass, DOM_SID )) ) {
@@ -572,9 +529,6 @@
 
 BOOL pdb_set_username(struct samu *sampass, const char *username, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
- 
if (username) { 
DEBUG(10, (pdb_set_username: setting username %s, was %s\n, 
username,
(sampass-username)?(sampass-username):NULL));
@@ -585,7 +539,6 @@
DEBUG(0, (pdb_set_username: talloc_strdup() 
failed!\n));
return False;
}
-
} else {
sampass-username = PDB_NOT_QUITE_NULL;
}
@@ -599,9 +552,6 @@
 
 BOOL pdb_set_domain(struct samu *sampass, const char *domain, enum 
pdb_value_state flag)
 {
-   if (!sampass)
- 

svn commit: samba r16381 - in branches/SAMBA_3_0/source/passdb: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:00:39 + (Tue, 20 Jun 2006)
New Revision: 16381

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

Log:
Now samu can't be null don't check it on set. Klockwork
related fix.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_get_set.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_get_set.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_get_set.c  2006-06-20 01:00:33 UTC 
(rev 16380)
+++ branches/SAMBA_3_0/source/passdb/pdb_get_set.c  2006-06-20 01:00:39 UTC 
(rev 16381)
@@ -328,101 +328,61 @@
 
 BOOL pdb_set_acct_ctrl(struct samu *sampass, uint32 acct_ctrl, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-   
sampass-acct_ctrl = acct_ctrl;
-
return pdb_set_init_flags(sampass, PDB_ACCTCTRL, flag);
 }
 
 BOOL pdb_set_logon_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logon_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_LOGONTIME, flag);
 }
 
 BOOL pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logoff_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_LOGOFFTIME, flag);
 }
 
 BOOL pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-kickoff_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_KICKOFFTIME, flag);
 }
 
 BOOL pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-bad_password_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_BAD_PASSWORD_TIME, flag);
 }
 
 BOOL pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_can_change_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_CANCHANGETIME, flag);
 }
 
 BOOL pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_must_change_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_MUSTCHANGETIME, flag);
 }
 
 BOOL pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-pass_last_set_time = mytime;
-
return pdb_set_init_flags(sampass, PDB_PASSLASTSET, flag);
 }
 
 BOOL pdb_set_hours_len(struct samu *sampass, uint32 len, enum pdb_value_state 
flag)
 {
-   if (!sampass)
-   return False;
-
sampass-hours_len = len;
-
return pdb_set_init_flags(sampass, PDB_HOURSLEN, flag);
 }
 
 BOOL pdb_set_logon_divs(struct samu *sampass, uint16 hours, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
-
sampass-logon_divs = hours;
-
return pdb_set_init_flags(sampass, PDB_LOGONDIVS, flag);
 }
 
@@ -435,9 +395,6 @@
  
 BOOL pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum 
pdb_value_state value_flag)
 {
-if (!sampass || !sampass)
-return False;
-
 if (!sampass-set_flags) {
if ((sampass-set_flags = 
bitmap_talloc(sampass, 
@@ -497,7 +454,7 @@
 
 BOOL pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum 
pdb_value_state flag)
 {
-   if (!sampass || !u_sid)
+   if (!u_sid)
return False;

sid_copy(sampass-user_sid, u_sid);
@@ -512,7 +469,7 @@
 {
DOM_SID new_sid;

-   if (!sampass || !u_sid)
+   if (!u_sid)
return False;
 
DEBUG(10, (pdb_set_user_sid_from_string: setting user sid %s\n,
@@ -543,7 +500,7 @@
 {
gid_t gid;
 
-   if (!sampass || !g_sid)
+   if (!g_sid)
return False;
 
if ( !(sampass-group_sid = TALLOC_P( sampass, DOM_SID )) ) {
@@ -572,9 +529,6 @@
 
 BOOL pdb_set_username(struct samu *sampass, const char *username, enum 
pdb_value_state flag)
 {
-   if (!sampass)
-   return False;
- 
if (username) { 
DEBUG(10, (pdb_set_username: setting username %s, was %s\n, 
username,
(sampass-username)?(sampass-username):NULL));
@@ -585,7 +539,6 @@
DEBUG(0, (pdb_set_username: talloc_strdup() 
failed!\n));
return False;
}
-
} else {
sampass-username = PDB_NOT_QUITE_NULL;
}
@@ -599,9 +552,6 @@
 
 BOOL pdb_set_domain(struct samu *sampass, const char 

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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:02:58 + (Tue, 20 Jun 2006)
New Revision: 16382

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

Log:
Klocwork #1086. No null deref.
Jeremy.

Modified:
   trunk/source/passdb/pdb_interface.c


Changeset:
Modified: trunk/source/passdb/pdb_interface.c
===
--- trunk/source/passdb/pdb_interface.c 2006-06-20 01:00:39 UTC (rev 16381)
+++ trunk/source/passdb/pdb_interface.c 2006-06-20 01:02:58 UTC (rev 16382)
@@ -1479,6 +1479,11 @@
 
unbecome_root();/* - EXIT BECOME_ROOT() */
*name = talloc_strdup(mem_ctx, pdb_get_username(sam_account));
+   if (!*name) {
+   TALLOC_FREE(sam_account);
+   return False;
+   }
+
*psid_name_use = SID_NAME_USER;
 
TALLOC_FREE(sam_account);



svn commit: samba r16383 - in branches/SAMBA_3_0/source/passdb: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:03:04 + (Tue, 20 Jun 2006)
New Revision: 16383

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

Log:
Klocwork #1086. No null deref.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_interface.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_interface.c
===
--- branches/SAMBA_3_0/source/passdb/pdb_interface.c2006-06-20 01:02:58 UTC 
(rev 16382)
+++ branches/SAMBA_3_0/source/passdb/pdb_interface.c2006-06-20 01:03:04 UTC 
(rev 16383)
@@ -1470,6 +1470,11 @@
 
unbecome_root();/* - EXIT BECOME_ROOT() */
*name = talloc_strdup(mem_ctx, pdb_get_username(sam_account));
+   if (!*name) {
+   TALLOC_FREE(sam_account);
+   return False;
+   }
+
*psid_name_use = SID_NAME_USER;
 
TALLOC_FREE(sam_account);



svn commit: samba r16384 - in branches/SOC/mkhl: .

2006-06-19 Thread mkhl
Author: mkhl
Date: 2006-06-20 01:08:18 + (Tue, 20 Jun 2006)
New Revision: 16384

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

Log:

Semi-informed doodling about a mapping module, affected by late
insights into local_password and password_hash concerning the scope of
mappings, the requirement for context and more asynchronism.

Martin

Added:
   branches/SOC/mkhl/map.txt


Changeset:
Added: branches/SOC/mkhl/map.txt
===
--- branches/SOC/mkhl/map.txt   2006-06-20 01:03:04 UTC (rev 16383)
+++ branches/SOC/mkhl/map.txt   2006-06-20 01:08:18 UTC (rev 16384)
@@ -0,0 +1,178 @@
+* An LDB Mapping Module -*- outline -*-
+
+** Scenario
+Usage of an instance of the map module requires tha full set of data
+to be split in two partitions, a local (fallback) and a remote
+(mapped) one.  The remote partition will be used to store additional
+data but may differ from the local partition in the schema it uses.
+The goal is to store as much data as possible on the remote partition.
+
+A user is required to define mappings between local and remote data
+schemas to account for these differences, but also to enable usage of
+the remote partition for as large a dataset as possible.
+
+Data not explicitly accounted for in the defined mappings is ignored
+by the remote partition and stored on the local partition instead.
+
+
+** Assumptions
+
+*** Mapped vs. Not Mapped
+Each record exists in either of two states:
+
+ Not mapped:
+The record and all of its data are stored on the local partition; the
+additional attribute isMapped is not present in the record.
+
+ Mapped:
+The record is split into a local and a remote part stored on the local
+and remote partition respectively; an additional internal attribute
+isMapped is added to the local part of the record.
+
+The local part of a mapped record is allowed to consist only of the
+isMapped attribute, denoting the case when all real data is mapped
+to the remote partition.
+
+*** Internal attribute isMapped
+The local part of each mapped record includes an internal attribute
+isMapped, the value of which might denote the DN of the remote part.
+It is not present in the local part of a record that is not
+mapped. (Or maybe it is but with a distinguished/empty value).
+
+The attribute is not visible from the outside(?) and cannot be
+modified directly.
+
+*** Local != Fallback
+Each attribute must either be mapped or ignored; the local part should
+be reserved for ignored data and not serve as fallback storage for
+failed mappings.
+
+Failure to map an attribute indicates a problem with the specified
+mappings and should be reported.
+
+*** No smart mapping
+The map module has no knowledge of constraints present in the backend
+of the remote partition, such as objectClass restrictions.
+
+Constraint violation results from the remote backend indicate a
+problem with the specified mappings and should be reported.
+
+*** Uniqueness of local names
+The specified mappings should be uniquely indexable by the local name
+of a handled attribute.
+
+Generation of multiple remote attributes from a single local attribute
+will be possible but should be defined in a single mapping to ease
+conversions from the remote to the local format (as for search
+responses).
+
+(This might be problematic for attributes that form a records RDN, as
+only one attribute can be used for that at a time...)
+
+*** Stable naming contexts
+Mappings must not tamper with the naming context of a record.  The
+naming context is (part of) what specifies the destination partition
+for a datase; its modification is defined globally in a special record
+of the map instance.
+
+
+** Mappings
+
+*** Abstractly
+A mapping represents, viewed abstractly, a function of type
+Request x Context -- Request
+
+The structure of LDB modules performs dispatching based on request
+type itself, so we can substitute the request contents for Request in
+that type.  Disregarding delete and rename requests, which contain
+only one or two target DNs, the contents of a request are of type LDB
+message, so we assume a type
+Message x Context -- Request
+
+The ldb_map module disregards context completely, modelling only
+functions 
+Message -- Message
+
+and a few restricted subforms of types
+Message Element -- Message Element
+
+or even just
+String -- String
+
+This is convenient for most cases and increases expressiveness of the
+mapping definition language but limits the overall power of
+mappings, as e.g. the password_hash module cannot currently be
+expressed with the ldb_map module due to lacking context (the domain
+data search result and the array `attrs' of the
+`password_hash_mod_search_self' function.
+
+The only way to access that data is by making (synchronous) LDB calls
+from within the attribute generation function.
+
+*** As Balls of Mud
+The canonical way to fetch context is to prefix the real 

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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:08:52 + (Tue, 20 Jun 2006)
New Revision: 16385

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

Log:
Klockwork #lots. Ensure talloc_get_type_abort aborts
if handed a NULL pointer, not returns NULL.
Jeremy.

Modified:
   trunk/source/lib/util.c


Changeset:
Modified: trunk/source/lib/util.c
===
--- trunk/source/lib/util.c 2006-06-20 01:08:18 UTC (rev 16384)
+++ trunk/source/lib/util.c 2006-06-20 01:08:52 UTC (rev 16385)
@@ -2845,9 +2845,6 @@
 {
void *result;
 
-   if (ptr == NULL)
-   return NULL;
-
result = talloc_check_name(ptr, name);
if (result != NULL)
return result;



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:08:57 + (Tue, 20 Jun 2006)
New Revision: 16386

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

Log:
Klockwork #lots. Ensure talloc_get_type_abort aborts
if handed a NULL pointer, not returns NULL.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===
--- branches/SAMBA_3_0/source/lib/util.c2006-06-20 01:08:52 UTC (rev 
16385)
+++ branches/SAMBA_3_0/source/lib/util.c2006-06-20 01:08:57 UTC (rev 
16386)
@@ -2845,9 +2845,6 @@
 {
void *result;
 
-   if (ptr == NULL)
-   return NULL;
-
result = talloc_check_name(ptr, name);
if (result != NULL)
return result;



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:12:40 + (Tue, 20 Jun 2006)
New Revision: 16387

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

Log:
Klocwork #320. Null deref.
Jeremy.

Modified:
   trunk/source/lib/debug.c


Changeset:
Modified: trunk/source/lib/debug.c
===
--- trunk/source/lib/debug.c2006-06-20 01:08:57 UTC (rev 16386)
+++ trunk/source/lib/debug.c2006-06-20 01:12:40 UTC (rev 16387)
@@ -513,6 +513,11 @@
 {
char *message = debug_list_class_names_and_levels();
 
+   if (!message) {
+   DEBUG(0,(debuglevel_message - 
debug_list_class_names_and_levels returned NULL\n));
+   return;
+   }
+
DEBUG(1,(INFO: Received REQ_DEBUGLEVEL message from PID %u\n,
 (unsigned int)procid_to_pid(src)));
message_send_pid(src, MSG_DEBUGLEVEL, message, strlen(message) + 1, 
True);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:12:44 + (Tue, 20 Jun 2006)
New Revision: 16388

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

Log:
Klocwork #320. Null deref.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/debug.c
===
--- branches/SAMBA_3_0/source/lib/debug.c   2006-06-20 01:12:40 UTC (rev 
16387)
+++ branches/SAMBA_3_0/source/lib/debug.c   2006-06-20 01:12:44 UTC (rev 
16388)
@@ -513,6 +513,11 @@
 {
char *message = debug_list_class_names_and_levels();
 
+   if (!message) {
+   DEBUG(0,(debuglevel_message - 
debug_list_class_names_and_levels returned NULL\n));
+   return;
+   }
+
DEBUG(1,(INFO: Received REQ_DEBUGLEVEL message from PID %u\n,
 (unsigned int)procid_to_pid(src)));
message_send_pid(src, MSG_DEBUGLEVEL, message, strlen(message) + 1, 
True);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:20:33 + (Tue, 20 Jun 2006)
New Revision: 16389

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

Log:
Klocwork #604 - ensure if NULL pointer we assert
if len != 0.
Jeremy.

Modified:
   trunk/source/lib/messages.c


Changeset:
Modified: trunk/source/lib/messages.c
===
--- trunk/source/lib/messages.c 2006-06-20 01:12:44 UTC (rev 16388)
+++ trunk/source/lib/messages.c 2006-06-20 01:20:33 UTC (rev 16389)
@@ -105,6 +105,7 @@
 void *buf, size_t len)
 {
const char *msg = buf ? buf : none;
+
DEBUG(1,(INFO: Received PING message from PID %s [%s]\n,
 procid_str_static(src), msg));
message_send_pid(src, MSG_PONG, buf, len, True);
@@ -198,6 +199,11 @@
char *ptr;
struct message_rec prec;
 
+   /* NULL pointer means implicit length zero. */
+   if (!buf) {
+   SMB_ASSERT(len == 0);
+   }
+
/*
 * Doing kill with a non-positive pid causes messages to be
 * sent to places we don't want.
@@ -209,7 +215,7 @@
rec.msg_type = msg_type;
rec.dest = pid;
rec.src = procid_self();
-   rec.len = len;
+   rec.len = buf ? len : 0;
 
kbuf = message_key_pid(pid);
 
@@ -218,7 +224,7 @@
return False;
 
memcpy(dbuf.dptr, rec, sizeof(rec));
-   if (len  0)
+   if (len  0  buf)
memcpy((void *)((char*)dbuf.dptr+sizeof(rec)), buf, len);
 
dbuf.dsize = len + sizeof(rec);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:20:38 + (Tue, 20 Jun 2006)
New Revision: 16390

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

Log:
Klocwork #604 - ensure if NULL pointer we assert
if len != 0.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/messages.c
===
--- branches/SAMBA_3_0/source/lib/messages.c2006-06-20 01:20:33 UTC (rev 
16389)
+++ branches/SAMBA_3_0/source/lib/messages.c2006-06-20 01:20:38 UTC (rev 
16390)
@@ -105,6 +105,7 @@
 void *buf, size_t len)
 {
const char *msg = buf ? buf : none;
+
DEBUG(1,(INFO: Received PING message from PID %s [%s]\n,
 procid_str_static(src), msg));
message_send_pid(src, MSG_PONG, buf, len, True);
@@ -198,6 +199,11 @@
char *ptr;
struct message_rec prec;
 
+   /* NULL pointer means implicit length zero. */
+   if (!buf) {
+   SMB_ASSERT(len == 0);
+   }
+
/*
 * Doing kill with a non-positive pid causes messages to be
 * sent to places we don't want.
@@ -209,7 +215,7 @@
rec.msg_type = msg_type;
rec.dest = pid;
rec.src = procid_self();
-   rec.len = len;
+   rec.len = buf ? len : 0;
 
kbuf = message_key_pid(pid);
 
@@ -218,7 +224,7 @@
return False;
 
memcpy(dbuf.dptr, rec, sizeof(rec));
-   if (len  0)
+   if (len  0  buf)
memcpy((void *)((char*)dbuf.dptr+sizeof(rec)), buf, len);
 
dbuf.dsize = len + sizeof(rec);



svn commit: samba r16391 - in trunk/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:25:27 + (Tue, 20 Jun 2006)
New Revision: 16391

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

Log:
Klockwork #1168. Protect against null deref.
Jeremy.

Modified:
   trunk/source/printing/printing_db.c


Changeset:
Modified: trunk/source/printing/printing_db.c
===
--- trunk/source/printing/printing_db.c 2006-06-20 01:20:38 UTC (rev 16390)
+++ trunk/source/printing/printing_db.c 2006-06-20 01:25:27 UTC (rev 16391)
@@ -55,7 +55,9 @@
/* Not found. */
if (num_open = MAX_PRINT_DBS_OPEN) {
/* Try and recycle the last entry. */
-   DLIST_PROMOTE(print_db_head, last_entry);
+   if (print_db_head  last_entry) {
+   DLIST_PROMOTE(print_db_head, last_entry);
+   }
 
for (p = print_db_head; p; p = p-next) {
if (p-ref_count)
@@ -72,7 +74,7 @@
memset(p-printer_name, '\0', sizeof(p-printer_name));
break;
}
-   if (p) {
+   if (p  print_db_head) {
DLIST_PROMOTE(print_db_head, p);
p = print_db_head;
}



svn commit: samba r16392 - in branches/SAMBA_3_0/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:25:31 + (Tue, 20 Jun 2006)
New Revision: 16392

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

Log:
Klockwork #1168. Protect against null deref.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/printing/printing_db.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/printing_db.c
===
--- branches/SAMBA_3_0/source/printing/printing_db.c2006-06-20 01:25:27 UTC 
(rev 16391)
+++ branches/SAMBA_3_0/source/printing/printing_db.c2006-06-20 01:25:31 UTC 
(rev 16392)
@@ -55,7 +55,9 @@
/* Not found. */
if (num_open = MAX_PRINT_DBS_OPEN) {
/* Try and recycle the last entry. */
-   DLIST_PROMOTE(print_db_head, last_entry);
+   if (print_db_head  last_entry) {
+   DLIST_PROMOTE(print_db_head, last_entry);
+   }
 
for (p = print_db_head; p; p = p-next) {
if (p-ref_count)
@@ -72,7 +74,7 @@
memset(p-printer_name, '\0', sizeof(p-printer_name));
break;
}
-   if (p) {
+   if (p  print_db_head) {
DLIST_PROMOTE(print_db_head, p);
p = print_db_head;
}



svn commit: samba r16393 - in branches/SAMBA_3_0/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:27:39 + (Tue, 20 Jun 2006)
New Revision: 16393

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

Log:
Klocwork #1164. Null deref.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/printing/print_generic.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/print_generic.c
===
--- branches/SAMBA_3_0/source/printing/print_generic.c  2006-06-20 01:25:31 UTC 
(rev 16392)
+++ branches/SAMBA_3_0/source/printing/print_generic.c  2006-06-20 01:27:39 UTC 
(rev 16393)
@@ -193,7 +193,7 @@
/* turn the lpq output into a series of job structures */
qcount = 0;
ZERO_STRUCTP(status);
-   if (numlines) {
+   if (numlines  qlines) {
queue = SMB_MALLOC_ARRAY(print_queue_struct, numlines+1);
if (!queue) {
file_lines_free(qlines);



svn commit: samba r16394 - in trunk/source/printing: .

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:27:42 + (Tue, 20 Jun 2006)
New Revision: 16394

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

Log:
Klocwork #1164. Null deref.
Jeremy.

Modified:
   trunk/source/printing/print_generic.c


Changeset:
Modified: trunk/source/printing/print_generic.c
===
--- trunk/source/printing/print_generic.c   2006-06-20 01:27:39 UTC (rev 
16393)
+++ trunk/source/printing/print_generic.c   2006-06-20 01:27:42 UTC (rev 
16394)
@@ -199,7 +199,7 @@
/* turn the lpq output into a series of job structures */
qcount = 0;
ZERO_STRUCTP(status);
-   if (numlines) {
+   if (numlines  qlines) {
queue = SMB_MALLOC_ARRAY(print_queue_struct, numlines+1);
if (!queue) {
file_lines_free(qlines);



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:32:45 + (Tue, 20 Jun 2006)
New Revision: 16395

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

Log:
Klocwork #1170. Null deref.
Jeremy.

Modified:
   trunk/source/lib/privileges.c


Changeset:
Modified: trunk/source/lib/privileges.c
===
--- trunk/source/lib/privileges.c   2006-06-20 01:27:42 UTC (rev 16394)
+++ trunk/source/lib/privileges.c   2006-06-20 01:32:45 UTC (rev 16395)
@@ -530,6 +530,10 @@
TDB_CONTEXT *tdb = get_account_pol_tdb();
PRIV_SID_LIST priv;

+   if (!tdb) {
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
ZERO_STRUCT(priv);
 
se_priv_copy( priv.privilege, se_priv_none );



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 01:32:50 + (Tue, 20 Jun 2006)
New Revision: 16396

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

Log:
Klocwork #1170. Null deref.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/privileges.c
===
--- branches/SAMBA_3_0/source/lib/privileges.c  2006-06-20 01:32:45 UTC (rev 
16395)
+++ branches/SAMBA_3_0/source/lib/privileges.c  2006-06-20 01:32:50 UTC (rev 
16396)
@@ -530,6 +530,10 @@
TDB_CONTEXT *tdb = get_account_pol_tdb();
PRIV_SID_LIST priv;

+   if (!tdb) {
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
ZERO_STRUCT(priv);
 
se_priv_copy( priv.privilege, se_priv_none );



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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 02:38:28 + (Tue, 20 Jun 2006)
New Revision: 16397

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

Log:
Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/message.c
   branches/SAMBA_3_0/source/smbd/negprot.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/process.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/sesssetup.c


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


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

2006-06-19 Thread jra
Author: jra
Date: 2006-06-20 02:38:34 + (Tue, 20 Jun 2006)
New Revision: 16398

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

Log:
Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.

Modified:
   trunk/source/smbd/message.c
   trunk/source/smbd/negprot.c
   trunk/source/smbd/nttrans.c
   trunk/source/smbd/process.c
   trunk/source/smbd/reply.c
   trunk/source/smbd/sesssetup.c


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


svn commit: samba r16399 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-06-19 Thread metze
Author: metze
Date: 2006-06-20 04:14:37 + (Tue, 20 Jun 2006)
New Revision: 16399

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

Log:
- split out pushing smb_fsinfo into a DATA_BLOB
- add error checks

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/trans2.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2006-06-20 02:38:34 UTC 
(rev 16398)
+++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2006-06-20 04:14:37 UTC 
(rev 16399)
@@ -237,131 +237,122 @@
return NT_STATUS_OK;
 }
 
-
-/*
-  trans2 qfsinfo implementation send
-*/
-static NTSTATUS trans2_qfsinfo_send(struct trans_op *op)
+static NTSTATUS trans2_push_fsinfo(struct smbsrv_request *req,
+  union smb_fsinfo *fsinfo,
+  TALLOC_CTX *mem_ctx,
+  DATA_BLOB *blob)
 {
-   struct smbsrv_request *req = op-req;
-   struct smb_trans2 *trans = op-trans;
-   union smb_fsinfo *fsinfo;
-   NTSTATUS status;
uint_t i;
DATA_BLOB guid_blob;
 
-   TRANS2_CHECK_ASYNC_STATUS(fsinfo, union smb_fsinfo);
-
switch (fsinfo-generic.level) {
case SMB_QFS_ALLOCATION:
-   trans2_setup_reply(trans, 0, 18, 0);
+   TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 18));
 
-   SIVAL(trans-out.data.data,  0, fsinfo-allocation.out.fs_id);
-   SIVAL(trans-out.data.data,  4, 
fsinfo-allocation.out.sectors_per_unit);
-   SIVAL(trans-out.data.data,  8, 
fsinfo-allocation.out.total_alloc_units);
-   SIVAL(trans-out.data.data, 12, 
fsinfo-allocation.out.avail_alloc_units);
-   SSVAL(trans-out.data.data, 16, 
fsinfo-allocation.out.bytes_per_sector);
+   SIVAL(blob-data,  0, fsinfo-allocation.out.fs_id);
+   SIVAL(blob-data,  4, fsinfo-allocation.out.sectors_per_unit);
+   SIVAL(blob-data,  8, fsinfo-allocation.out.total_alloc_units);
+   SIVAL(blob-data, 12, fsinfo-allocation.out.avail_alloc_units);
+   SSVAL(blob-data, 16, fsinfo-allocation.out.bytes_per_sector);
 
return NT_STATUS_OK;
 
case SMB_QFS_VOLUME:
-   trans2_setup_reply(trans, 0, 5, 0);
+   TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 5));
 
-   SIVAL(trans-out.data.data,   0, 
fsinfo-volume.out.serial_number);
+   SIVAL(blob-data,   0, fsinfo-volume.out.serial_number);
/* w2k3 implements this incorrectly for unicode - it
 * leaves the last byte off the string */
-   trans2_append_data_string(req, trans, trans-out.data, 
- fsinfo-volume.out.volume_name, 
- 4, STR_LEN8BIT|STR_NOALIGN);
+   TRANS2_CHECK(trans2_append_data_string(req, mem_ctx, blob,
+  
fsinfo-volume.out.volume_name, 
+  4, 
STR_LEN8BIT|STR_NOALIGN));
 
return NT_STATUS_OK;
 
case SMB_QFS_VOLUME_INFO:
case SMB_QFS_VOLUME_INFORMATION:
-   trans2_setup_reply(trans, 0, 18, 0);
+   TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 18));
 
-   push_nttime(trans-out.data.data, 0, 
fsinfo-volume_info.out.create_time);
-   SIVAL(trans-out.data.data,   8, 
fsinfo-volume_info.out.serial_number);
-   SSVAL(trans-out.data.data,  16, 0); /* padding */
-   trans2_append_data_string(req, trans, trans-out.data,
- fsinfo-volume_info.out.volume_name, 
- 12, STR_UNICODE);
+   push_nttime(blob-data, 0, fsinfo-volume_info.out.create_time);
+   SIVAL(blob-data,   8, 
fsinfo-volume_info.out.serial_number);
+   SSVAL(blob-data,  16, 0); /* padding */
+   TRANS2_CHECK(trans2_append_data_string(req, mem_ctx, blob,
+  
fsinfo-volume_info.out.volume_name, 
+  12, STR_UNICODE));
 
return NT_STATUS_OK;
 
case SMB_QFS_SIZE_INFO:
case SMB_QFS_SIZE_INFORMATION:
-   trans2_setup_reply(trans, 0, 24, 0);
+   TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 24));
 
-   SBVAL(trans-out.data.data,  0, 
fsinfo-size_info.out.total_alloc_units);
-   SBVAL(trans-out.data.data,  8, 
fsinfo-size_info.out.avail_alloc_units);
-   SIVAL(trans-out.data.data, 16, 
fsinfo-size_info.out.sectors_per_unit);
-   SIVAL(trans-out.data.data, 20, 

svn commit: samba r16400 - in branches/SAMBA_4_0/source/smb_server/smb: .

2006-06-19 Thread metze
Author: metze
Date: 2006-06-20 05:06:10 + (Tue, 20 Jun 2006)
New Revision: 16400

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

Log:
add more error checks

metze
Modified:
   branches/SAMBA_4_0/source/smb_server/smb/trans2.c


Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c
===
--- branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2006-06-20 04:14:37 UTC 
(rev 16399)
+++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c   2006-06-20 05:06:10 UTC 
(rev 16400)
@@ -117,11 +117,11 @@
  const char **str,
  int flags)
 {
+   *str = NULL;
/* we use STR_NO_RANGE_CHECK because the params are allocated
   separately in a DATA_BLOB, so we need to do our own range
   checking */
if (offset = blob-length) {
-   *str = NULL;
return 0;
}

@@ -456,7 +456,7 @@
 
TRANS2_CHECK_ASYNC_STATUS(io, union smb_open);
 
-   trans2_setup_reply(trans, 30, 0, 0);
+   TRANS2_CHECK(trans2_setup_reply(trans, 30, 0, 0));
 
smbsrv_push_fnum(trans-out.params.data, VWV(0), 
io-t2open.out.file.ntvfs);
SSVAL(trans-out.params.data, VWV(1), io-t2open.out.attrib);
@@ -481,7 +481,6 @@
 {
struct smb_trans2 *trans = op-trans;
union smb_open *io;
-   NTSTATUS status;
 
/* make sure we got enough parameters */
if (trans-in.params.length  29) {
@@ -505,9 +504,11 @@
io-t2open.in.eas  = NULL;
 
trans2_pull_blob_string(req, trans-in.params, 28, 
io-t2open.in.fname, 0);
+   if (io-t2open.in.fname == NULL) {
+   return NT_STATUS_FOOBAR;
+   }
 
-   status = ea_pull_list(trans-in.data, io, io-t2open.in.num_eas, 
io-t2open.in.eas);
-   NT_STATUS_NOT_OK_RETURN(status);
+   TRANS2_CHECK(ea_pull_list(trans-in.data, io, io-t2open.in.num_eas, 
io-t2open.in.eas));
 
op-op_info = io;
op-send_fn = trans2_open_send;
@@ -526,7 +527,7 @@
 
TRANS2_CHECK_ASYNC_STATUS_SIMPLE;
 
-   trans2_setup_reply(trans, 2, 0, 0);
+   TRANS2_CHECK(trans2_setup_reply(trans, 2, 0, 0));
 
SSVAL(trans-out.params.data, VWV(0), 0);
 
@@ -540,7 +541,6 @@
 {
struct smb_trans2 *trans = op-trans;
union smb_mkdir *io;
-   NTSTATUS status;
 
/* make sure we got enough parameters */
if (trans-in.params.length  5) {
@@ -552,11 +552,13 @@
 
io-t2mkdir.level = RAW_MKDIR_T2MKDIR;
trans2_pull_blob_string(req, trans-in.params, 4, 
io-t2mkdir.in.path, 0);
+   if (io-t2mkdir.in.path == NULL) {
+   return NT_STATUS_FOOBAR;
+   }
 
-   status = ea_pull_list(trans-in.data, io, 
- io-t2mkdir.in.num_eas, 
- io-t2mkdir.in.eas);
-   NT_STATUS_NOT_OK_RETURN(status);
+   TRANS2_CHECK(ea_pull_list(trans-in.data, io, 
+ io-t2mkdir.in.num_eas, 
+ io-t2mkdir.in.eas));
 
op-op_info = io;
op-send_fn = trans2_simple_send;
@@ -820,7 +822,6 @@
 {
struct smb_trans2 *trans = op-trans;
union smb_fileinfo *st;
-   NTSTATUS status;
uint16_t level;
 
/* make sure we got enough parameters */
@@ -845,10 +846,9 @@
}
 
if (st-generic.level == RAW_FILEINFO_EA_LIST) {
-   status = ea_pull_name_list(trans-in.data, req, 
-  st-ea_list.in.num_names,
-  st-ea_list.in.ea_names);
-   NT_STATUS_NOT_OK_RETURN(status);
+   TRANS2_CHECK(ea_pull_name_list(trans-in.data, req, 
+  st-ea_list.in.num_names,
+  st-ea_list.in.ea_names));
}
 
op-op_info = st;
@@ -865,7 +865,6 @@
 {
struct smb_trans2 *trans = op-trans;
union smb_fileinfo *st;
-   NTSTATUS status;
uint16_t level;
struct ntvfs_handle *h;
 
@@ -888,10 +887,9 @@
}
 
if (st-generic.level == RAW_FILEINFO_EA_LIST) {
-   status = ea_pull_name_list(trans-in.data, req, 
-  st-ea_list.in.num_names,
-  st-ea_list.in.ea_names);
-   NT_STATUS_NOT_OK_RETURN(status);
+   TRANS2_CHECK(ea_pull_name_list(trans-in.data, req, 
+  st-ea_list.in.num_names,
+  st-ea_list.in.ea_names));
}
 
op-op_info = st;
@@ -910,6 +908,7 @@
   const DATA_BLOB *blob)
 {
uint32_t len;
+   DATA_BLOB str_blob;
 
switch (st-generic.level) {
case RAW_SFILEINFO_GENERIC:
@@ -921,9