[Samba] [repost] problems with win98 and samba 3

2005-08-03 Thread kurt weiss

sorry if i repost this question, but it's urgent.
has somebody an idea?

if i broke any rules with this mail, please tell me, what's wrong with it.

thx in adv, gk

 Ursprüngliche Nachricht 
Betreff: [Samba] problems with win98 and samba 3
Datum: Fri, 29 Jul 2005 16:24:29 +0200
Von: kurt weiss [EMAIL PROTECTED]
An: 'samba@lists.samba.org' samba@lists.samba.org

we're using samba 3.0.11 (updated from 2.2.19)
after the update, the windows 98 machines all showing only the short
filenames on the server. (on other servers there are long filenames
still available).

can anybody give me an idea?

thx in advance
kurt

smb.conf:
==
[global]
# 2005-01-05 einbau wixp

#   vfs object = /opt/GData/lib/bdvfs228a.so

#   log level = 9
   log level = 1
   log file = /usr/local/samba/var/log.%m
   server string = PDC (%L) samba %v
   workgroup = 
   keepalive = 60
   guest account = nobody
   keep alive = 30
   os level = 65
   security = users
   encrypt passwords = yes
   add user script = /usr/sbin/useradd -d /dev/null -g100 -s /bin/false
-M %u
   netbios name = sv01samba

   printing = lprng
   printcap name = /etc/printcap
   load printers = yes
   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=33288
SO_RCVBUF=33288
#   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=16644
SO_RCVBUF=16644
#   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=8322
SO_RCVBUF=8322
   map to guest = Bad User
   local master = yes
   interfaces = ***
   bind interfaces only = yes
   hosts allow = ***

   wins support = no

   logon script =%G.bat

   domain logons = yes
   domain master = yes
   logon path = \\%N\profiles\%u
   logon drive = i:
   logon home = \\%N\ich
   admin users = root

   ###
   ###wixp

###use nameserver instead of...
   name resolve order = host lmhosts bcast
   disable spoolss = yes
   max protocol = LANMAN2
   time server = yes
   ###/wixp
   ###

[netlogon]
   comment = skripts fuer login
   browsable = yes
   path = /usr/smbdata/netlogon
   writable = yes
   create mask = 0744
   directory mask = 2744

[profiles]
   csc policy = disable
   browsable = no
#   nt acl support = no
   profile acls = yes
   path = /usr/smbdata/profiles
   writable = yes
   create mask = 0600
   directory mask = 0700

 [ich]
   comment = Heimatverzeichnis
   browseable = no
   read only = no
   create mask = 0750
   directory mask = 2750
   path = /usr/smbdata/daten/kwnet.at/%G/%U

 [cdrom]
   comment = Linux CD-ROM
   path = /cdrom
   read only = yes
   locking = no

 [floppy]
   comment = Linux CD-ROM
   path = /floppy
   read only = no
   locking = no

 [printers]
   printer admin = @edv
   comment = All Printers
   browseable = no
   printable = yes
   public = yes
   read only = no
   create mode = 0666
   path = /tmp
   use client driver = yes
   lpq command = /usr/bin/lpq -P%p
   lprm command = /usr/bin/lprm -P%p %j

...
==


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


[Samba] Samba printer connections showing as both hostname and IP address

2005-08-03 Thread Tim Edwards
We have an SMB Domain with a RHEL3 (fully updated) samba domain 
controller. For some reason on our Windows XP clients printers appear as 
both 'printername on samba' and 'printername on 192.168.1.1'. Has anyone 
else using samba had this issue? It all seems to work but I'd like to 
fix it since it reduces confusion for our users.


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


Re: [Samba] net join echoes root password

2005-08-03 Thread Robert Vangel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Heinrich Rebehn wrote:
 Hi list,
 
 # net join
 asks for the root password (seems to be new).
 This is not a problem, but when i do:
 # ssh [EMAIL PROTECTED] net join mydomain
 the root password is echoed on the terminal.
 Is this expected behaviour? (I hope not).

This is because you aren't allocating a terminal in your ssh session.

Add `-t' after ssh to force allocation of one, and it will work as-per
normal.

 
 Regards,
 
 Heinrich Rebehn
 
 University of Bremen
 Physics / Electrical and Electronics Engineering
 - Department of Telecommunications -
 
 Phone : +49/421/218-4664
 Fax   :-3341

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFC8GSDV63eDkW7v4cRAg8nAKCL7a8OAdzr/OSdBjmDaiXsU2Ke7gCggVHu
YCkM6teaoA2h8sDMtfohiAI=
=Amgu
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] net join echoes root password

2005-08-03 Thread Heinrich Rebehn

Robert Vangel wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Heinrich Rebehn wrote:


Hi list,

# net join
asks for the root password (seems to be new).
This is not a problem, but when i do:
# ssh [EMAIL PROTECTED] net join mydomain
the root password is echoed on the terminal.
Is this expected behaviour? (I hope not).



This is because you aren't allocating a terminal in your ssh session.

Add `-t' after ssh to force allocation of one, and it will work as-per
normal.


Thanks, this works. There's still things to learn..

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


[Samba] ntlm v2 as default auth method?

2005-08-03 Thread Burv
I'm trying to get ntlm v2 to be the default
authentication method, and I've only been able to get
ntlm v1 to work.  I tried doing google searches and
rtfm, but couldn't find anything that worked for ntlm
v2.
I tried 'client ntlmv2 auth = yes' in smb.conf, as
well as compiling with --with-ntlm-auth.

I've confirmed with a couple admins that it is in fact
ntlm v2, since it only doesn't work on machines that
have ntlm v1 disabled.  When it doesn't work, I get a
'network request not supported' on the Win2k client.

Do I have to configure with an option, so as to
compile correctly?  Or is it a setting in smb.conf?  I
thought I'd remembered reading that (ntlm v2) was
default in version 3.0.0, but I guess that may have
changed.  I'm running samba 3.0.14a. 




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] different browselists on multi homed server

2005-08-03 Thread Richard Zimmer
Scenario:
One Samba server with multiple network adapters each hooked to a
different network.

Question:
How can I configure Samba (nmdb) to show different shares when browsing
the Samba server from clients connected to the different networks?

Background:
The nmdb is always running in a single instance, doesn't matter how
often it is started.

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


SOLVED: [Samba] can't write to writeable drives FC4

2005-08-03 Thread Bill Measday
Thanks Sanjay, that does it!!!  I thought of SELinux but discounted it
(unfortunately) based on the assumption that there would be lots of FC4
upgrades by now and therefore this would be well known.

PLEASE NOTE:
You do not need to totally disable SELinux - there is a utility called
system-config-securitylevel (this is the same graphical tool one gets
under Gnome security level.  The SELinux tab lets you turn off
enforcement for specific daemons.  You only need to turn it off for smdb
(or at least that works for me).

Problem solved!

Thanks everyone who helped

Rgds

Bill

On Wed, 2005-08-03 at 10:15 +0530, Sanjay Upadhyay wrote: 
 check selinux... (FC4 has it by default!)
 #getenforce...
 in case this returns 1...
 diable it...
 
 On 8/3/05, Bill Measday [EMAIL PROTECTED] wrote:
  
  I think the relevant processes are listed below Pavel.
  
  UID PID PPID C STIME TTY TIME CMD
  root 6264 1 0 Aug02 ? 00:00:00 smbd -D
  root 6265 6264 0 Aug02 ? 00:00:00 smbd -D
  root 6267 1 0 Aug02 ? 00:00:03 nmbd -D
  bill 12214 4916 0 07:00 pts/2 00:00:00 smbclient //host/test
  -Ubill%deleted password
  bill 12215 6264 0 07:00 ? 00:00:00 smbd -D
  root 12216 6264 0 07:00 ? 00:00:00 smbd -D
  4776 0 07:01 pts/1 00:00:00 ps -Af
  
  
  Rgds
  
  
  Bill
  
  
  On Tue, 2005-08-02 at 16:22 +0200, Pavel Vávra wrote:
   Well, could you check ... sorry I am not able describe it in English, 
  I'll write it in Bash language :-) 
  
ps -Af | grep
  
   ... and check UID of selected processes.
  
   Regards,
   P.
  
  
   On Tue, 02 Aug 2005 22:24:34 +1000
   Bill Measday  [EMAIL PROTECTED] wrote:
  
And therein lies the problem - I've tried all these simple things and
the answer is eluding me (in other words, no problem creating 
  directory
directly from bash) 
   
Rgds
   
   
Bill
   
On Tue, 2005-08-02 at 14:12 +0200, Pavel Vávra wrote:
 On Tue, 02 Aug 2005 21:31:35 +1000
 Bill Measday  [EMAIL PROTECTED] wrote:

  What about permissions and owner of /data/bill?
  
   P. 
  
 
  drwxrwxrwx 4 bill net_users 4096 Jul 31 07:45 bill
 
  It doesn't seem to be anything quite as trivial as permissions, 
  but 
  then, who knows?
 

 Well, log to this machine as linux user bill and try to create file 
  and directory in /data/bill. If it will not work, check permissions of 
  /data. If it will work, I cannot find simple answer why.
 P.
   
   
  
  --
  To unsubscribe from this list go to the following URL and read the
  instructions: https://lists.samba.org/mailman/listinfo/samba
  
 
 -- 
 Sanjay Upadhyay
 http://saneax.blogspot.com

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


[Samba] Samba mount hangs after Firefox accessed file://

2005-08-03 Thread Bart Friederichs


Hi,

I have a very strange problem with samba: I mount a 'home' directory on 
my laptop from the server (both Linux; laptop runs Slackware 10.1, 
samba  3.0.14; server runs RHEL3, samba 3.0.7-1.3E). And during normal 
operation the share runs fine, until I access a file from the address 
field in Firefox (1.0.6) with the file:// protocol. This causes the 
share to hang. When trying to access it, I get a input/output error and 
dmesg shows:


smb_add_request: request [d3929e80, mid=50] timed out!

For every request.

I cannot unmount the share, not normally, not forced. Only after I 
unmounted the share 'lazy', and remount it, I can get back on it again.


How can I fix this?

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


SOLVED: [Samba] can't write to writeable drives - FC4

2005-08-03 Thread Bill Measday
Brilliant Sanjay - that does it.  I'd discounted SELinux as almost too
obvious - stupid me.

There's a utility called system-config-securitylevel (this is the same
one available under Gnome security level) that lets you turn off
SELinux for specific daemons (see SELinux tab).  Turn off smbd
enforcement and all is well (I don't know if nmbd or winbind will affect
other functionality).


Thanks to all.


Rgds


Bill


On Wed, 2005-08-03 at 10:15 +0530, Sanjay Upadhyay wrote:
 check selinux... (FC4 has it by default!)
 #getenforce...
 in case this returns 1...
 diable it...
 
 On 8/3/05, Bill Measday [EMAIL PROTECTED] wrote:
  
  I think the relevant processes are listed below Pavel.
  
  UID PID PPID C STIME TTY TIME CMD
  root 6264 1 0 Aug02 ? 00:00:00 smbd -D
  root 6265 6264 0 Aug02 ? 00:00:00 smbd -D
  root 6267 1 0 Aug02 ? 00:00:03 nmbd -D
  bill 12214 4916 0 07:00 pts/2 00:00:00 smbclient //host/test
  -Ubill%deleted password
  bill 12215 6264 0 07:00 ? 00:00:00 smbd -D
  root 12216 6264 0 07:00 ? 00:00:00 smbd -D
  4776 0 07:01 pts/1 00:00:00 ps -Af
  
  
  Rgds
  
  
  Bill
  
  
  On Tue, 2005-08-02 at 16:22 +0200, Pavel Vávra wrote:
   Well, could you check ... sorry I am not able describe it in English, 
  I'll write it in Bash language :-) 
  
ps -Af | grep
  
   ... and check UID of selected processes.
  
   Regards,
   P.
  
  
   On Tue, 02 Aug 2005 22:24:34 +1000
   Bill Measday  [EMAIL PROTECTED] wrote:
  
And therein lies the problem - I've tried all these simple things and
the answer is eluding me (in other words, no problem creating 
  directory
directly from bash) 
   
Rgds
   
   
Bill
   
On Tue, 2005-08-02 at 14:12 +0200, Pavel Vávra wrote:
 On Tue, 02 Aug 2005 21:31:35 +1000
 Bill Measday  [EMAIL PROTECTED] wrote:

  What about permissions and owner of /data/bill?
  
   P. 
  
 
  drwxrwxrwx 4 bill net_users 4096 Jul 31 07:45 bill
 
  It doesn't seem to be anything quite as trivial as permissions, 
  but 
  then, who knows?
 

 Well, log to this machine as linux user bill and try to create file 
  and directory in /data/bill. If it will not work, check permissions of 
  /data. If it will work, I cannot find simple answer why.
 P.
   
   
  
  --
  To unsubscribe from this list go to the following URL and read the
  instructions: https://lists.samba.org/mailman/listinfo/samba
  
 
 -- 
 Sanjay Upadhyay
 http://saneax.blogspot.com

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


Re: [Samba] wbinfo can't list users

2005-08-03 Thread Thomas Bork

Gerald (Jerry) Carter wrote:


Connecting to 192.168.100.111 at port 445
cli_nt_setup_creds: auth2 challenge failed NT_STATUS_ACCESS_DENIED
just_change_the_password: unable to setup creds
 (NT_STATUS_ACCESS_DENIED)!

No.  Would have to be something different.  Can you give me
some more information?  An ethereal trace perhaps?


Sorry, I don't have access to this network.
If the user is setting

client schannel = no

in smb.conf, the log looks like this:


[2005/08/03 09:51:59, 3] lib/util_sock.c:open_socket_out(867)
  Connecting to 192.168.100.111 at port 445
[2005/08/03 09:51:59, 3]
libsmb/trusts_util.c:trust_pw_change_and_store_it(83)
  2005/08/03 09:51:59 : trust_pw_change_and_store_it: Changed
password.
Joined domain ***.
[2005/08/03 09:51:59, 2] utils/net.c:main(873)
  return code = 0


But in event viewer of the DC:

Die Einrichtung einer Sitzung von Computer EISFAIR ist an der
Authentifizierung gescheitert. Der Kontoname in der
Sicherheitsdatenbank ist EISFAIR$. Folgender Fehler ist aufgetreten:
Zugriff verweigert


(authentification failed, access denied)


Would joining with debug level of 10 or 'net rpc testjoin' with -d 10 
help to track this down?



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


Re: [Samba] ntlm v2 as default auth method?

2005-08-03 Thread Burv
Actually, I found the following message, which may
answer my question, if it still holds true -
http://lists.samba.org/archive/samba/2004-February/080474.html.
 

Since I am using pass through authentication (I tried
joining it to the domain at my company, but was told
it wasn't allowed), I have security=server in the
smb.conf.  Is this still the case, i.e. is ntlm v2
authentication *not* supported for pass-through authentication?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Programatically Modifying Users

2005-08-03 Thread Nigel Rantor

Gerald (Jerry) Carter wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nigel Rantor wrote:
|
| - Is there a set of documentation around for the API?
| I can't seem to  find any on the samba site, the developer
| docs talk about the underlying protocols and provide
| starting points for that but I can't seem to find
| API docs.

Nope.  no api docs.  But what I would suggest is talking
to Chris Nichols on the samba-technical mailing list about
his libmsrpc work.  The better choice here in my opinion
would be to use the SAMR rpc functions and talk to smbd
directly.  you could also be doing us and the Samba
community a great service to help this mature.


Righto, joined that list today...

So, I can't find anything on SAMR rpc on the samba site, is this a very 
new bit of the project? Any good resources where I can find out more 
about it or is just talking to the samba-tech list first the way to go?



| - Is there an existing set of Java JNI wrappers for
| this kind of  functionality (I know, I'm reaching now...)

Nope.  But if you follow the line of thinking above, you
might be able to use jCIFS.


I have seen jCIFS, although in it's current state it only (AFAICT) 
supports the access of remote SMB shares. I haven't yet contacted the 
devs to see what else is in the works though or what it would take to add.



| - If I just want to access the SAM database functionality
| which bits of  Samba will i need to link against (of
| course, this will be easy to find out from trial-and-error)

Our code is not currently easy to pull parts from.  but if you
choose to follow the passdb API route, then look at the Makefile
for linking pdbedit.


Aye, already have been looking at it. One of my other issues at the 
moment is the GPL issues. Since the samba project has not been designed 
to have bits of it used by other code I need to ensure that whatever I 
do won't violate the GPL. The project I'm working on is not OSS at all, 
let alone GPL.


  n

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


Re: [Samba] Winbind Understanding

2005-08-03 Thread Michael Gasch

Is it possible for winbind to present smbfs or cifs mounted volumes in
linux with uid and gid's corresponding to the windows sids?  Thanks for
any information.

try to mount with cifs and uid/gid option (-o uid=winusers)

greez


--
Michael Gasch
Max Planck Institute for Evolutionary Anthropology
Department of Human Evolution
Deutscher Platz 6
D-04103 Leipzig
Germany

Phone: 49 (0)341 - 3550 137
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Winbind Understanding

2005-08-03 Thread Ryan Kather
 try to mount with cifs and uid/gid option (-o uid=winusers)

I think you misunderstand my intent.  Mounting with cifs and uid/gid
options, presents every file on the system as owned by the mounted user.

For Example;

mount -t cifs -o username=someuser,domain=THEDOMAIN,uid=10345,gid=10035
//WINDOWS/SHARE /mnt/SHARE

ls -al /mnt/SHARE/wugudp.dll

-rwxrwSrwt  1 THEDOMAIN\someuser THEDOMAIN\citrix users 49152 May 29  2002
wugudp.dll

getfacl wugudp.dll
# file: wugudp.dll
# owner: THEDOMAIN\134someuser
# group: THEDOMAIN\134citrix\040users
user::rwx
group::rw-
other::rwx

I am not looking to present the mounted filesystem with rights matching
the mounted user.  I am looking for a way to present the mounted
filesystem with the real windows users.  IE, if winbind says
THEDOMAIN\Administrator is uid 10369 The owner of wugudp.dll should be
10369 in the mounted cifs share.

Is there a way I can present the actual Windows owners and groups as Linux
owners and groups?  I thought this was the purpose of winbind with windows
ACL mapped to the Linux extended ACL.

 greez

Tell me about it :)

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


[Samba] tdbsam

2005-08-03 Thread Karapiperis Dimitris
Does anyone know if the tdbsam database gets updated when a user changes
her password through the passwd script?
In the old smbpasswd file in samba 2.x there was a pam module
pam_smbpasswd.so doing this job.
 
Thanks in advance
Dimitrios Karapiperis
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] permission problem

2005-08-03 Thread julius
server:

[global]
...
map to guest = bad user
security = share
guest account = nobody
...

[music]
comment = music
path=/mnt/music
writeable=yes
public=yes
guest only=yes

ls -l /mnt/
drwxr-xr-x   2 root root   48 25. Jun 18:04 music

mount /mnt/music
fstab entry:
/dev/hda2 /mnt/music auto
noauto,loop=/dev/loop0,encryption=AES128,gpgkey=keyfile.gpg 0 0

ls -l /mnt/music
drwxrwx---   4 music users 128 30. Jan 2005  My Insanity


client:
mount //ipaddress/music /mnt/music -t cifs -o rw

  my local user is in the group users
  ls -l  /mnt/music
  drwxrwx---   4 1001 users 0 30. Jan 2005  My Insanity
  cd /mnt/music/My\ Insanity  - works
  ls -l
  ls: dir .: no permission   (ls: lese Verzeichnis .: Keine
Berechtigung)


maybe it has something todo with the guest account, but i couldnt figure
that out.
basically i would like to mount a smb share over the network with my
local user whos is in group guest.
thx for any replys.

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


RE: [Samba] permission problem

2005-08-03 Thread Louis van Belle
in the last step
 my local user is in the group users
  ls -l  /mnt/music
  drwxrwx---   4 1001 users 0 30. Jan 2005  My Insanity
^^^ no everybody , is this correct, if so on 
this server/workstation, create a user with uid 1001 and your done
if possible, with the name music.

i did the same with a nfs mount. 
works perectly.
i use force user force group to set the corrected rights on my samba 
share.

Louis

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Namens julius
Verzonden: woensdag 3 augustus 2005 15:54
Aan: samba@lists.samba.org
Onderwerp: [Samba] permission problem

server:

[global]
...
map to guest = bad user
security = share
guest account = nobody
...

[music]
comment = music
path=/mnt/music
writeable=yes
public=yes
guest only=yes

ls -l /mnt/
drwxr-xr-x   2 root root   48 25. Jun 18:04 music

mount /mnt/music
fstab entry:
/dev/hda2 /mnt/music auto
noauto,loop=/dev/loop0,encryption=AES128,gpgkey=keyfile.gpg 0 0

ls -l /mnt/music
drwxrwx---   4 music users 128 30. Jan 2005  My Insanity


client:
mount //ipaddress/music /mnt/music -t cifs -o rw

  my local user is in the group users
  ls -l  /mnt/music
  drwxrwx---   4 1001 users 0 30. Jan 2005  My Insanity
  cd /mnt/music/My\ Insanity  - works
  ls -l
  ls: dir .: no permission   (ls: lese Verzeichnis .: Keine
Berechtigung)


maybe it has something todo with the guest account, but i 
couldnt figure
that out.
basically i would like to mount a smb share over the network with my
local user whos is in group guest.
thx for any replys.

greets
metalfan
-- 
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] Programatically Modifying Users

2005-08-03 Thread Jeremy Allison
On Wed, Aug 03, 2005 at 11:07:47AM +0100, Nigel Rantor wrote:
 
 Aye, already have been looking at it. One of my other issues at the 
 moment is the GPL issues. Since the samba project has not been designed 
 to have bits of it used by other code I need to ensure that whatever I 
 do won't violate the GPL. The project I'm working on is not OSS at all, 
 let alone GPL.

Then you can't link to Samba code. It's that simple. The Samba code
is not allowed to be used in proprietary software, you'll have to write
your own code.

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


[Samba] Quota on Windows Profile

2005-08-03 Thread Liew Toh Seng

Hi,

   I've problem to control the size for each users's windows profile. 
Is there anyway for me to set quota for users's profile ?

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


[Samba] Permissions

2005-08-03 Thread Jason Greene
I'm running Slackware 10.1 with the latests SAMBA package 
samba-3.0.14a-i486-1.tgz.


Here is my share info

[data]
comment = AP Data
path = /home/data
browseable = Yes
read only = No

My directory permissions are
drwsrws---  15 stownshend prepress 488 2005-08-03 09:20 1--Active\ Jobs/

1--Active\ Jobs's path is /home/data/jobs/1--Active\ Jobs


(I am not townshend) When I create a new folder in 1--Active\ Jobs 
It gets these permissions


drwxr-sr-x  2 jgreeneprepress   48 2005-08-03 09:20 test/

Files are acting the same way.

Why is this happening?  Shouldn't the new folder be created with 
drwsrws---  ?  Do I have to start using the force users/group in the 
share info ?





 Regards.

In Christ,

Jason Greene

Angelus Press
IT Manager
2915 Forest Avenue
Kansas City, MO  64109-1516
1.800.966.7337 x306
1.816.753.3557 (fax)
www.angeluspress.org
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] hosts allow and netbios names

2005-08-03 Thread Andreas Moroder

Hello,

when I set a name instead of a IP on the hosts allow parameter, does 
samba resolve the name using DNS or can it use the netbios name ( %m) of 
the client too ?


Thanks
Andreas

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


Re: [Samba] Quota on Windows Profile

2005-08-03 Thread M. Müller

Liew Toh Seng wrote:


Hi,

   I've problem to control the size for each users's windows profile. 
Is there anyway for me to set quota for users's profile ?


Hi,
yes there are two ways who could/should be used in conjunction:
1.: You can set the maximum profile-size using policies, for example 
using the microsoft policy editor (poledit, orktools) and a 
administrative template (system.adm e.g.). Create a NTConfig.POL with 
appropriate settings and store that in the [netlogon] share.
2.: use folder redirection, explained in detail in Mr. John Terpstra's 
famous Samba-Guide, to keep profiles small and minimize the danger of 
corrupted profiles.


Hope this helps,
Malte Müller
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] The Next Guide Will Be...

2005-08-03 Thread Dortch, Dustin

The Next Guide Will Be...
August 3rd, 2005

The next guide on Sambadmin will about creating a great LDAP
infrastructure. I have been disappointed that I have only
received two comments about what the next guide should be,
especially since the site has had over 500 visitors in the
past two days.

I came to this decision after reading my posts. I stated that
the core motivation behind all of this is LDAP. Sure, Samba IS 
great, but we can have file/print sharing on a Windows server.
What really takes the cake is to have tightly integrated
services, and this is made possible by LDAP.

So, if you have any comments you would like to make about what 
a completely integrated directory solution should include, do
not hesitate to comment. Here is what I will list, for
starters.

http://www.sambadmin.com/sambadmin/?postid=8
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] What's this error?

2005-08-03 Thread Dimitri Yioulos
Hello all.

Logwatch reports this:

 **Unmatched Entries**
 rpc_client/cli_netlogon.c:cli_nt_setup_creds(256)  cli_nt_setup_creds: 
request
challenge failed : 288 Time(s)

And syslog this:

Aug  3 04:09:48 hanover winbindd[1746]: [2005/08/03 04:09:48, 0]
rpc_client/cli_netlogon.c:cli_nt_setup_creds(256)
Aug  3 04:09:48 hanover winbindd[1746]:   cli_nt_setup_creds: request
challenge failed

What does it mean, and what's the fix?

Many thanks.

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


[Samba] Is anyone maintaining the smb filesystem?

2005-08-03 Thread Adrian Bunk
Is anyone maintaining the smb filesystem in the Linux kernel?

Emails to the Email address [EMAIL PROTECTED] of Urban Widmark that 
is listed in MAINTAINERS are bouncing.

Can anyone tell how to reach Urban and/or whether anyone is currently 
maintaining smbfs?

TIA
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

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


Re: [Samba] wbinfo can't list users

2005-08-03 Thread Thomas Bork

Thomas Bork wrote:


Connecting to 192.168.100.111 at port 445
cli_nt_setup_creds: auth2 challenge failed NT_STATUS_ACCESS_DENIED
just_change_the_password: unable to setup creds
 (NT_STATUS_ACCESS_DENIED)!

No.  Would have to be something different.  Can you give me
some more information?  An ethereal trace perhaps?

Sorry, I don't have access to this network.


The user made a ethereal trace (hope in the right format...). Should I 
send it per mail to you?


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


Re: [Samba] different browselists on multi homed server

2005-08-03 Thread John H Terpstra
On Wednesday 03 August 2005 02:34, Richard Zimmer wrote:
 Scenario:
 One Samba server with multiple network adapters each hooked to a
 different network.

 Question:
 How can I configure Samba (nmdb) to show different shares when browsing
 the Samba server from clients connected to the different networks?

Your subject says that you want different browse lists. That is NOT possible.
A browse list is the list of machines that are known to your network.

In your question you have asked for a different list of shares on the Samba 
server. So which is it? Browse list or share list?

The browse list can not be different, the shares lists can be. Follow chapter 
33 of the Samba3-HOWTO.pdf for insight into how you might achieve your goals.

Hint:
Use the netbios aliases option, for each alias create it's own smb.conf 
include file. Use one alias for each network. It can be restricted to its own 
network address by using the hosts allow and hosts deny facility. Each 
included smb.conf can have its own share definitions.


 Background:
 The nmdb is always running in a single instance, doesn't matter how
 often it is started.

Correct. And that is the way it was designed to be too.

Cheers,
John T.
-- 
John H Terpstra
Samba-Team Member
Phone: +1 (650) 580-8668

Author:
The Official Samba-3 HOWTO  Reference Guide, ISBN: 0131453556
Samba-3 by Example, ISBN: 0131472216
Hardening Linux, ISBN: 0072254971
Other books in production.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Documentation clarification re: SLES9 and nsswitch

2005-08-03 Thread John H Terpstra
On Tuesday 02 August 2005 23:03, Kevin B wrote:
 Hello,
 I've been unable to succeed with Samba-Ldap setup on SLES9 until this
 evening.
 I thought I had a PAM issue but that was not the case.
 To cut to the chase, I ran Yast's 'ldap-server' module without any changes
 as it found the ldap server settings.
 Once finished I could join the domain from XP Pro which is what I was
 unable to do.  I checked what Yast did and it
 reset /etc/nsswitch.conf -with- the 'compat' entries that are

Did you also check to see how yast2 configured your /etc/ldap.conf file?

 not to be used accorting to the 'Examples' Doc's:
 http://us1.samba.org/samba/docs/man/Samba-Guide/happy.html#sbehap-PAM-NSS
 [note the warning box re: Suse at 5.4-5.5]

You can use the SUSE provided method - but it is unique to SUSE Linux. The 
documentation provides a method of implementation that is fully portable 
across Linux systems.


 On my Centos4.1 box, the 'compat' lines were removed and the server
 works fine.
 On SLES9 I can only succeed with 'compat'. Remove them and it fails to
 find 'root' username to join.

Did you follow the diagnostic info provided in chapter 5? What did you find?

 Re: the Docs, I guess I assumed that Suse9 and SLES9 would act the same
 way. They must not.  I'll have to setup a Suse9 box to test it.

The devil is in all the details. I suggest that to get a handle on the 
differences you need to compare the SUSE yast2 generated configuration with 
the example configurations I provided in the Samba3-ByExample book.

Also, in chapter 5, section 5.3.1.7, you will find detailed diagnostic hints 
by which you can debug the LDAP/NSS configuration. Have fun!

 Can anyone verify this please?

What answer are you looking for? How much more detail that I have already 
provided do you believe is needed to remove all doubt?

- John T.
-- 
John H Terpstra
Samba-Team Member
Phone: +1 (650) 580-8668

Author:
The Official Samba-3 HOWTO  Reference Guide, ISBN: 0131453556
Samba-3 by Example, ISBN: 0131472216
Hardening Linux, ISBN: 0072254971
Other books in production.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] The Next Guide Will Be...

2005-08-03 Thread John H Terpstra
On Wednesday 03 August 2005 09:28, Dortch, Dustin wrote:
 The Next Guide Will Be...
 August 3rd, 2005

 The next guide on Sambadmin will about creating a great LDAP
 infrastructure. I have been disappointed that I have only
 received two comments about what the next guide should be,
 especially since the site has had over 500 visitors in the
 past two days.

Dustin,

Do not get disappointed, two comments out of 500 visits is fantastic!

I've had a few contributions to the Samba3-ByExample book since it was 
released. Your response rate is about double mine so far. The more important 
factor is the quality of the responses!

 I came to this decision after reading my posts. I stated that
 the core motivation behind all of this is LDAP. Sure, Samba IS
 great, but we can have file/print sharing on a Windows server.
 What really takes the cake is to have tightly integrated
 services, and this is made possible by LDAP.

If you want to get attention, be perfectly clear in respect of your 
objectives.

 So, if you have any comments you would like to make about what
 a completely integrated directory solution should include, do
 not hesitate to comment. Here is what I will list, for
 starters.

 http://www.sambadmin.com/sambadmin/?postid=8

Some focus point suggestions:

1. Improved LDAP management scripts

2. Improved LDAP schema designs

3. References and links to LDAP management tools - particularly cross-platform
(i.e., tools that work from a Windows client as well as a UNIX/Linux client)


Cheers,
John T.
-- 
John H Terpstra
Samba-Team Member
Phone: +1 (650) 580-8668

Author:
The Official Samba-3 HOWTO  Reference Guide, ISBN: 0131453556
Samba-3 by Example, ISBN: 0131472216
Hardening Linux, ISBN: 0072254971
Other books in production.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Error: The local policy of this system does not permit you to logon interactively

2005-08-03 Thread Benjamin Schell

Hi all,

I have been having a bit of trouble setting up my Samba 3-OpenLDAP 
PDC...This is something totally new to me (no previous Samba experience 
at all).  I've had several speedbumps, but I've finally got my setup 
almost complete.  I can join computers to the domain, however, if I try 
to logon with a user, I get the above error from Windows.  I can logon 
as a Domain Administrator, but if the user is a member of any other 
group, they cannot login. 

I have setup my machine to use LDAP for authentication via pam as well, 
and I am currently suspecting some issues with my group mappings, but 
I'm not sure.  This is my first experience with LDAP as well (and by 
extension pam_ldap, etc.), so it could be a possible issue there...


I'm not including any configs, but they can be posted easily.

Any and all help greatly appreciated! I've scoured for help and it could 
be something quite dumb/easy to fix.


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


Re: [Samba] NTLMv2 - wrong password with samba? (SOLVED)

2005-08-03 Thread Tim P
I am following the guide you wrote to incorporate an ipsec connection
through the poptop pptpd daemon and into a windows domain via samba.

I have followed it
(http://samba.org/ftp/unpacked/lorikeet/pppd/final-report.pdf) and am
getting the following with my dianostics:
[EMAIL PROTECTED] etc]# nmbd start
[EMAIL PROTECTED] etc]# winbindd start
[EMAIL PROTECTED] etc]# pptpd start
[EMAIL PROTECTED] etc]# wbinfo -p
Ping to winbindd succeeded on fd 4
[EMAIL PROTECTED] etc]# wbinfo -t
checking the trust secret via RPC calls succeeded
[EMAIL PROTECTED] etc]# ntlm_auth --username=user --domain=mydomain
password:
NT_STATUS_OK: Success (0x0)
[EMAIL PROTECTED] etc]# ntlm_auth --username=user --domain=mydomain 
--diagnostics
password:
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test NTLMv2 failed!
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test NTLMv2 and LMv2 failed!
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test LMv2 failed!
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test NTLMv2 and LMv2, LMv2 broken failed!
Wrong Password (0xc06a)
Wrong Password (0xc06a)
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test Plaintext failed!
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test Plaintext LM broken failed!
Wrong Password (0xc06a)
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test Plaintext NT only failed!
Wrong Password (0xc06a)
[2005/08/03 15:36:50, 1] utils/ntlm_auth_diagnostics.c:diagnose_ntlm_auth(594)
  Test Plaintext LM only failed!
[EMAIL PROTECTED] etc]#

Here is the relavant part of my smb.conf also:
[global]
   workgroup = MYDOMAIN
   realm = MYDOMAIN.ORG
   security = ads
   client NTLMv2 auth = yes

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


[Samba] Mapping HPUX to Windows Shared Directories

2005-08-03 Thread Tony Gardner
I need to know what the command would be to map an HPUX directory to a Windows 
shared directory.

I am running Samba 3.0.7 on HPUX 11i and have Windows Server 2003.

Any help would be greatly appreciated.

Regards,

Tony Gardner
UNIX Contractor
Haas Automation, Inc.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] LDAP, uidNumber, SID

2005-08-03 Thread Martin Renner
Hi.

I am upgrading a Samba 2.2 PDC (using smbpasswd as its user backend) to
Samba 3.0 with LDAP.

The current user uids and machine account uids are quite messed up. As
the LDAP database stores the uid *and* the SID of each user and machine
account, I would like to know if it would be possible to renumber the
uids (uidNumber of samba.schema). The SID would remain unchanged (by
using the formula oldUid * 2 + 1000).

Is this possible without losing account information or machine trusts?
The accounts are not used for unix logins, only for the Samba PDC and
Windows clients. IMHO changing the uidNumber should not affect the
Windows clients since they see just the SID which would remain
unchanged. Or am I wrong?


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


Re: [Samba] Programatically Modifying Users

2005-08-03 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nigel Rantor wrote:

 So, I can't find anything on SAMR rpc on the samba site, 
 is this a very new bit of the project? Any good resources
 where I can find out more about it or is just talking
 to the samba-tech list first the way to go?

Start by looking at the Samba code.  The samr pipe is used
for managing user and group accounts.  For example, connect
to a Samba server with usrmgr.exe and watch the traffic using
ethereal.

 I have seen jCIFS, although in it's current state it 
 only (AFAICT) supports the access of remote SMB shares. I
 haven't yet contacted the devs to see what else is in the
 works though or what it would take to add.

I just verified this week that Mike is working on rpc support
(hey Mike! :-)) but has some more work to do on it before
the feature is available in a release.

 Aye, already have been looking at it. One of my other 
 issues at the moment is the GPL issues. Since the samba
 project has not been designed to have bits of it used by other
 code I need to ensure that whatever I do won't violate the
 GPL. The project I'm working on is not OSS at all, let alone GPL.

Sorry.   Can't use any Samba code in that case.  Are we
talking about a Unix/Linux application here ?  or a Windows
management tool for Samba?  You would write your client
on Win32 pretty easy since the API calls are already there.
If you are working on Unix, your only hope is to write your
own dce/rpc library or maybe find one that is useable
under a license sompatiable with your work.

Note that the Samba4 IDL files (not the actual code or
pidl itseld) are available for use under more liberal
license.  You could write your own IDL compiler and use those.




cheers, jerry
=
Alleviating the pain of Windows(tm)  --- http://www.samba.org
GnuPG Key- http://www.plainjoe.org/gpg_public.asc
I never saved anything for the swim back. Ethan Hawk in Gattaca
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC8WL+IR7qMdg1EfYRAiZWAKCNjRQB23Zn7lgEKH6rC+UiraOulgCgzJ4c
atOZx0IY1nTUbcwPVdBX38w=
=1rlt
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Documentation clarification re: SLES9 and nsswitch

2005-08-03 Thread Kevin B
 On Tuesday 02 August 2005 23:03, Kevin B wrote:
 Hello,
 I've been unable to succeed with Samba-Ldap setup on SLES9 until this
 evening.
 I thought I had a PAM issue but that was not the case.
 To cut to the chase, I ran Yast's 'ldap-server' module without any
 changes
 as it found the ldap server settings.
 Once finished I could join the domain from XP Pro which is what I was
 unable to do.  I checked what Yast did and it
 reset /etc/nsswitch.conf -with- the 'compat' entries that are

Hello, Thanks for taking the time to respond.

 Did you also check to see how yast2 configured your /etc/ldap.conf file?

Looks like it didn't touch it. It's as I left it. I never used Yast until
yesterday as the doc's don't use it.
Everything was done with vi.


 not to be used according to the 'Examples' Doc's:
 http://us1.samba.org/samba/docs/man/Samba-Guide/happy.html#sbehap-PAM-NSS
 [note the warning box re: Suse at 5.4-5.5]

 You can use the SUSE provided method - but it is unique to SUSE Linux. The
 documentation provides a method of implementation that is fully portable
 across Linux systems.

That's why I was concerned I had a problem unique to SLES9.


 On my Centos4.1 box, the 'compat' lines were removed and the server
 works fine.
 On SLES9 I can only succeed with 'compat'. Remove them and it fails to
 find 'root' username to join.

 Did you follow the diagnostic info provided in chapter 5? What did you
 find?

getent worked.
I missed the test of 'id'.
Everything else seemed to work normally.

 Re: the Docs, I guess I assumed that Suse9 and SLES9 would act the same
 way. They must not.  I'll have to setup a Suse9 box to test it.

 The devil is in all the details. I suggest that to get a handle on the
 differences you need to compare the SUSE yast2 generated configuration
 with
 the example configurations I provided in the Samba3-ByExample book.

 Also, in chapter 5, section 5.3.1.7, you will find detailed diagnostic
 hints
 by which you can debug the LDAP/NSS configuration. Have fun!

I've read it many times. I'll read it again.

 Can anyone verify this please?

 What answer are you looking for? How much more detail that I have already
 provided do you believe is needed to remove all doubt?

 - John T.

Just looking to see if anyone else on SLES9 had to use 'compat' in nsswitch.
I wonder if I must have something else wrong to have it only working with
the 'compat' lines in nsswitch. Your response is very clear and
I have no doubt since I see it working on 2 platforms.
The documentation is very thorough and very appreciated.
I hope my question didn't come across as complaining.
Emails can sometimes come across with a different tone than intended.
I'm grateful for all the work you do.
'My' issue is getting more familiar with Suse as you stated above.
I'm sure someone else will make the errors I've made and have to resolve
them the way I did.  My goal is to learn this correctly
and have some fun in the process.
Thank you for your help.
Sincerly,
Kevin B

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


[Samba] Is this getting to list

2005-08-03 Thread Dominic Iadicicco
I don't think I am getting to the list
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] SAMBA LOG: tdb/tdbutil.c:tdb_log(725) tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835, 457947) is already open in this process

2005-08-03 Thread Freitas
Please, What's this?
 
Please, please, how to resolve ?

 

 

[EMAIL PROTECTED] samba]# more nmbd.log

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

[2005/08/04 00:12:51, 2] tdb/tdbutil.c:tdb_log(725)

  tdb(unnamed): tdb_open_ex: /var/cache/samba/unexpected.tdb (835,457947) is
alr

eady open in this process

--Mais--(52%)

 

   Tanks

 



Renato Freitas

Tecnologia em Segurança da Informação

(61)9275-8047

 

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


svn commit: samba r8992 - in branches/SAMBA_3_0/source: . script/tests

2005-08-03 Thread jerry
Author: jerry
Date: 2005-08-03 06:24:28 + (Wed, 03 Aug 2005)
New Revision: 8992

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

Log:
More make test work.  Adding a way to order tests (might change 
my mind on this later).


Added:
   branches/SAMBA_3_0/source/script/tests/functions
   branches/SAMBA_3_0/source/script/tests/t_001.sh
Removed:
   branches/SAMBA_3_0/source/script/tests/t_listing.sh
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/script/tests/runtests.sh


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2005-08-03 05:51:50 UTC (rev 
8991)
+++ branches/SAMBA_3_0/source/Makefile.in   2005-08-03 06:24:28 UTC (rev 
8992)
@@ -776,7 +776,7 @@
 ##
 test: all
@echo Running Samba 3 Test suite
-   sh ./script/tests/runtests.sh t_dir
+   @sh ./script/tests/runtests.sh t_dir
 
 
 # These dependencies are only approximately correct: we want to make

Added: branches/SAMBA_3_0/source/script/tests/functions
===
--- branches/SAMBA_3_0/source/script/tests/functions2005-08-03 05:51:50 UTC 
(rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/functions2005-08-03 06:24:28 UTC 
(rev 8992)
@@ -0,0 +1,4 @@
+##
+## library file for test functions
+##
+

Modified: branches/SAMBA_3_0/source/script/tests/runtests.sh
===
--- branches/SAMBA_3_0/source/script/tests/runtests.sh  2005-08-03 05:51:50 UTC 
(rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/runtests.sh  2005-08-03 06:24:28 UTC 
(rev 8992)
@@ -1,21 +1,28 @@
 #!/bin/sh
 
-DOMAIN=SAMBA-TEST
-export DOMAIN
-
 if [ x$1 == x ]; then
echo $0 directory
exit 1
 fi
 
+##
+## create the test directory
+##
 PREFIX=`echo $1 | sed s+//+/+`
-
 mkdir -p $PREFIX || exit $?
 OLD_PWD=`pwd`
 cd $PREFIX || exit $?
 export PREFIX_ABS=`pwd`
 cd $OLD_PWD
 
+##
+## setup the various environment variables we need
+##
+
+DOMAIN=SAMBA-TEST
+
+SRCDIR=`pwd`
+SCRIPTDIR=$SRCDIR/script/tests
 TMPDIR=$PREFIX_ABS/tmp
 LIBDIR=$PREFIX_ABS/lib
 PIDDIR=$PREFIX_ABS/pid
@@ -31,11 +38,17 @@
 rm -rf $PREFIX/*
 mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR 
$SOCKET_WRAPPER_DIR
 
-export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR
+export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN
 export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR
+export SRCDIR SCRIPTDIR
 
-cd script/tests
-for testfile in t_*sh; do
+for testfile in `ls $SCRIPTDIR/t_*sh | sort`; do
+   echo  Starting test driver `basename $testfile` 
sh $testfile
+   if [ $? = 0 ]; then
+   echo  test ok 
+   else
+   echo  test failed 
+   fi
 done
 

Copied: branches/SAMBA_3_0/source/script/tests/t_001.sh (from rev 8991, 
branches/SAMBA_3_0/source/script/tests/t_listing.sh)
===
--- branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 05:51:50 UTC 
(rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/t_001.sh 2005-08-03 06:24:28 UTC 
(rev 8992)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+. $SCRIPTDIR/functions
+
+cat $CONFFILEEOF
+[global]
+   netbios name = LOCALHOST
+   workgroup = $DOMAIN
+
+   private dir = $PRIVATEDIR
+   pid directory = $PIDDIR
+   lock directory = $LOCKDIR
+   log file = $LOGDIR/log.%m
+
+   interfaces = lo
+   bind interfaces only = yes
+
+   panic action = $PREFIX_ABS/script/tests/gdb_backtrace /proc/%d/exe %d
+
+[test]
+   path = $TMPDIR
+   read only = no
+EOF
+
+
+smbd $CONFIGURATION || exit $?
+sleep 1
+smbclient $CONFIGURATION -L localhost -N -p 139
+
+killall smbd

Deleted: branches/SAMBA_3_0/source/script/tests/t_listing.sh
===
--- branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 05:51:50 UTC 
(rev 8991)
+++ branches/SAMBA_3_0/source/script/tests/t_listing.sh 2005-08-03 06:24:28 UTC 
(rev 8992)
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-cat $CONFFILEEOF
-[global]
-   netbios name = LOCALHOST
-   workgroup = $DOMAIN
-
-   private dir = $PRIVATEDIR
-   pid directory = $PIDDIR
-   lock directory = $LOCKDIR
-   log file = $LOGDIR/log.%m
-
-   interfaces = lo
-   bind interfaces only = yes
-
-   panic action = $PREFIX_ABS/script/tests/gdb_backtrace /proc/%d/exe %d
-
-[test]
-   path = $TMPDIR
-   read only = no
-EOF
-
-
-smbd $CONFIGURATION || exit $?
-sleep 1
-smbclient $CONFIGURATION -L localhost -N -p 139
-
-killall smbd



svn commit: samba r8993 - in trunk/source: include locking smbd

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-03 06:28:18 + (Wed, 03 Aug 2005)
New Revision: 8993

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

Log:
No-oplock opens don't conflict with level2 oplocks at open time, an exclusive
oplock request grants level2 when there's no-oplock opens around. The previous
code informed all non-oplock opens when a level2 was granted, so the level2
could be informed upon change.

Jeremy had the idea that we internally grant level2 even if the client does
not request an oplock, we just don't tell the client. This simplifies the code
even further. I wonder how simple this can get

Jeremy, please take a look at it quite closely, it's after 11pm right now.

Thanks,

Volker

Modified:
   trunk/source/include/messages.h
   trunk/source/include/smb.h
   trunk/source/locking/locking.c
   trunk/source/smbd/files.c
   trunk/source/smbd/nttrans.c
   trunk/source/smbd/open.c
   trunk/source/smbd/oplock.c


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


svn commit: samba r8994 - in branches/SAMBA_4_0/source: build/smb_build heimdal_build

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-03 06:43:06 + (Wed, 03 Aug 2005)
New Revision: 8994

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

Log:
Clean up some more autogenerated files so I can predict when I'm going to 
break the build...

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/heimdal_build/et_deps.pl


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
06:28:18 UTC (rev 8993)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
06:43:06 UTC (rev 8994)
@@ -248,11 +248,10 @@
my ($var,$ctx) = @_;
 
my $tmplist = array2oneperline($ctx-{OBJ_LIST});
+   return  if ($tmplist eq );
 
return  __EOD__;
-# $var $ctx-{NAME} OBJ LIST
 $var\_$ctx-{NAME}_OBJS =$tmplist
-
 __EOD__
 }
 
@@ -261,6 +260,7 @@
my ($var,$ctx) = @_;
 
my $tmplist = array2oneperline($ctx-{CFLAGS});
+   return  if ($tmplist eq );
 
return  __EOD__;
 $var\_$ctx-{NAME}_CFLAGS =$tmplist
@@ -298,7 +298,6 @@
 
$output =  __EOD__;
 LIBRARY_$ctx-{NAME}_DEPEND_LIST =$tmpdepend
-#
 LIBRARY_$ctx-{NAME}_SHARED_LINK_LIST =$tmpshlink
 LIBRARY_$ctx-{NAME}_SHARED_LINK_FLAGS =$tmpshflag
 #
@@ -502,9 +501,13 @@
@echo Removing generated files
@-rm -rf librpc/gen_*
@echo Removing generated ASN1 files
-   @-find heimdal/lib/asn1 -name 'asn1_*.[xc]' -exec rm -f '{}' \;
-   @-find heimdal/lib/gssapi -name 'asn1_*.[xc]' -exec rm -f '{}' \;
-   @-find heimdal/lib/hdb -name 'asn1_*.[xc]' -exec rm -f '{}' \;
+   @-find heimdal/lib/asn1 -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-find heimdal/lib/gssapi -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-find heimdal/lib/hdb -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-rm -f heimdal/lib/roken/vis.h heimdal/lib/roken/err.h
+   @-rm -f heimdal/lib/hdb/hdb_asn1.h
+   @-rm -f heimdal/lib/gssapi/spnego_asn1.h
+   @-rm -f heimdal/lib/asn1/krb5_asn1.h
 
 
 distclean: clean

Modified: branches/SAMBA_4_0/source/heimdal_build/et_deps.pl
===
--- branches/SAMBA_4_0/source/heimdal_build/et_deps.pl  2005-08-03 06:28:18 UTC 
(rev 8993)
+++ branches/SAMBA_4_0/source/heimdal_build/et_deps.pl  2005-08-03 06:43:06 UTC 
(rev 8994)
@@ -9,6 +9,7 @@
 my $header = $file; $header =~ s/\.et$/.h/;
 my $source = $file; $source =~ s/\.et$/.c/;
 print $source: $file bin/compile_et\n;
+print [EMAIL PROTECTED] \Compiling error table $file\\n;
 print [EMAIL PROTECTED] $dirname  ../../../bin/compile_et $basename\n\n;
 
 print $header: $source\n;



svn commit: samba r8995 - in branches/SAMBA_4_0/source: . heimdal_build

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-03 06:51:58 + (Wed, 03 Aug 2005)
New Revision: 8995

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

Log:
Add heimdal headers back to basics target... should fix the build for now

Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-03 06:43:06 UTC 
(rev 8994)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-03 06:51:58 UTC 
(rev 8995)
@@ -379,11 +379,11 @@
 # End BINARY compile_et
 ###
 
-heimdal/lib/roken/vis.hin: heimdal/lib/roken/vis.h
-   @cp heimdal/lib/roken/vis.h heimdal/lib/roken/vis.hin
+heimdal/lib/roken/vis.h: heimdal/lib/roken/vis.hin
+   @cp heimdal/lib/roken/vis.hin heimdal/lib/roken/vis.h
 
-heimdal/lib/roken/err.hin: heimdal/lib/roken/err.h
-   @cp heimdal/lib/roken/err.h heimdal/lib/roken/err.hin
+heimdal/lib/roken/err.h: heimdal/lib/roken/err.hin
+   @cp heimdal/lib/roken/err.hin heimdal/lib/roken/err.h
 
 include ./heimdal_build/asn1_deps.pl heimdal/lib/hdb/hdb.asn1 hdb_asn1|
 include ./heimdal_build/asn1_deps.pl heimdal/lib/gssapi/spnego.asn1 
spnego_asn1|

Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-03 06:43:06 UTC (rev 8994)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-03 06:51:58 UTC (rev 8995)
@@ -52,7 +52,7 @@
 include lib/replace/config.mk
 include scripting/ejs/config.mk
 
-all: binaries
+all: basics binaries
 binaries: $(BIN_PROGS) $(SBIN_PROGS)
 manpages: $(MANPAGES)
 everything: all
@@ -140,7 +140,7 @@
 pch_clean:
-rm -f include/includes.h.gch
 
-basics: idl proto_exists 
+basics: idl proto_exists heimdal/lib/hdb/hdb_asn1.h 
heimdal/lib/gssapi/spnego_asn1.h heimdal/lib/asn1/krb5_asn1.h 
heimdal/lib/roken/vis.h heimdal/lib/roken/err.h
 
 test: $(DEFAULT_TEST_TARGET)
 



svn commit: samba r8996 - in branches/SAMBA_4_0/source: . build/smb_build heimdal_build

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-03 07:06:09 + (Wed, 03 Aug 2005)
New Revision: 8996

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

Log:
More build fixes...

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
06:51:58 UTC (rev 8995)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
07:06:09 UTC (rev 8996)
@@ -491,7 +491,7 @@
 proto_test:
@[ -f $(builddir)/include/proto.h ] || $(MAKE) proto
 
-clean: delheaders
+clean: delheaders heimdal_clean
@echo Removing objects
@-find . -name '*.o' -exec rm -f '{}' \;
@echo Removing binaries
@@ -500,16 +500,11 @@
@-rm -f bin/.*_*
@echo Removing generated files
@-rm -rf librpc/gen_*
-   @echo Removing generated ASN1 files
-   @-find heimdal/lib/asn1 -name 'asn1_*.[c]' -exec rm -f '{}' \;
-   @-find heimdal/lib/gssapi -name 'asn1_*.[c]' -exec rm -f '{}' \;
-   @-find heimdal/lib/hdb -name 'asn1_*.[c]' -exec rm -f '{}' \;
-   @-rm -f heimdal/lib/roken/vis.h heimdal/lib/roken/err.h
-   @-rm -f heimdal/lib/hdb/hdb_asn1.h
-   @-rm -f heimdal/lib/gssapi/spnego_asn1.h
-   @-rm -f heimdal/lib/asn1/krb5_asn1.h
 
 
+
+
+
 distclean: clean
-rm -f bin/.dummy
-rm -f include/config.h include/smb_build.h

Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-03 06:51:58 UTC 
(rev 8995)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-03 07:06:09 UTC 
(rev 8996)
@@ -395,6 +395,21 @@
 include ./heimdal_build/et_deps.pl heimdal/lib/krb5/k524_err.et|
 include ./heimdal_build/et_deps.pl heimdal/lib/krb5/krb5_err.et|
 
+heimdal_clean:
+   @echo Removing generated ASN1 files
+   @-find heimdal/lib/asn1 -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-find heimdal/lib/gssapi -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-find heimdal/lib/hdb -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-rm -f heimdal/lib/roken/vis.h heimdal/lib/roken/err.h
+   @-rm -f heimdal/lib/hdb/hdb_asn1.h
+   @-rm -f heimdal/lib/gssapi/spnego_asn1.h
+   @-rm -f heimdal/lib/asn1/krb5_asn1.h
+   @-rm -f heimdal/lib/asn1/asn1_err.{c,h}
+   @-rm -f heimdal/lib/hdb/hdb_err.{c,h}
+   @-rm -f heimdal/lib/krb5/heim_err.{c,h}
+   @-rm -f heimdal/lib/krb5/k524_err.{c,h}
+   @-rm -f heimdal/lib/krb5/krb5_err.{c,h}
+
 ###
 # Start SUBSYSTEM HEIMDAL
 [SUBSYSTEM::HEIMDAL]

Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-03 06:51:58 UTC (rev 8995)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-03 07:06:09 UTC (rev 8996)
@@ -140,7 +140,7 @@
 pch_clean:
-rm -f include/includes.h.gch
 
-basics: idl proto_exists heimdal/lib/hdb/hdb_asn1.h 
heimdal/lib/gssapi/spnego_asn1.h heimdal/lib/asn1/krb5_asn1.h 
heimdal/lib/roken/vis.h heimdal/lib/roken/err.h
+basics: idl proto_exists heimdal/lib/hdb/hdb_asn1.h 
heimdal/lib/gssapi/spnego_asn1.h heimdal/lib/asn1/krb5_asn1.h 
heimdal/lib/roken/vis.h heimdal/lib/roken/err.h heimdal/lib/asn1/asn1_err.h 
heimdal/lib/hdb/hdb_err.h heimdal/lib/krb5/heim_err.h 
heimdal/lib/krb5/k524_err.h heimdal/lib/krb5/krb5_err.h
 
 test: $(DEFAULT_TEST_TARGET)
 



svn commit: samba r8997 - in branches/SAMBA_4_0/source/build/smb_build: .

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-03 07:17:14 + (Wed, 03 Aug 2005)
New Revision: 8997

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

Log:
Define CPP for hosts that don't default to 'cpp'

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
07:06:09 UTC (rev 8996)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
07:17:14 UTC (rev 8997)
@@ -89,6 +89,8 @@
 LEX=$config{LEX}
 YACC=$config{YACC}
 
+CPP=$config{CPP}
+
 DEFAULT_TEST_TARGET=$config{DEFAULT_TEST_TARGET}
 
 __EOD__



svn commit: samba r8998 - in branches/SAMBA_4_0/source/rpc_server: drsuapi netlogon

2005-08-03 Thread abartlet
Author: abartlet
Date: 2005-08-03 07:24:42 + (Wed, 03 Aug 2005)
New Revision: 8998

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

Log:
More work on the RPC server code to avoid abusing the name attribute
as a netbios name.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c
   branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c
===
--- branches/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c   
2005-08-03 07:17:14 UTC (rev 8997)
+++ branches/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c   
2005-08-03 07:24:42 UTC (rev 8998)
@@ -58,18 +58,19 @@
case DRSUAPI_DS_NAME_FORMAT_CANONICAL: {
char *str;
 
-   str = talloc_asprintf(mem_ctx, %s/, lp_realm());
+   str = talloc_strdup(mem_ctx, name);
WERR_TALLOC_CHECK(str);
-
-   ret = strcasecmp(str, name);
-   talloc_free(str);
-   if (ret != 0) {
-   info1-status = 
DRSUAPI_DS_NAME_STATUS_NOT_FOUND;
+   
+   if (strlen(str) == 0 || str[strlen(str)-1] != '/') {
+   info1-status = 
DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR;
return WERR_OK;
}
+   
+   str[strlen(str)-1] = '\0';
 
-   domain_filter = talloc_asprintf(mem_ctx, 
((objectClass=domainDNS)(name=%s)),
-   lp_workgroup());
+   domain_filter = talloc_asprintf(mem_ctx, 
+   
dnsRoot=%s)(objectclass=crossRef)))(nETBIOSName=*)(ncName=*)), 
+   str);
WERR_TALLOC_CHECK(domain_filter);
 
break;

Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 
2005-08-03 07:17:14 UTC (rev 8997)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 
2005-08-03 07:24:42 UTC (rev 8998)
@@ -1233,9 +1233,10 @@
 {
struct netr_DomainTrust *trusts;
void *sam_ctx;
-   int ret, i;
-   struct ldb_message **res;
-   const char * const attrs[] = { name, dnsDomain, objectSid, 
objectGUID, NULL };
+   int ret;
+   struct ldb_message **dom_res, **ref_res;
+   const char * const dom_attrs[] = { dnsDomain, objectSid, 
objectGUID, NULL };
+   const char * const ref_attrs[] = { nETBIOSName, NULL };
 
ZERO_STRUCT(r-out);
 
@@ -1244,39 +1245,47 @@
return WERR_GENERAL_FAILURE;
}
 
-   ret = gendb_search(sam_ctx, mem_ctx, NULL, res, attrs, 
(objectClass=domainDNS));
+   ret = gendb_search(sam_ctx, mem_ctx, NULL, dom_res, dom_attrs, 
((objectClass=domainDNS)(dnsDomain=%s)), lp_realm());
if (ret == -1) {
return WERR_GENERAL_FAILURE;
}
 
-   if (ret == 0) {
-   return WERR_OK;
+   if (ret != 1) {
+   return WERR_GENERAL_FAILURE;
}
 
+   ret = gendb_search(sam_ctx, mem_ctx, NULL, ref_res, ref_attrs, 
((objectClass=crossRef)(ncName=%s)), dom_res[0]-dn);
+   if (ret == -1) {
+   return WERR_GENERAL_FAILURE;
+   }
+
+   if (ret != 1) {
+   return WERR_GENERAL_FAILURE;
+   }
+
+
+
trusts = talloc_array(mem_ctx, struct netr_DomainTrust, ret);
if (trusts == NULL) {
return WERR_NOMEM;
}

-   r-out.count = ret;
+   r-out.count = 1;
r-out.trusts = trusts;
 
/* TODO: add filtering by trust_flags, and correct trust_type
   and attributes */
-   for (i=0;iret;i++) {
-   trusts[i].netbios_name = samdb_result_string(res[i], name, 
NULL);
-   trusts[i].dns_name = samdb_result_string(res[i], 
dnsDomain, NULL);
-   trusts[i].trust_flags = 
-   NETR_TRUST_FLAG_TREEROOT | 
-   NETR_TRUST_FLAG_IN_FOREST | 
-   NETR_TRUST_FLAG_PRIMARY;
-   trusts[i].parent_index = 0;
-   trusts[i].trust_type = 2;
-   trusts[i].trust_attributes = 0;
-   trusts[i].sid  = samdb_result_dom_sid(mem_ctx, res[i], 
objectSid);
-   trusts[i].guid = samdb_result_guid(res[i], objectGUID);
-   }
-   
+   trusts[0].netbios_name = samdb_result_string(ref_res[0], nETBIOSName, 
NULL);
+   trusts[0].dns_name = 

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

2005-08-03 Thread abartlet
Author: abartlet
Date: 2005-08-03 07:25:36 + (Wed, 03 Aug 2005)
New Revision: 8999

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

Log:
Use the timestamps module to ensure we update times.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0/source/setup/secrets.ldif
===
--- branches/SAMBA_4_0/source/setup/secrets.ldif2005-08-03 07:24:42 UTC 
(rev 8998)
+++ branches/SAMBA_4_0/source/setup/secrets.ldif2005-08-03 07:25:36 UTC 
(rev 8999)
@@ -8,6 +8,11 @@
 flatname: CASE_INSENSITIVE
 sAMAccountName: CASE_INSENSITIVE
 
+#Add modules to the list to activate them by default
+#beware often order is important
+dn: @MODULES
[EMAIL PROTECTED]: timestamps
+
 dn: CN=LSA Secrets
 objectClass: top
 objectClass: container



svn commit: samba r9000 - in trunk: .

2005-08-03 Thread jerry
Author: jerry
Date: 2005-08-03 15:22:24 + (Wed, 03 Aug 2005)
New Revision: 9000

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

Log:
9000th commit\!  w00t\!
Modified:
   trunk/WHATSNEW.txt


Changeset:
Modified: trunk/WHATSNEW.txt
===
--- trunk/WHATSNEW.txt  2005-08-03 07:25:36 UTC (rev 8999)
+++ trunk/WHATSNEW.txt  2005-08-03 15:22:24 UTC (rev 9000)
@@ -3,3 +3,6 @@
 
 This file is NOT maintained but will be created from new when this
 branch is released.
+
+
+w00t!



svn commit: samba r9001 - in branches/SAMBA_4_0/source/build/smb_build: .

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-03 16:13:44 + (Wed, 03 Aug 2005)
New Revision: 9001

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

Log:
Fix warning in make clean

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
15:22:24 UTC (rev 9000)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-03 
16:13:44 UTC (rev 9001)
@@ -497,16 +497,12 @@
@echo Removing objects
@-find . -name '*.o' -exec rm -f '{}' \;
@echo Removing binaries
-   @-rm -f bin/*
+   @-rm -f $(BIN_PROGS) $(SBIN_PROGS)
@echo Removing dummy targets
@-rm -f bin/.*_*
@echo Removing generated files
@-rm -rf librpc/gen_*
 
-
-
-
-
 distclean: clean
-rm -f bin/.dummy
-rm -f include/config.h include/smb_build.h



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 16:26:37 + (Wed, 03 Aug 2005)
New Revision: 9002

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

Log:
a workaround for the current build problems. I hope this will allow
the build farm hosts to build again.

Jelmer, please feel free to remove this once you have the correct
dependencies sorted out

Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-03 16:13:44 UTC (rev 9001)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-03 16:26:37 UTC (rev 9002)
@@ -52,7 +52,7 @@
 include lib/replace/config.mk
 include scripting/ejs/config.mk
 
-all: basics binaries
+all: proto bin/asn1_compile bin/compile_et basics binaries
 binaries: $(BIN_PROGS) $(SBIN_PROGS)
 manpages: $(MANPAGES)
 everything: all



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 16:50:12 + (Wed, 03 Aug 2005)
New Revision: 9003

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

Log:
add testing for non-empty directory delete on close

Modified:
   branches/SAMBA_4_0/source/torture/raw/unlink.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/unlink.c
===
--- branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-03 16:26:37 UTC 
(rev 9002)
+++ branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-03 16:50:12 UTC 
(rev 9003)
@@ -173,9 +173,10 @@
struct smb_rmdir dio;
NTSTATUS status;
BOOL ret = True;
-   int fnum;
+   int fnum, fnum2;
const char *fname = BASEDIR \\test.txt;
const char *dname = BASEDIR \\test.dir;
+   const char *inside = BASEDIR \\test.dir\\test.txt;
union smb_setfileinfo sfinfo;
 
if (!torture_setup_dir(cli, BASEDIR)) {
@@ -242,6 +243,34 @@
status = smb_raw_rmdir(cli-tree, dio);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
 
+
+   printf(Testing with non-empty directory delete_on_close\n);
+   fnum = create_directory_handle(cli-tree, dname);
+   fnum2 = create_complex_file(cli, mem_ctx, inside);
+
+   sfinfo.disposition_info.file.fnum = fnum;
+   sfinfo.disposition_info.in.delete_on_close = 1;
+   status = smb_raw_setfileinfo(cli-tree, sfinfo);
+   CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+
+   sfinfo.disposition_info.file.fnum = fnum2;
+   status = smb_raw_setfileinfo(cli-tree, sfinfo);
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   sfinfo.disposition_info.file.fnum = fnum;
+   status = smb_raw_setfileinfo(cli-tree, sfinfo);
+   CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+
+   smbcli_close(cli-tree, fnum2);
+
+   status = smb_raw_setfileinfo(cli-tree, sfinfo);
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   smbcli_close(cli-tree, fnum);
+
+   status = smb_raw_rmdir(cli-tree, dio);
+   CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+
 done:
smb_raw_exit(cli-session);
smbcli_deltree(cli-tree, BASEDIR);



svn commit: samba r9005 - in branches/SOC/SAMBA_4_0: . source source/build/smb_build source/heimdal_build source/lib/talloc source/libnet source/librpc/idl source/rpc_server/drsuapi source/rpc_server/

2005-08-03 Thread brad
Author: brad
Date: 2005-08-03 16:51:41 + (Wed, 03 Aug 2005)
New Revision: 9005

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-03 10:47:03 -0600
  [EMAIL PROTECTED]:  j0j0 | 2005-08-03 09:35:34 -0600
   [EMAIL PROTECTED] (orig r8981):  abartlet | 2005-08-02 23:24:13 -0600
   Add comments, fix typos (in attribute names) and check for errors in
   SamSync and 'net join'.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8982):  abartlet | 2005-08-02 23:25:30 -0600
   name is not the netbios name, but the RDN.  Return the correct
   netbios domain name of the host, as well as the sid from the cache we
   fetched earlier.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8983):  abartlet | 2005-08-02 23:26:17 -0600
   The KVNO (Kerberos key version number) should be incremented with
   every password set.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8984):  abartlet | 2005-08-02 23:28:06 -0600
   Use the correct cross-reference search in DRSUAPI, rather than making
   assumptions about the behaviour of name as a NETBIOS domain name.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8985):  jelmer | 2005-08-02 23:28:08 -0600
   Automatically generate make dependency rules for 
   the asn1 and error table files.
   
   This removes the need for HEIMDAL_EXTERNAL
   
   [EMAIL PROTECTED] (orig r8986):  abartlet | 2005-08-02 23:29:34 -0600
   As far as I can tell, given the ldif I get from behind this, we have a
   signed NTTIME here.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8988):  jelmer | 2005-08-02 23:40:45 -0600
   Don't remove Makefile.core in distclean...
   
   [EMAIL PROTECTED] (orig r8991):  jelmer | 2005-08-02 23:51:50 -0600
   Change Makefile.core to main.mk to prevent accidental removal problems.
   
   [EMAIL PROTECTED] (orig r8994):  jelmer | 2005-08-03 00:43:06 -0600
   Clean up some more autogenerated files so I can predict when I'm going to 
   break the build...
   
   [EMAIL PROTECTED] (orig r8995):  jelmer | 2005-08-03 00:51:58 -0600
   Add heimdal headers back to basics target... should fix the build for now
   
   [EMAIL PROTECTED] (orig r8996):  jelmer | 2005-08-03 01:06:09 -0600
   More build fixes...
   
   [EMAIL PROTECTED] (orig r8997):  jelmer | 2005-08-03 01:17:14 -0600
   Define CPP for hosts that don't default to 'cpp'
   
   [EMAIL PROTECTED] (orig r8998):  abartlet | 2005-08-03 01:24:42 -0600
   More work on the RPC server code to avoid abusing the name attribute
   as a netbios name.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r8999):  abartlet | 2005-08-03 01:25:36 -0600
   Use the timestamps module to ensure we update times.
   
   Andrew Bartlett
   
  
 

Added:
   branches/SOC/SAMBA_4_0/source/heimdal_build/asn1_deps.pl
   branches/SOC/SAMBA_4_0/source/heimdal_build/et_deps.pl
   branches/SOC/SAMBA_4_0/source/main.mk
Removed:
   branches/SOC/SAMBA_4_0/source/Makefile.core
   branches/SOC/SAMBA_4_0/source/heimdal_build/build_external.sh
Modified:
   branches/SOC/SAMBA_4_0/
   branches/SOC/SAMBA_4_0/source/build/smb_build/main.pl
   branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SOC/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SOC/SAMBA_4_0/source/lib/talloc/config.mk
   branches/SOC/SAMBA_4_0/source/libnet/libnet_join.c
   branches/SOC/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c
   branches/SOC/SAMBA_4_0/source/librpc/idl/netlogon.idl
   branches/SOC/SAMBA_4_0/source/rpc_server/drsuapi/drsuapi_cracknames.c
   branches/SOC/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c
   branches/SOC/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
   branches/SOC/SAMBA_4_0/source/rpc_server/samr/samr_password.c
   branches/SOC/SAMBA_4_0/source/scripting/config.mk
   branches/SOC/SAMBA_4_0/source/setup/secrets.ldif


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


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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 17:10:26 + (Wed, 03 Aug 2005)
New Revision: 9006

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

Log:
expanded RAW-UNLINK test to test directory delete on close with non-empty 
directory,
as per discussions during jeremys talk at cifs2005


Modified:
   branches/SAMBA_4_0/source/torture/raw/unlink.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/unlink.c
===
--- branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-03 16:51:41 UTC 
(rev 9005)
+++ branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-03 17:10:26 UTC 
(rev 9006)
@@ -20,6 +20,7 @@
 
 #include includes.h
 #include system/filesys.h
+#include librpc/gen_ndr/ndr_security.h
 
 #define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
@@ -169,6 +170,7 @@
 */
 static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 {
+   union smb_open op;
struct smb_unlink io;
struct smb_rmdir dio;
NTSTATUS status;
@@ -271,6 +273,108 @@
status = smb_raw_rmdir(cli-tree, dio);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
 
+   printf(Testing open dir with delete_on_close\n);
+   fnum = create_directory_handle(cli-tree, dname);
+   smbcli_close(cli-tree, fnum);
+   fnum2 = create_complex_file(cli, mem_ctx, inside);
+   smbcli_close(cli-tree, fnum2);
+
+   op.generic.level = RAW_OPEN_NTCREATEX;
+   op.ntcreatex.in.root_fid = 0;
+   op.ntcreatex.in.flags = 0;
+   op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY 
|NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
+   op.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+   op.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | 
NTCREATEX_SHARE_ACCESS_WRITE;
+   op.ntcreatex.in.alloc_size = 0;
+   op.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
+   op.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   op.ntcreatex.in.security_flags = 0;
+   op.ntcreatex.in.fname = dname;
+
+   status = smb_raw_open(cli-tree, mem_ctx, op);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   fnum = op.ntcreatex.out.fnum;
+
+   smbcli_close(cli-tree, fnum);
+
+   status = smb_raw_rmdir(cli-tree, dio);
+   CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+
+
+   printf(Testing double open dir with second delete_on_close\n);
+   fnum = create_directory_handle(cli-tree, dname);
+   fnum2 = create_complex_file(cli, mem_ctx, inside);
+   smbcli_close(cli-tree, fnum2);
+
+   op.generic.level = RAW_OPEN_NTCREATEX;
+   op.ntcreatex.in.root_fid = 0;
+   op.ntcreatex.in.flags = 0;
+   op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY 
|NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
+   op.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+   op.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | 
NTCREATEX_SHARE_ACCESS_WRITE;
+   op.ntcreatex.in.alloc_size = 0;
+   op.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
+   op.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   op.ntcreatex.in.security_flags = 0;
+   op.ntcreatex.in.fname = dname;
+
+   status = smb_raw_open(cli-tree, mem_ctx, op);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   fnum2 = op.ntcreatex.out.fnum;
+
+   smbcli_close(cli-tree, fnum2);
+   smbcli_close(cli-tree, fnum);
+
+   status = smb_raw_rmdir(cli-tree, dio);
+   CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+
+
+   printf(Testing pre-existing open dir with second delete_on_close\n);
+   fnum = create_directory_handle(cli-tree, dname);
+   smbcli_close(cli-tree, fnum);
+
+   fnum = create_complex_file(cli, mem_ctx, inside);
+   smbcli_close(cli-tree, fnum);
+
+   /* we have a dir with a file in it, no handles open */
+
+   op.generic.level = RAW_OPEN_NTCREATEX;
+   op.ntcreatex.in.root_fid = 0;
+   op.ntcreatex.in.flags = 0;
+   op.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   op.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY 
|NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
+   op.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+   op.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | 
NTCREATEX_SHARE_ACCESS_WRITE | NTCREATEX_SHARE_ACCESS_DELETE;
+   op.ntcreatex.in.alloc_size = 0;
+   op.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN;
+   op.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   op.ntcreatex.in.security_flags = 0;
+   op.ntcreatex.in.fname = dname;
+
+   status = smb_raw_open(cli-tree, mem_ctx, op);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   fnum = op.ntcreatex.out.fnum;
+
+   /* 

svn commit: samba r9007 - in branches/SAMBA_4_0/source/ntvfs/posix: .

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 17:22:33 + (Wed, 03 Aug 2005)
New Revision: 9007

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

Log:
fixed error code for setting delete on close on a non-empty directory


Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2005-08-03 
17:10:26 UTC (rev 9006)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2005-08-03 
17:22:33 UTC (rev 9007)
@@ -310,3 +310,27 @@
 
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 }
+
+
+/*
+  see if a directory is empty
+*/
+BOOL pvfs_directory_empty(struct pvfs_state *pvfs, struct pvfs_filename *name)
+{
+   struct dirent *de;
+   DIR *dir = opendir(name-full_name);
+   if (dir == NULL) {
+   return True;
+   }
+
+   while ((de = readdir(dir))) {
+   if (strcmp(de-d_name, .) != 0 
+   strcmp(de-d_name, ..) != 0) {
+   closedir(dir);
+   return False;
+   }
+   }
+
+   closedir(dir);
+   return True;
+}

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2005-08-03 17:10:26 UTC 
(rev 9006)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2005-08-03 17:22:33 UTC 
(rev 9007)
@@ -1244,6 +1244,9 @@
}
 
if (f-handle-name-dos.attrib  FILE_ATTRIBUTE_DIRECTORY) {
+   if (!pvfs_directory_empty(pvfs, f-handle-name)) {
+   return NT_STATUS_DIRECTORY_NOT_EMPTY;
+   }
f-handle-create_options = create_options;
return NT_STATUS_OK;
}



svn commit: samba r9009 - in branches/SAMBA_4_0/source/ntvfs/posix: .

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 17:52:33 + (Wed, 03 Aug 2005)
New Revision: 9009

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

Log:
directory not empty is not an error on failure to delete directory in delete on 
close




Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2005-08-03 17:50:00 UTC 
(rev 9008)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c   2005-08-03 17:52:33 UTC 
(rev 9009)
@@ -75,7 +75,7 @@
DEBUG(0,(Warning: xattr rmdir hook failed for '%s' - 
%s\n,
 h-name-full_name, nt_errstr(status)));
}
-   if (rmdir(h-name-full_name) != 0) {
+   if (rmdir(h-name-full_name) != 0  errno != ENOTEMPTY) {
DEBUG(0,(pvfs_close: failed to rmdir '%s' - %s\n, 
 h-name-full_name, strerror(errno)));
}



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-03 18:02:45 + (Wed, 03 Aug 2005)
New Revision: 9010

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

Log:
forgot to commit the change to create_directory_handle()





Modified:
   branches/SAMBA_4_0/source/torture/torture_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture_util.c
===
--- branches/SAMBA_4_0/source/torture/torture_util.c2005-08-03 17:52:33 UTC 
(rev 9009)
+++ branches/SAMBA_4_0/source/torture/torture_util.c2005-08-03 18:02:45 UTC 
(rev 9010)
@@ -42,7 +42,7 @@
 /*
   create a directory, returning a handle to it
 */
-int create_directory_handle(struct smbcli_tree *tree, const char *dname)
+NTSTATUS create_directory_handle(struct smbcli_tree *tree, const char *dname, 
int *fnum)
 {
NTSTATUS status;
union smb_open io;
@@ -64,13 +64,13 @@
io.ntcreatex.in.fname = dname;
 
status = smb_raw_open(tree, mem_ctx, io);
-   if (!NT_STATUS_IS_OK(status)) {
-   talloc_free(mem_ctx);
-   return -1;
+   talloc_free(mem_ctx);
+
+   if (NT_STATUS_IS_OK(status)) {
+   *fnum = io.ntcreatex.out.fnum;
}
 
-   talloc_free(mem_ctx);
-   return io.ntcreatex.out.fnum;
+   return status;
 }
 
 /*



svn commit: samba r9012 - in branches/SOC/SAMBA_4_0: . source source/build/smb_build source/ntvfs/posix source/torture source/torture/raw

2005-08-03 Thread brad
Author: brad
Date: 2005-08-03 18:57:37 + (Wed, 03 Aug 2005)
New Revision: 9012

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-03 12:37:47 -0600
  [EMAIL PROTECTED]:  j0j0 | 2005-08-03 12:21:10 -0600
   [EMAIL PROTECTED] (orig r9001):  jelmer | 2005-08-03 10:13:44 -0600
   Fix warning in make clean
   
   [EMAIL PROTECTED] (orig r9002):  tridge | 2005-08-03 10:26:37 -0600
   a workaround for the current build problems. I hope this will allow
   the build farm hosts to build again.
   
   Jelmer, please feel free to remove this once you have the correct
   dependencies sorted out
   
   [EMAIL PROTECTED] (orig r9003):  tridge | 2005-08-03 10:50:12 -0600
   add testing for non-empty directory delete on close
   
   [EMAIL PROTECTED] (orig r9006):  tridge | 2005-08-03 11:10:26 -0600
   expanded RAW-UNLINK test to test directory delete on close with non-empty 
directory,
   as per discussions during jeremys talk at cifs2005
   
   
   [EMAIL PROTECTED] (orig r9007):  tridge | 2005-08-03 11:22:33 -0600
   fixed error code for setting delete on close on a non-empty directory
   
   
   [EMAIL PROTECTED] (orig r9008):  tridge | 2005-08-03 11:50:00 -0600
   check the return status for the directory handle creations
   
   
   
   [EMAIL PROTECTED] (orig r9009):  tridge | 2005-08-03 11:52:33 -0600
   directory not empty is not an error on failure to delete directory in delete 
on close
   
   
   
   
   [EMAIL PROTECTED] (orig r9010):  tridge | 2005-08-03 12:02:45 -0600
   forgot to commit the change to create_directory_handle()
   
   
   
   
   
  
 

Modified:
   branches/SOC/SAMBA_4_0/
   branches/SOC/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SOC/SAMBA_4_0/source/main.mk
   branches/SOC/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c
   branches/SOC/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SOC/SAMBA_4_0/source/torture/raw/setfileinfo.c
   branches/SOC/SAMBA_4_0/source/torture/raw/unlink.c
   branches/SOC/SAMBA_4_0/source/torture/torture_util.c


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


svn commit: samba r9014 - in branches/SOC/SAMBA_4_0: . source/torture

2005-08-03 Thread brad
Author: brad
Date: 2005-08-03 19:18:05 + (Wed, 03 Aug 2005)
New Revision: 9014

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-03 13:23:12 -0600
 Updating config.mk so that smbtorture builds again

Modified:
   branches/SOC/SAMBA_4_0/
   branches/SOC/SAMBA_4_0/source/torture/config.mk


Changeset:

Property changes on: branches/SOC/SAMBA_4_0
___
Name: svk:merge
   - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9010
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5228
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5226
   + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9010
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5231
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5226

Modified: branches/SOC/SAMBA_4_0/source/torture/config.mk
===
--- branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-08-03 18:57:48 UTC 
(rev 9013)
+++ branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-08-03 19:18:05 UTC 
(rev 9014)
@@ -200,6 +200,7 @@
torture/libnet/domain.o \
torture/libnet/libnet_lookup.o \
torture/libnet/libnet_user.o \
+   torture/libnet/libnet_share.o \
torture/libnet/libnet_rpc.o
 REQUIRED_SUBSYSTEMS = \
NDR_ALL RPC_NDR_SAMR LIBNET
@@ -209,6 +210,7 @@
 #
 # Start BINARY smbtorture
 [BINARY::smbtorture]
+INSTALLDIR = BINDIR
 OBJ_FILES = \
torture/torture.o \
torture/torture_util.o
@@ -234,6 +236,7 @@
 #
 # Start BINARY gentest
 [BINARY::gentest]
+INSTALLDIR = BINDIR
 OBJ_FILES = \
torture/gentest.o \
torture/torture_util.o
@@ -250,6 +253,7 @@
 #
 # Start BINARY masktest
 [BINARY::masktest]
+INSTALLDIR = BINDIR
 OBJ_FILES = \
torture/masktest.o
 REQUIRED_SUBSYSTEMS = \
@@ -265,6 +269,7 @@
 #
 # Start BINARY locktest
 [BINARY::locktest]
+INSTALLDIR = BINDIR
 OBJ_FILES = \
torture/locktest.o \
torture/torture_util.o



svn commit: samba r9015 - in branches/SAMBA_4_0/source/rpc_server/samr: .

2005-08-03 Thread abartlet
Author: abartlet
Date: 2005-08-03 19:58:58 + (Wed, 03 Aug 2005)
New Revision: 9015

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

Log:
Fix access to BUILTIN again.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c
===
--- branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c 2005-08-03 
19:18:05 UTC (rev 9014)
+++ branches/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c 2005-08-03 
19:58:58 UTC (rev 9015)
@@ -271,14 +271,14 @@
int ret;
array-entries[i].idx = start_i + i;
/* try and find the domain */
-   ret = gendb_search(c_state-sam_ctx, mem_ctx, NULL, ref_msgs, 
ref_attrs, 
+   ret = gendb_search(c_state-sam_ctx, mem_ctx, NULL, 
+  ref_msgs, ref_attrs, 
   ((objectClass=crossRef)(ncName=%s)), 
-  dom_msgs[0]-dn);
+  dom_msgs[i]-dn);
if (ret == 1) {
array-entries[i].name.string = 
samdb_result_string(ref_msgs[0], nETBIOSName, NULL);
} else {
-   /* Builtin? If we can't find the reference, punt */
-   array-entries[i].name.string = 
samdb_result_string(dom_msgs[0], cn, NULL);
+   array-entries[i].name.string = 
samdb_result_string(dom_msgs[i], cn, NULL);
}
}
 
@@ -300,7 +300,7 @@
const char *domain_name;
struct samr_connect_state *c_state;
struct samr_domain_state *d_state;
-   const char * const dom_attrs[] = { NULL};
+   const char * const dom_attrs[] = { cn, NULL};
const char * const ref_attrs[] = { nETBIOSName, NULL};
struct ldb_message **dom_msgs;
struct ldb_message **ref_msgs;
@@ -318,25 +318,38 @@
 
ret = gendb_search(c_state-sam_ctx,
   mem_ctx, NULL, dom_msgs, dom_attrs,
-  ((objectSid=%s)(objectclass=domain)), 
+  
((objectSid=%s)((objectclass=domain)(!(objectClass=builtinDomain,
   ldap_encode_ndr_dom_sid(mem_ctx, r-in.sid));
-   if (ret != 1) {
-   return NT_STATUS_NO_SUCH_DOMAIN;
-   }
+   if (ret == -1) {
+   return NT_STATUS_INTERNAL_DB_CORRUPTION;
+   } else if (ret == 0) {
+   ret = gendb_search(c_state-sam_ctx,
+  mem_ctx, NULL, dom_msgs, dom_attrs,
+  
((objectSid=%s)(objectClass=builtinDomain)), 
+  ldap_encode_ndr_dom_sid(mem_ctx, r-in.sid));
+   if (ret != 1) {
+   return NT_STATUS_NO_SUCH_DOMAIN;
+   }
 
-   ret = gendb_search(c_state-sam_ctx,
-  mem_ctx, NULL, ref_msgs, ref_attrs,
-  
(((nETBIOSName=*)(objectclass=crossRef))(ncName=%s)), 
-  dom_msgs[0]-dn);
-   if (ret != 1) {
-   return NT_STATUS_NO_SUCH_DOMAIN;
+   domain_name = ldb_msg_find_string(dom_msgs[0], cn, NULL);
+   if (domain_name == NULL) {
+   return NT_STATUS_NO_SUCH_DOMAIN;
+   }
+   } else {
+   ret = gendb_search(c_state-sam_ctx,
+  mem_ctx, NULL, ref_msgs, ref_attrs,
+  
(((nETBIOSName=*)(objectclass=crossRef))(ncName=%s)), 
+  dom_msgs[0]-dn);
+   if (ret != 1) {
+   return NT_STATUS_NO_SUCH_DOMAIN;
+   }
+   
+   domain_name = ldb_msg_find_string(ref_msgs[0], nETBIOSName, 
NULL);
+   if (domain_name == NULL) {
+   return NT_STATUS_NO_SUCH_DOMAIN;
+   }
}
 
-   domain_name = ldb_msg_find_string(ref_msgs[0], nETBIOSName, NULL);
-   if (domain_name == NULL) {
-   return NT_STATUS_NO_SUCH_DOMAIN;
-   }
-
d_state = talloc(c_state, struct samr_domain_state);
if (!d_state) {
return NT_STATUS_NO_MEMORY;
@@ -406,10 +419,8 @@
   struct samr_DomInfo2 *info)
 {
const char * const dom_attrs[] = { comment, NULL };
-   const char * const ref_attrs[] = { nETBIOSName, NULL };
int ret;
struct ldb_message **dom_msgs;
-   struct ldb_message **ref_msgs;
const char *domain_name;

ret = gendb_search_dn(state-sam_ctx, mem_ctx,
@@ -418,15 +429,7 @@
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
 
-   ret = gendb_search(state-sam_ctx,
-  mem_ctx, NULL, ref_msgs, 

svn commit: samba r9016 - in branches/SAMBA_4_0/source/rpc_server/netlogon: .

2005-08-03 Thread abartlet
Author: abartlet
Date: 2005-08-03 20:27:33 + (Wed, 03 Aug 2005)
New Revision: 9016

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

Log:
More work to avoid abuse of the name attribute, this time on
NETLOGON.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 
2005-08-03 19:58:58 UTC (rev 9015)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c 
2005-08-03 20:27:33 UTC (rev 9016)
@@ -870,11 +870,12 @@
   fill in a netr_DomainTrustInfo from a ldb search result
 */
 static NTSTATUS fill_domain_primary_info(TALLOC_CTX *mem_ctx, struct 
ldb_message *res,
-struct netr_DomainTrustInfo *info)
+struct netr_DomainTrustInfo *info, 
+const char *local_domain)
 {
ZERO_STRUCTP(info);
 
-   info-domainname.string = samdb_result_string(res, name, NULL);
+   info-domainname.string = local_domain;
info-fulldomainname.string = talloc_asprintf(info, %s., 
samdb_result_string(res, dnsDomain, NULL));
/* TODO: we need proper forest support */
info-forest.string = info-fulldomainname.string;
@@ -888,12 +889,13 @@
   fill in a netr_DomainTrustInfo from a ldb search result
 */
 static NTSTATUS fill_domain_trust_info(TALLOC_CTX *mem_ctx, struct ldb_message 
*res,
-  struct netr_DomainTrustInfo *info, BOOL 
is_local)
+  struct netr_DomainTrustInfo *info, 
+  const char *local_domain, BOOL is_local)
 {
ZERO_STRUCTP(info);
 
if (is_local) {
-   info-domainname.string = samdb_result_string(res, name, 
NULL);
+   info-domainname.string = local_domain;
info-fulldomainname.string = samdb_result_string(res, 
dnsDomain, NULL);
info-forest.string = NULL;
info-guid = samdb_result_guid(res, objectGUID);
@@ -917,15 +919,18 @@
struct netr_LogonGetDomainInfo *r)
 {
struct server_pipe_state *pipe_state = dce_call-context-private;
-   const char * const attrs[] = { name, dnsDomain, objectSid, 
+   const char * const attrs[] = { dnsDomain, objectSid, 
   objectGUID, flatName, 
securityIdentifier,
   NULL };
-   void *sam_ctx;
-   struct ldb_message **res1, **res2;
+   const char * const ref_attrs[] = { nETBIOSName, NULL };
+   struct ldb_context *sam_ctx;
+   struct ldb_message **res1, **res2, **ref_res;
struct netr_DomainInfo1 *info1;
-   int ret1, ret2, i;
+   int ret, ret1, ret2, i;
NTSTATUS status;
 
+   const char *local_domain;
+
status = netr_creds_server_step_check(pipe_state, 
  r-in.credential, 
r-out.return_authenticator);
if (!NT_STATUS_IS_OK(status)) {
@@ -947,6 +952,17 @@
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
 
+   /* try and find the domain */
+   ret = gendb_search(sam_ctx, mem_ctx, NULL, 
+  ref_res, ref_attrs, 
+  ((objectClass=crossRef)(ncName=%s)), 
+  res1[0]-dn);
+   if (ret != 1) {
+   return NT_STATUS_INTERNAL_DB_CORRUPTION;
+   }
+
+   local_domain = samdb_result_string(ref_res[0], nETBIOSName, NULL);
+
ret2 = gendb_search(sam_ctx, mem_ctx, NULL, res2, attrs, 
(objectClass=trustedDomain));
if (ret2 == -1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
@@ -966,19 +982,19 @@
return NT_STATUS_NO_MEMORY;
}
 
-   status = fill_domain_primary_info(mem_ctx, res1[0], info1-domaininfo);
+   status = fill_domain_primary_info(mem_ctx, res1[0], info1-domaininfo, 
local_domain);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
 
for (i=0;iret2;i++) {
-   status = fill_domain_trust_info(mem_ctx, res2[i], 
info1-trusts[i], False);
+   status = fill_domain_trust_info(mem_ctx, res2[i], 
info1-trusts[i], NULL, False);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
}
 
-   status = fill_domain_trust_info(mem_ctx, res1[0], info1-trusts[i], 
True);
+   status = fill_domain_trust_info(mem_ctx, res1[0], info1-trusts[i], 
local_domain, True);
if (!NT_STATUS_IS_OK(status)) {
return status;
}



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

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-03 21:14:01 + (Wed, 03 Aug 2005)
New Revision: 9017

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

Log:
Fix a paranoia check bug, add some more paranoia.

Volker

Modified:
   trunk/source/smbd/oplock.c


Changeset:
Modified: trunk/source/smbd/oplock.c
===
--- trunk/source/smbd/oplock.c  2005-08-03 20:27:33 UTC (rev 9016)
+++ trunk/source/smbd/oplock.c  2005-08-03 21:14:01 UTC (rev 9017)
@@ -236,9 +236,12 @@
 
if (fsp-oplock_type == LEVEL_II_OPLOCK)
level_II_oplocks_open--;
-   else if (fsp-oplock_type)
+   else if (EXCLUSIVE_OPLOCK_TYPE(fsp-oplock_type))
exclusive_oplocks_open--;

+   SMB_ASSERT(exclusive_oplocks_open=0);
+   SMB_ASSERT(level_II_oplocks_open=0);
+   
fsp-oplock_type = NO_OPLOCK;
fsp-sent_oplock_break = NO_BREAK_SENT;




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

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-03 21:28:35 + (Wed, 03 Aug 2005)
New Revision: 9018

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

Log:
Another paranoia check fix
Modified:
   trunk/source/smbd/files.c


Changeset:
Modified: trunk/source/smbd/files.c
===
--- trunk/source/smbd/files.c   2005-08-03 21:14:01 UTC (rev 9017)
+++ trunk/source/smbd/files.c   2005-08-03 21:28:35 UTC (rev 9018)
@@ -293,8 +293,9 @@
DLIST_PROMOTE(Files, fsp);
}
/* Paranoia check. */
-   if (fsp-fh-fd == -1 
-   (fsp-oplock_type != NO_OPLOCK)) {
+   if ((fsp-fh-fd == -1) 
+   (fsp-oplock_type != NO_OPLOCK) 
+   (fsp-oplock_type != FAKE_LEVEL_II_OPLOCK)) {
DEBUG(0,(file_find_dif: file %s dev = %x, 
inode = %.0f, file_id = %u \
 oplock_type = %u is a stat open with oplock type !\n, fsp-fsp_name, 
(unsigned int)fsp-dev,
(double)fsp-inode, (unsigned 
int)fsp-file_id,



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

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-03 21:49:04 + (Wed, 03 Aug 2005)
New Revision: 9019

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

Log:
Fix an error found by valgrind
Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===
--- trunk/source/smbd/open.c2005-08-03 21:28:35 UTC (rev 9018)
+++ trunk/source/smbd/open.c2005-08-03 21:49:04 UTC (rev 9019)
@@ -841,6 +841,11 @@
fsp-oplock_type = LEVEL_II_OPLOCK;
}
 
+   if ((fsp-oplock_type == NO_OPLOCK)  have_level2) {
+   /* Store a level2 oplock, but don't tell the client */
+   fsp-oplock_type = FAKE_LEVEL_II_OPLOCK;
+   }
+
if (delay_it) {
DEBUG(10, (Sending break request to PID %d\n,
   (int)exclusive-pid));
@@ -853,11 +858,6 @@
file_free(fsp);
}
 
-   if ((fsp-oplock_type == NO_OPLOCK)  have_level2) {
-   /* Store a level2 oplock, but don't tell the client */
-   fsp-oplock_type = FAKE_LEVEL_II_OPLOCK;
-   }
-
SAFE_FREE(share_modes);
return delay_it;
 }



svn commit: samba r9020 - in trunk/source: include smbd

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-03 21:59:05 + (Wed, 03 Aug 2005)
New Revision: 9020

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

Log:
R.I.P. global_oplock_port and global_oplock_break. You have served us well for
years, thanks a lot!

Volker

Modified:
   trunk/source/include/smb.h
   trunk/source/smbd/files.c
   trunk/source/smbd/nttrans.c
   trunk/source/smbd/open.c
   trunk/source/smbd/oplock.c
   trunk/source/smbd/oplock_irix.c
   trunk/source/smbd/oplock_linux.c
   trunk/source/smbd/process.c
   trunk/source/smbd/reply.c
   trunk/source/smbd/trans2.c


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


svn commit: samba r9021 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2005-08-03 Thread gd
Author: gd
Date: 2005-08-03 22:07:57 + (Wed, 03 Aug 2005)
New Revision: 9021

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

Log:
Fix smbd-crash bug in openprinter (found by samba4 smbtorture
RPC-SPOOLSS).

Guenther


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
   trunk/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2005-08-03 
21:59:05 UTC (rev 9020)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2005-08-03 
22:07:57 UTC (rev 9021)
@@ -1488,19 +1488,23 @@
  * SPOOL_Q_OPEN_PRINTER_EX structure
  /
 
-static void convert_to_openprinterex(TALLOC_CTX *ctx, SPOOL_Q_OPEN_PRINTER_EX 
*q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u)
+static WERROR convert_to_openprinterex(TALLOC_CTX *ctx, 
SPOOL_Q_OPEN_PRINTER_EX *q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u)
 {
if (!q_u_ex || !q_u)
-   return;
+   return WERR_OK;
 
DEBUG(8,(convert_to_openprinterex\n));

if ( q_u-printername ) {
-   q_u_ex-printername = TALLOC_P( ctx, UNISTR2 );
+   q_u_ex-printername = TALLOC_ZERO_P( ctx, UNISTR2 );
+   if (q_u_ex-printername == NULL)
+   return WERR_NOMEM;
copy_unistr2(q_u_ex-printername, q_u-printername);
}

copy_printer_default(ctx, q_u_ex-printer_default, 
q_u-printer_default);
+
+   return WERR_OK;
 }
 
 /
@@ -1522,7 +1526,9 @@

/* convert the OpenPrinter() call to OpenPrinterEx() */

-   convert_to_openprinterex(p-mem_ctx, q_u_ex, q_u);
+   r_u_ex.status = convert_to_openprinterex(p-mem_ctx, q_u_ex, q_u);
+   if (!W_ERROR_IS_OK(r_u_ex.status))
+   return r_u_ex.status;

r_u_ex.status = _spoolss_open_printer_ex(p, q_u_ex, r_u_ex);


Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===
--- trunk/source/rpc_server/srv_spoolss_nt.c2005-08-03 21:59:05 UTC (rev 
9020)
+++ trunk/source/rpc_server/srv_spoolss_nt.c2005-08-03 22:07:57 UTC (rev 
9021)
@@ -1488,19 +1488,23 @@
  * SPOOL_Q_OPEN_PRINTER_EX structure
  /
 
-static void convert_to_openprinterex(TALLOC_CTX *ctx, SPOOL_Q_OPEN_PRINTER_EX 
*q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u)
+static WERROR convert_to_openprinterex(TALLOC_CTX *ctx, 
SPOOL_Q_OPEN_PRINTER_EX *q_u_ex, SPOOL_Q_OPEN_PRINTER *q_u)
 {
if (!q_u_ex || !q_u)
-   return;
+   return WERR_OK;
 
DEBUG(8,(convert_to_openprinterex\n));

if ( q_u-printername ) {
-   q_u_ex-printername = TALLOC_P( ctx, UNISTR2 );
+   q_u_ex-printername = TALLOC_ZERO_P( ctx, UNISTR2 );
+   if (q_u_ex-printername == NULL)
+   return WERR_NOMEM;
copy_unistr2(q_u_ex-printername, q_u-printername);
}

copy_printer_default(ctx, q_u_ex-printer_default, 
q_u-printer_default);
+
+   return WERR_OK;
 }
 
 /
@@ -1522,7 +1526,9 @@

/* convert the OpenPrinter() call to OpenPrinterEx() */

-   convert_to_openprinterex(p-mem_ctx, q_u_ex, q_u);
+   r_u_ex.status = convert_to_openprinterex(p-mem_ctx, q_u_ex, q_u);
+   if (!W_ERROR_IS_OK(r_u_ex.status))
+   return r_u_ex.status;

r_u_ex.status = _spoolss_open_printer_ex(p, q_u_ex, r_u_ex);




svn commit: samba r9022 - in branches/SAMBA_4_0/source/auth: .

2005-08-03 Thread abartlet
Author: abartlet
Date: 2005-08-03 23:14:38 + (Wed, 03 Aug 2005)
New Revision: 9022

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

Log:
One more step in the game of whack-a-mole with the PAC.

This makes the PAC we generate match (closely) the PAC generated by my
test win2k3 DC.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/auth_sam_reply.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_sam_reply.c
===
--- branches/SAMBA_4_0/source/auth/auth_sam_reply.c 2005-08-03 22:07:57 UTC 
(rev 9021)
+++ branches/SAMBA_4_0/source/auth/auth_sam_reply.c 2005-08-03 23:14:38 UTC 
(rev 9022)
@@ -117,6 +117,10 @@
 
sam = sam3-base;
 
+   sam-domain_sid = dom_sid_dup(mem_ctx, server_info-account_sid);
+   NT_STATUS_HAVE_NO_MEMORY(sam-domain_sid);
+   sam-domain_sid-num_auths--;
+
sam-last_logon = server_info-last_logon;
sam-last_logoff = server_info-last_logoff;
sam-acct_expiry = server_info-acct_expiry;
@@ -139,6 +143,26 @@
sam-groups.count = 0;
sam-groups.rids = NULL;
 
+   if (server_info-n_domain_groups  0) {
+   int i;
+   sam-groups.rids = talloc_array(sam, struct 
samr_RidWithAttribute,
+   server_info-n_domain_groups);
+   NT_STATUS_HAVE_NO_MEMORY(sam-groups.rids);
+
+   for (i=0; iserver_info-n_domain_groups; i++) {
+   struct dom_sid *group_sid = 
server_info-domain_groups[i];
+
+   if (!dom_sid_in_domain(sam-domain_sid, group_sid)) {
+   continue;
+   }
+
+   sam-groups.rids[sam-groups.count].rid = 
group_sid-sub_auths[group_sid-num_auths-1];
+   sam-groups.rids[sam-groups.count].attributes = 
+   SE_GROUP_MANDATORY | 
SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED;
+   sam-groups.count += 1;
+   }
+   }
+
sam-user_flags = 0x20; /* TODO: w2k3 uses 0x120.  We know 0x20
  * as extra sids (PAC doc) but what is
  * 0x100? */
@@ -146,10 +170,6 @@
sam-logon_server.string = lp_netbios_name();
sam-domain.string = server_info-domain_name;
 
-   sam-domain_sid = dom_sid_dup(mem_ctx, server_info-account_sid);
-   NT_STATUS_HAVE_NO_MEMORY(sam-domain_sid);
-   sam-domain_sid-num_auths--;
-
ZERO_STRUCT(sam-unknown);
 
ZERO_STRUCT(sam-key);
@@ -165,7 +185,7 @@
 
sam3-sidcount  = 0;
sam3-sids  = NULL;
-
+#if 0
if (server_info-n_domain_groups  0) {
int i;
sam3-sids = talloc_array(sam, struct netr_SidAttr,
@@ -173,7 +193,7 @@
NT_STATUS_HAVE_NO_MEMORY(sam3-sids);
 
for (i=0; iserver_info-n_domain_groups; i++) {
-   if (!dom_sid_in_domain(sam-domain_sid, 
server_info-domain_groups[i])) {
+   if (dom_sid_in_domain(sam-domain_sid, 
server_info-domain_groups[i])) {
continue;
}
sam3-sids[sam3-sidcount].sid = 
talloc_reference(sam3-sids,server_info-domain_groups[i]);
@@ -182,7 +202,7 @@
sam3-sidcount += 1;
}
}
-
+#endif
*_sam3 = sam3;
 
return NT_STATUS_OK;



Build status as of Thu Aug 4 00:00:02 2005

2005-08-03 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2005-08-03 
00:00:25.0 +
+++ /home/build/master/cache/broken_results.txt 2005-08-04 00:00:09.0 
+
@@ -1,4 +1,4 @@
-Build status as of Wed Aug  3 00:00:02 2005
+Build status as of Thu Aug  4 00:00:02 2005
 
 Build counts:
 Tree Total  Broken Panic 
@@ -9,9 +9,9 @@
 rsync34 2  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   38 21 0 
+samba4   38 22 0 
 samba_3_035 5  0 
 smb-build31 4  0 
 talloc   34 12 0 
-tdb  34 13 0 
+tdb  34 15 0 
 


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

2005-08-03 Thread jerry
Author: jerry
Date: 2005-08-04 00:27:44 + (Thu, 04 Aug 2005)
New Revision: 9023

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

Log:
cleaning up some event log tdb log messages and unnecessary lock/unlock calls
Modified:
   trunk/source/rpc_server/srv_eventlog_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_eventlog_nt.c
===
--- trunk/source/rpc_server/srv_eventlog_nt.c   2005-08-03 23:14:38 UTC (rev 
9022)
+++ trunk/source/rpc_server/srv_eventlog_nt.c   2005-08-04 00:27:44 UTC (rev 
9023)
@@ -47,26 +47,27 @@
if (!tdb || !new_tdb || !vname ) {
return False;
}
+   
DEBUG(10,(copy_tdb_uint32_value_to_new_tdb: Copying item %s, default 
if not found %x\n,vname,dft));
pstrcpy(u_vname, vname);
+   
/* NORMALIZE */
+   
strupper_m(u_vname);
 
-   tdb_lock_bystring(tdb, u_vname, 0);
-   rval= tdb_fetch_uint32(tdb, u_vname ,data_value);
+   rval = tdb_fetch_uint32(tdb, u_vname, data_value);
+   
DEBUG(10,(copy_tdb_uint32_value_to_new_tdb: rval is %x\n,rval));
 
-   if (!rval) {
+   if ( !rval ) {
DEBUG(10,(copy_tdb_uint32_value_to_new_tdb: Couldn't read [%s] 
value default will be %x\n,u_vname, dft));
data_value = dft;
}
-   tdb_unlock_bystring(tdb, u_vname);
 
-   tdb_lock_bystring(new_tdb, u_vname, 0);
DEBUG(10,(copy_tdb_uint32_value_to_new_tdb: Copying item %s, value is 
%x\n,u_vname, data_value));
 
-   tdb_store_uint32(new_tdb, u_vname,data_value);
-   tdb_unlock_bystring(new_tdb, u_vname);
+   tdb_store_uint32(new_tdb, u_vname, data_value);
+   
return True;
 }
  
@@ -203,7 +204,7 @@
 
 /
 
-static BOOL cleanup_eventlog_parameters(TDB_CONTEXT *levtlog_tdb)
+static BOOL cleanup_eventlog_parameters( TDB_CONTEXT *levtlog_tdb )
 {
TDB_CONTEXT *new_tdb;
const char *vstring = INFO/version;
@@ -211,52 +212,52 @@
const char**evtlog_list;
pstring  old_tdbfile,new_tdbfile;
 
-   pstrcpy(new_tdbfile, lock_path(eventlog_params.tdb.new)); 
-   pstrcpy(old_tdbfile, lock_path(eventlog_params.tdb)); 
+   pstrcpy( new_tdbfile, lock_path(eventlog_params.tdb.new) ); 
+   pstrcpy( old_tdbfile, lock_path(eventlog_params.tdb) ); 
 
-   unlink(new_tdbfile); /* remove any existing file */
+   unlink( new_tdbfile ); /* remove any existing file */
 
-   new_tdb = tdb_open_log(new_tdbfile, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 
0600);
-   if (!new_tdb) {
+   if ( !(new_tdb = tdb_open_log(new_tdbfile, 0, TDB_DEFAULT, 
O_RDWR|O_CREAT, 0600)) ) {
DEBUG(0,(Failed to create new eventlog parameters db\n));
return False;
}
+   
/* write initial information out */
-   tdb_lock_bystring(new_tdb, vstring, 0);
+   
tdb_store_uint32(new_tdb, vstring, EVENTLOG_VERSION_V1);
-   tdb_unlock_bystring(new_tdb, vstring);
 
/* for each eventlog that we have, find info related to it and copy to 
the new DB */
+   
evtlog_list = lp_eventlog_list();
while (evtlog_list  *evtlog_list) {
+   
DEBUG(10,(cleanup_eventlog_parameters: Cleaning up 
=[%s]\n,*evtlog_list));   

fstrcpy(evtlogname,*evtlog_list);
fstrcat(evtlogname,/RETENTION);

copy_tdb_uint32_value_to_new_tdb(new_tdb,levtlog_tdb,evtlogname,0x93A80);
+   
fstrcpy(evtlogname,*evtlog_list);
fstrcat(evtlogname,/MAXSIZE);

copy_tdb_uint32_value_to_new_tdb(new_tdb,levtlog_tdb,evtlogname,0x8);
+   
evtlog_list++;
}  
 
DEBUG(10,(cleanup_eventlog_parameters: removing current TDB\n));
 
-   /* close current TDB */
-   tdb_unlockall(evtlog_tdb);
tdb_close(evtlog_tdb);
-
-   /* close current new_tdb */
-   tdb_unlockall(new_tdb);
tdb_close(new_tdb);
 
/* unlink current TDB */
-   if (0 != unlink(old_tdbfile)) {
+   
+   if ( unlink(old_tdbfile) != 0 ) {
DEBUG(1,(cleanup_eventlog_parameters: unable to unlink old 
file %s %s\n,old_tdbfile,strerror(errno)));
}
 
/* rename new_tdb  */
-   if (0 != rename(new_tdbfile,old_tdbfile)) {
+   
+   if ( rename(new_tdbfile,old_tdbfile) != 0 ) {
DEBUG(1,(cleanup_eventlog_parameters: Can't rename new to old 
: %s\n,strerror(errno)));
}
DEBUG(10,(cleanup_eventlog_parameters: Renamed %s to %s : 
\n,new_tdbfile,old_tdbfile));
@@ -296,34 +297,41 @@
  Open the eventlog parameter tdb. This code a clone of init_group_mapping.
 

svn commit: samba r9024 - in trunk/source: . include registry rpc_server

2005-08-03 Thread jerry
Author: jerry
Date: 2005-08-04 00:29:35 + (Thu, 04 Aug 2005)
New Revision: 9024

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

Log:
commiting some windows perfmon patches (only server support code right
now).


Added:
   trunk/source/include/rpc_perfcount.h
   trunk/source/include/rpc_perfcount_defs.h
   trunk/source/registry/reg_perfcount.c
Modified:
   trunk/source/Makefile.in
   trunk/source/include/includes.h
   trunk/source/include/rpc_reg.h
   trunk/source/registry/reg_db.c
   trunk/source/registry/reg_dynamic.c
   trunk/source/rpc_server/srv_reg.c
   trunk/source/rpc_server/srv_reg_nt.c


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


svn commit: samba r9025 - in branches/SAMBA_4_0/source/heimdal_build: .

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 01:30:21 + (Thu, 04 Aug 2005)
New Revision: 9025

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

Log:
fix the build when it was stoped and you don't run make clean before make all

metze
Modified:
   branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl
===
--- branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl2005-08-04 
00:29:35 UTC (rev 9024)
+++ branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl2005-08-04 
01:30:21 UTC (rev 9025)
@@ -24,8 +24,9 @@
if (/^([A-Za-z0-9_-]+)[ \t]*::= /) {
my $output = $1;
$output =~ s/-/_/g;
-   print $dirname/asn1_$output.c: $header\n;
-   print [EMAIL PROTECTED] $dirname/asn1_$output.x 
$dirname/asn1_$output.c\n\n;
+   print $dirname/asn1_$output.x: $header\n;
+   print $dirname/asn1_$output.c: $dirname/asn1_$output.x\n;
+   print [EMAIL PROTECTED] $dirname/asn1_$output.x 
$dirname/asn1_$output.c\n\n;
}
 }
 close(IN);



svn commit: samba r9026 - in branches/SAMBA_4_0/source/heimdal_build: .

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 01:33:09 + (Thu, 04 Aug 2005)
New Revision: 9026

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

Log:
remove autogenerated .x and .c files

metze
Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 01:30:21 UTC 
(rev 9025)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 01:33:09 UTC 
(rev 9026)
@@ -397,7 +397,7 @@
 
 heimdal_clean:
@echo Removing generated ASN1 files
-   @-find heimdal/lib/asn1 -name 'asn1_*.[c]' -exec rm -f '{}' \;
+   @-find heimdal/lib/asn1 -name 'asn1_*.[cx]' -exec rm -f '{}' \;
@-find heimdal/lib/gssapi -name 'asn1_*.[c]' -exec rm -f '{}' \;
@-find heimdal/lib/hdb -name 'asn1_*.[c]' -exec rm -f '{}' \;
@-rm -f heimdal/lib/roken/vis.h heimdal/lib/roken/err.h



svn commit: samba r9027 - in trunk/source: include locking rpc_server smbd

2005-08-03 Thread jra
Author: jra
Date: 2005-08-04 01:37:20 + (Thu, 04 Aug 2005)
New Revision: 9027

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

Log:
Change op_port to op_mid where appropriate. Remove the port args
from deferred opens. No longer needed. Check in part of RPC auth
rewrite (currently compiles and doesn't affect working code).
Jeremy.

Modified:
   trunk/source/include/ntdomain.h
   trunk/source/include/smb.h
   trunk/source/locking/locking.c
   trunk/source/rpc_server/srv_pipe.c
   trunk/source/rpc_server/srv_pipe_hnd.c
   trunk/source/smbd/open.c
   trunk/source/smbd/oplock.c


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


svn commit: samba r9028 - in branches/SAMBA_4_0/source/torture/libnet: .

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 01:38:53 + (Thu, 04 Aug 2005)
New Revision: 9028

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

Log:
make some function static 

metze
Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_share.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_share.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_share.c 2005-08-04 
01:37:20 UTC (rev 9027)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_share.c 2005-08-04 
01:38:53 UTC (rev 9028)
@@ -28,7 +28,7 @@
 #define TEST_SHARENAME libnetsharetest
 
 
-void test_displayshares(struct libnet_ListShares s)
+static void test_displayshares(struct libnet_ListShares s)
 {
int i, j;
 
@@ -162,8 +162,8 @@
 }
 
 
-BOOL test_addshare(struct dcerpc_pipe *pipe, TALLOC_CTX *mem_ctx, const char 
*host,
-  const char* share)
+static BOOL test_addshare(struct dcerpc_pipe *pipe, TALLOC_CTX *mem_ctx, const 
char *host,
+ const char* share)
 {
NTSTATUS status;
struct srvsvc_NetShareAdd add;



svn commit: samba r9029 - branches/SAMBA_3_0/source/lib trunk/source/lib

2005-08-03 Thread gd
Author: gd
Date: 2005-08-04 01:41:03 + (Thu, 04 Aug 2005)
New Revision: 9029

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

Log:
Another crash bug when enumerating privileges. 
Thanks Volker!

Guenther

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/privileges.c
===
--- branches/SAMBA_3_0/source/lib/privileges.c  2005-08-04 01:38:53 UTC (rev 
9028)
+++ branches/SAMBA_3_0/source/lib/privileges.c  2005-08-04 01:41:03 UTC (rev 
9029)
@@ -758,7 +758,7 @@
 
for ( i=0; !se_priv_equal(privs[i].se_priv, se_priv_end); i++ ) {
if ( set-low == privs[i].luid.low ) {
-   fstrcpy( name, privs[set-low - 1].name );
+   fstrcpy( name, privs[i].name );
return name;
}
}

Modified: trunk/source/lib/privileges.c
===
--- trunk/source/lib/privileges.c   2005-08-04 01:38:53 UTC (rev 9028)
+++ trunk/source/lib/privileges.c   2005-08-04 01:41:03 UTC (rev 9029)
@@ -758,7 +758,7 @@
 
for ( i=0; !se_priv_equal(privs[i].se_priv, se_priv_end); i++ ) {
if ( set-low == privs[i].luid.low ) {
-   fstrcpy( name, privs[set-low - 1].name );
+   fstrcpy( name, privs[i].name );
return name;
}
}



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

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 01:42:14 + (Thu, 04 Aug 2005)
New Revision: 9030

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

Log:
add a AC_SEARCH_FUNCS_EXT() which takes an extra argument that get the output 
libs
to not pollute the global $LIBS variable

metze
Modified:
   branches/SAMBA_4_0/source/aclocal.m4


Changeset:
Modified: branches/SAMBA_4_0/source/aclocal.m4
===
--- branches/SAMBA_4_0/source/aclocal.m42005-08-04 01:41:03 UTC (rev 
9029)
+++ branches/SAMBA_4_0/source/aclocal.m42005-08-04 01:42:14 UTC (rev 
9030)
@@ -117,8 +117,33 @@
 [AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1),
  [Define to 1 if you have the `]$1[' library (-l]$1[).])])
 
-# AC_CHECK_FUNCS_EXT(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -
+dnl AC_SEARCH_LIBS_EXT(FUNCTION, SEARCH-LIBS, EXT_LIBS,
+dnl[ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+dnl[OTHER-LIBRARIES])
+dnl 
+dnl Search for a library defining FUNC, if it's not already available.
+AC_DEFUN([AC_SEARCH_LIBS_EXT],
+[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_ext_$1],
+[
+ac_func_search_ext_save_LIBS=$LIBS
+ac_cv_search_ext_$1=no
+AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
+  [ac_cv_search_ext_$1=none required])
+if test $ac_cv_search_ext_$1 = no; then
+  for ac_lib in $2; do
+LIBS=-l$ac_lib $$3 $6 $ac_func_search_save_ext_LIBS
+AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
+  [ac_cv_search_ext_$1=-l$ac_lib
+break])
+  done
+fi
+LIBS=$ac_func_search_ext_save_LIBS])
+AS_IF([test $ac_cv_search_ext_$1 != no],
+  [test $ac_cv_search_ext_$1 = none required || $3=$ac_cv_search_ext_$1
+  $4],
+  [$5])dnl
+])
+
 dnl check for a function in a $LIBS and $OTHER_LIBS libraries variable.
 dnl AC_CHECK_FUNC_EXT(func,OTHER_LIBS,IF-TRUE,IF-FALSE)
 AC_DEFUN([AC_CHECK_FUNC_EXT],



svn commit: samba r9031 - in branches/SAMBA_4_0/source/ntvfs/posix: .

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 01:43:25 + (Thu, 04 Aug 2005)
New Revision: 9031

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

Log:
don't use the global $LIBS variables for posix specific stuff

metze
Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/config.m4
   branches/SAMBA_4_0/source/ntvfs/posix/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/config.m4
===
--- branches/SAMBA_4_0/source/ntvfs/posix/config.m4 2005-08-04 01:42:14 UTC 
(rev 9030)
+++ branches/SAMBA_4_0/source/ntvfs/posix/config.m4 2005-08-04 01:43:25 UTC 
(rev 9031)
@@ -25,16 +25,17 @@
 dnl use flistxattr as the key function for having 
 dnl sufficient xattr support for posix xattr backend
 AC_CHECK_HEADERS(sys/attributes.h attr/xattr.h sys/xattr.h)
-AC_SEARCH_LIBS(flistxattr, [attr])
-AC_CHECK_FUNCS(flistxattr)
-
+AC_SEARCH_LIBS_EXT(flistxattr, [attr], XATTR_LIBS)
+AC_CHECK_FUNC_EXT(flistxattr, $XATTR_LIBS)
+SMB_EXT_LIB(XATTR,[${XATTR_LIBS}],[${XATTR_CFLAGS}],[${XATTR_CPPFLAGS}],[${XATTR_LDFLAGS}])
 if test x$ac_cv_func_flistxattr = xyes; then
AC_DEFINE(HAVE_XATTR_SUPPORT,1,[Whether we have xattr support])
 fi
 
 AC_CHECK_HEADERS(blkid/blkid.h)
-AC_SEARCH_LIBS(blkid_get_cache, [blkid])
-AC_CHECK_FUNCS(blkid_get_cache)
+AC_SEARCH_LIBS_EXT(blkid_get_cache, [blkid], BLKID_LIBS)
+AC_CHECK_FUNC_EXT(blkid_get_cache, $BLKID_LIBS)
+SMB_EXT_LIB(BLKID,[${BLKID_LIBS}],[${BLKID_CFLAGS}],[${BLKID_CPPFLAGS}],[${BLKID_LDFLAGS}])
 if test x$ac_cv_func_blkid_get_cache = xyes; then
AC_DEFINE(HAVE_LIBBLKID,1,[Whether we have blkid support (e2fsprogs)])
 fi

Modified: branches/SAMBA_4_0/source/ntvfs/posix/config.mk
===
--- branches/SAMBA_4_0/source/ntvfs/posix/config.mk 2005-08-04 01:42:14 UTC 
(rev 9030)
+++ branches/SAMBA_4_0/source/ntvfs/posix/config.mk 2005-08-04 01:43:25 UTC 
(rev 9031)
@@ -31,6 +31,6 @@
ntvfs/posix/pvfs_acl.o \
ntvfs/posix/xattr_system.o \
ntvfs/posix/xattr_tdb.o
-REQUIRED_SUBSYSTEMS = NDR_XATTR ntvfs_common
+REQUIRED_SUBSYSTEMS = NDR_XATTR ntvfs_common EXT_LIB_XATTR EXT_LIB_BLKID
 # End MODULE ntvfs_posix
 



svn commit: samba r9032 - in trunk/source/registry: .

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-04 02:16:01 + (Thu, 04 Aug 2005)
New Revision: 9032

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

Log:
Fix the build
Modified:
   trunk/source/registry/reg_perfcount.c


Changeset:
Modified: trunk/source/registry/reg_perfcount.c
===
--- trunk/source/registry/reg_perfcount.c   2005-08-04 01:43:25 UTC (rev 
9031)
+++ trunk/source/registry/reg_perfcount.c   2005-08-04 02:16:01 UTC (rev 
9032)
@@ -757,11 +757,10 @@
unsigned long long PerfFreq, PerfTime, PerfTime100nSec;
TDB_CONTEXT *counters;
BOOL status;
+   pstring fname;
 
status = False;
 
-   pstring fname;
-
pstrcpy(fname, lp_counters_dir());
pstrcat(fname, /data.tdb);
 



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

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-04 02:27:30 + (Thu, 04 Aug 2005)
New Revision: 9033

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

Log:
Add the 'installmisc' make target back again

Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-04 02:16:01 UTC (rev 9032)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-04 02:27:30 UTC (rev 9033)
@@ -77,7 +77,7 @@
@echo   STLD_FLAGS = $(STLD_FLAGS)
@echo   SHLD_FLAGS = $(SHLD_FLAGS)
 
-install: showlayout installbin installdat installswat
+install: showlayout installbin installdat installswat installmisc
 
 # DESTDIR is used here to prevent packagers wasting their time
 # duplicating the Makefile. Remove it and you will have the privilege
@@ -103,8 +103,14 @@
 installman: installdirs
@$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
 
-uninstall: uninstallbin uninstallman
+installmisc: installdirs
+   @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(BINDIR)
 
+uninstall: uninstallbin uninstallman uninstallmisc
+
+uninstallmisc:
+   #FIXME
+
 uninstallbin:
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) 
$(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) 
$(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) 
$(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)



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

2005-08-03 Thread vlendec
Author: vlendec
Date: 2005-08-04 02:37:11 + (Thu, 04 Aug 2005)
New Revision: 9034

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

Log:
remove accidential commit
Modified:
   trunk/source/smbd/oplock.c


Changeset:
Modified: trunk/source/smbd/oplock.c
===
--- trunk/source/smbd/oplock.c  2005-08-04 02:27:30 UTC (rev 9033)
+++ trunk/source/smbd/oplock.c  2005-08-04 02:37:11 UTC (rev 9034)
@@ -145,9 +145,6 @@
SMB_ASSERT(exclusive_oplocks_open=0);
SMB_ASSERT(level_II_oplocks_open=0);

-   SMB_ASSERT(exclusive_oplocks_open=0);
-   SMB_ASSERT(level_II_oplocks_open=0);
-   
fsp-oplock_type = NO_OPLOCK;
fsp-sent_oplock_break = NO_BREAK_SENT;




svn commit: samba r9035 - in branches/SOC/SAMBA_4_0: . source/cldap_server source/nbt_server/dgram source/rpc_server/lsa source/rpc_server/netlogon source/rpc_server/samr

2005-08-03 Thread brad
Author: brad
Date: 2005-08-04 02:42:59 + (Thu, 04 Aug 2005)
New Revision: 9035

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-03 20:42:11 -0600
  [EMAIL PROTECTED]:  j0j0 | 2005-08-03 15:46:40 -0600
   [EMAIL PROTECTED] (orig r9011):  abartlet | 2005-08-03 12:30:21 -0600
   Remove more references to name as a netbios name, using the
   cross-reference instead.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r9015):  abartlet | 2005-08-03 13:58:58 -0600
   Fix access to BUILTIN again.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r9016):  abartlet | 2005-08-03 14:27:33 -0600
   More work to avoid abuse of the name attribute, this time on
   NETLOGON.
   
   Andrew Bartlett
   
  
 

Modified:
   branches/SOC/SAMBA_4_0/
   branches/SOC/SAMBA_4_0/source/cldap_server/netlogon.c
   branches/SOC/SAMBA_4_0/source/nbt_server/dgram/netlogon.c
   branches/SOC/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c
   branches/SOC/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
   branches/SOC/SAMBA_4_0/source/rpc_server/samr/dcesrv_samr.c


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


svn commit: samba r9036 - in branches/SOC/SAMBA_4_0: . source source/auth source/heimdal_build source/ntvfs/posix source/torture/libnet

2005-08-03 Thread brad
Author: brad
Date: 2005-08-04 02:43:11 + (Thu, 04 Aug 2005)
New Revision: 9036

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-03 20:42:12 -0600
  [EMAIL PROTECTED]:  j0j0 | 2005-08-03 20:36:51 -0600
   [EMAIL PROTECTED] (orig r9022):  abartlet | 2005-08-03 17:14:38 -0600
   One more step in the game of whack-a-mole with the PAC.
   
   This makes the PAC we generate match (closely) the PAC generated by my
   test win2k3 DC.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r9025):  metze | 2005-08-03 19:30:21 -0600
   fix the build when it was stoped and you don't run make clean before make all
   
   metze
   [EMAIL PROTECTED] (orig r9026):  metze | 2005-08-03 19:33:09 -0600
   remove autogenerated .x and .c files
   
   metze
   [EMAIL PROTECTED] (orig r9028):  metze | 2005-08-03 19:38:53 -0600
   make some function static 
   
   metze
   [EMAIL PROTECTED] (orig r9030):  metze | 2005-08-03 19:42:14 -0600
   add a AC_SEARCH_FUNCS_EXT() which takes an extra argument that get the 
output libs
   to not pollute the global $LIBS variable
   
   metze
   [EMAIL PROTECTED] (orig r9031):  metze | 2005-08-03 19:43:25 -0600
   don't use the global $LIBS variables for posix specific stuff
   
   metze
   [EMAIL PROTECTED] (orig r9033):  jelmer | 2005-08-03 20:27:30 -0600
   Add the 'installmisc' make target back again
   
  
 

Modified:
   branches/SOC/SAMBA_4_0/
   branches/SOC/SAMBA_4_0/source/aclocal.m4
   branches/SOC/SAMBA_4_0/source/auth/auth_sam_reply.c
   branches/SOC/SAMBA_4_0/source/heimdal_build/asn1_deps.pl
   branches/SOC/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SOC/SAMBA_4_0/source/main.mk
   branches/SOC/SAMBA_4_0/source/ntvfs/posix/config.m4
   branches/SOC/SAMBA_4_0/source/ntvfs/posix/config.mk
   branches/SOC/SAMBA_4_0/source/torture/libnet/libnet_share.c


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


svn commit: samba r9037 - in branches/SAMBA_4_0/source: libnet torture/libnet

2005-08-03 Thread mimir
Author: mimir
Date: 2005-08-04 02:51:26 + (Thu, 04 Aug 2005)
New Revision: 9037

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

Log:
New fields in usermod function - allow_password_change and
force_password_change datetime.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/composite.h
   branches/SAMBA_4_0/source/libnet/userman.c
   branches/SAMBA_4_0/source/torture/libnet/userman.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/composite.h
===
--- branches/SAMBA_4_0/source/libnet/composite.h2005-08-04 02:43:11 UTC 
(rev 9036)
+++ branches/SAMBA_4_0/source/libnet/composite.h2005-08-04 02:51:26 UTC 
(rev 9037)
@@ -67,6 +67,7 @@
 #define USERMOD_FIELD_PROFILE_PATH( 0x0200 )
 #define USERMOD_FIELD_ACCT_EXPIRY ( 0x4000 )
 #define USERMOD_FIELD_ALLOW_PASS_CHG  ( 0x8000 )
+#define USERMOD_FIELD_FORCE_PASS_CHG  ( 0x0001 )
 #define USERMOD_FIELD_ACCT_FLAGS  ( 0x0010 )
 
 struct libnet_rpc_usermod {
@@ -85,6 +86,7 @@
const char *profile_path;
struct timeval *acct_expiry;
struct timeval *allow_password_change;
+   struct timeval *force_password_change;
} change;
} in;
 };

Modified: branches/SAMBA_4_0/source/libnet/userman.c
===
--- branches/SAMBA_4_0/source/libnet/userman.c  2005-08-04 02:43:11 UTC (rev 
9036)
+++ branches/SAMBA_4_0/source/libnet/userman.c  2005-08-04 02:51:26 UTC (rev 
9037)
@@ -546,8 +546,21 @@
 
} else {
s-stage = USERMOD_QUERY;
+   return s-change.fields;
}
 
+   } else if (s-change.fields  USERMOD_FIELD_FORCE_PASS_CHG) {
+   *level = 3;
+
+   if (s-stage == USERMOD_QUERY) {
+   i-info3.force_password_change = 
timeval_to_nttime(s-change.force_password_change);
+   s-change.fields ^= 
USERMOD_FIELD_FORCE_PASS_CHG;
+
+   } else {
+   s-stage = USERMOD_QUERY;
+   return s-change.fields;
+   }
+
} else if (s-change.fields  USERMOD_FIELD_LOGON_SCRIPT) {
*level = 11;
i-info11.logon_script.string = s-change.logon_script;

Modified: branches/SAMBA_4_0/source/torture/libnet/userman.c
===
--- branches/SAMBA_4_0/source/torture/libnet/userman.c  2005-08-04 02:43:11 UTC 
(rev 9036)
+++ branches/SAMBA_4_0/source/torture/libnet/userman.c  2005-08-04 02:51:26 UTC 
(rev 9037)
@@ -418,15 +418,19 @@
int i;
 
struct timeval expiry = { 12345, 67890 };
+   struct timeval allow  = { 67890, 12345 };
+   struct timeval force  = { 3, 55444 };
 
struct usermod_change changes[] = {
-   { USERMOD_FIELD_ACCOUNT_NAME, changed, NULL, NULL, NULL, 
NULL, NULL, NULL, NULL },
-   { USERMOD_FIELD_FULL_NAME,NULL, Testing full account 
name, NULL, NULL, NULL, NULL, NULL, NULL },
-   { USERMOD_FIELD_DESCRIPTION,  NULL, NULL, Description of 
tested account, NULL, NULL, NULL, NULL, NULL },
-   { USERMOD_FIELD_COMMENT,  NULL, NULL, NULL, Comment for 
the tested account, NULL, NULL, NULL, NULL },
-   { USERMOD_FIELD_LOGON_SCRIPT, NULL, NULL, NULL, NULL, 
test_logon.cmd, NULL, NULL, NULL },
-   { USERMOD_FIELD_PROFILE_PATH, NULL, NULL, NULL, NULL, NULL, 
TESTSRV\\profiles\\test, NULL, NULL },
-   { USERMOD_FIELD_ACCT_EXPIRY,  NULL, NULL, NULL, NULL, NULL, 
NULL, expiry, NULL }
+   { USERMOD_FIELD_ACCOUNT_NAME,   changed, NULL, NULL, NULL, 
NULL, NULL, NULL, NULL, NULL },
+   { USERMOD_FIELD_FULL_NAME,  NULL, Testing full account 
name, NULL, NULL, NULL, NULL, NULL, NULL, NULL },
+   { USERMOD_FIELD_DESCRIPTION,NULL, NULL, Description of 
tested account, NULL, NULL, NULL, NULL, NULL, NULL },
+   { USERMOD_FIELD_COMMENT,NULL, NULL, NULL, Comment for 
the tested account, NULL, NULL, NULL, NULL, NULL },
+   { USERMOD_FIELD_LOGON_SCRIPT,   NULL, NULL, NULL, NULL, 
test_logon.cmd, NULL, NULL, NULL, NULL },
+   { USERMOD_FIELD_PROFILE_PATH,   NULL, NULL, NULL, NULL, NULL, 
TESTSRV\\profiles\\test, NULL, NULL, NULL },
+   { USERMOD_FIELD_ACCT_EXPIRY,NULL, NULL, NULL, NULL, NULL, 
NULL, expiry, NULL, NULL },
+   { USERMOD_FIELD_ALLOW_PASS_CHG, NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, allow, NULL },
+   { USERMOD_FIELD_FORCE_PASS_CHG, NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL, force }
};

   

svn commit: samba r9038 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/script branches/SAMBA_4_0/source branches/SAMBA_4_0/source/script trunk/source trunk/source/script

2005-08-03 Thread lmuelle
Author: lmuelle
Date: 2005-08-04 02:59:19 + (Thu, 04 Aug 2005)
New Revision: 9038

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

Log:
Revert svn rev 414.  Discussed with Jerry and Metze.

We need the option to add an 'a' if we're already in pre or rc state
with the next release.

Bugzilla Bug 2618

Modified:
   branches/SAMBA_3_0/source/VERSION
   branches/SAMBA_3_0/source/script/mkversion.sh
   branches/SAMBA_4_0/source/VERSION
   branches/SAMBA_4_0/source/script/mkversion.sh
   trunk/source/VERSION
   trunk/source/script/mkversion.sh


Changeset:
Modified: branches/SAMBA_3_0/source/VERSION
===
--- branches/SAMBA_3_0/source/VERSION   2005-08-04 02:51:26 UTC (rev 9037)
+++ branches/SAMBA_3_0/source/VERSION   2005-08-04 02:59:19 UTC (rev 9038)
@@ -22,6 +22,18 @@
 SAMBA_VERSION_RELEASE=20
 
 
+# If a official release has a serious bug  #
+# a security release will have 'a' sufffix #
+#  #
+# so SAMBA's version will be   #
+# MAJOR.MINOR.RELEASEREVISION  #
+#  #
+# e.g. SAMBA_VERSION_PRE_RELEASE=a #
+#  -  2.2.8a#
+
+SAMBA_VERSION_REVISION=
+
+
 # For 'pre' releases the version will be   #
 #  #
 # MAJOR.MINOR.RELEASEprePRE_RELEASE#

Modified: branches/SAMBA_3_0/source/script/mkversion.sh
===
--- branches/SAMBA_3_0/source/script/mkversion.sh   2005-08-04 02:51:26 UTC 
(rev 9037)
+++ branches/SAMBA_3_0/source/script/mkversion.sh   2005-08-04 02:59:19 UTC 
(rev 9038)
@@ -18,6 +18,8 @@
 SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' 
$SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
+SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' 
$SOURCE_DIR$VERSION_FILE`
+
 SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
@@ -36,7 +38,10 @@
 
SAMBA_VERSION_STRING=${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}
 
 
-if test -n ${SAMBA_VERSION_PRE_RELEASE};then
+if test -n ${SAMBA_VERSION_REVISION};then
+SAMBA_VERSION_STRING=${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}
+echo #define SAMBA_VERSION_REVISION \${SAMBA_VERSION_REVISION}\  
$OUTPUT_FILE
+elif test -n ${SAMBA_VERSION_PRE_RELEASE};then
 
SAMBA_VERSION_STRING=${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}
 echo #define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}  
$OUTPUT_FILE
 elif test -n ${SAMBA_VERSION_RC_RELEASE};then

Modified: branches/SAMBA_4_0/source/VERSION
===
--- branches/SAMBA_4_0/source/VERSION   2005-08-04 02:51:26 UTC (rev 9037)
+++ branches/SAMBA_4_0/source/VERSION   2005-08-04 02:59:19 UTC (rev 9038)
@@ -22,6 +22,18 @@
 SAMBA_VERSION_RELEASE=0
 
 
+# If a official release has a serious bug  #
+# a security release will have 'a' sufffix #
+#  #
+# so SAMBA's version will be   #
+# MAJOR.MINOR.RELEASEREVISION  #
+#  #
+# e.g. SAMBA_VERSION_PRE_RELEASE=a #
+#  -  2.2.8a#
+
+SAMBA_VERSION_REVISION=
+
+
 # For 'pre' releases the version will be   #
 #  #
 # MAJOR.MINOR.RELEASEprePRE_RELEASE#

Modified: branches/SAMBA_4_0/source/script/mkversion.sh
===
--- branches/SAMBA_4_0/source/script/mkversion.sh   2005-08-04 02:51:26 UTC 
(rev 9037)
+++ branches/SAMBA_4_0/source/script/mkversion.sh   2005-08-04 02:59:19 UTC 
(rev 9038)
@@ -18,6 +18,8 @@
 SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' 
$SOURCE_DIR$VERSION_FILE`
 SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
+SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' 
$SOURCE_DIR$VERSION_FILE`
+
 SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_RC_RELEASE=`sed 

svn commit: samba r9039 - in trunk/source: include rpc_server smbd

2005-08-03 Thread jra
Author: jra
Date: 2005-08-04 03:04:58 + (Thu, 04 Aug 2005)
New Revision: 9039

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

Log:
Added comments to 2 factor auth in sesssetup.c.
We now create the reply blob for the SPNEGO ntlmssp blob - now
to learn how to return it...
Jeremy.

Modified:
   trunk/source/include/ntdomain.h
   trunk/source/rpc_server/srv_pipe.c
   trunk/source/smbd/sesssetup.c


Changeset:
Modified: trunk/source/include/ntdomain.h
===
--- trunk/source/include/ntdomain.h 2005-08-04 02:59:19 UTC (rev 9038)
+++ trunk/source/include/ntdomain.h 2005-08-04 03:04:58 UTC (rev 9039)
@@ -185,11 +185,6 @@
uint32 ntlmssp_seq_num;
 };
 
-/* auth state for spnego ntlmssp. */
-struct spnego_ntlmssp_auth_struct {
-   AUTH_NTLMSSP_STATE *auth_ntlmssp_state;
-};
-
 /* auth state for all bind types. */
 
 struct pipe_auth_data {
@@ -197,7 +192,7 @@
union {
struct ntlmssp_auth_struct *ntlmssp_auth;
struct schannel_auth_struct *schannel_auth;
-   struct spnego_ntlmssp_auth_struct *spnego_auth;
+   AUTH_NTLMSSP_STATE *auth_ntlmssp_state;
} a_u;
void (*auth_data_free_func)(struct pipe_auth_data *);
 };

Modified: trunk/source/rpc_server/srv_pipe.c
===
--- trunk/source/rpc_server/srv_pipe.c  2005-08-04 02:59:19 UTC (rev 9038)
+++ trunk/source/rpc_server/srv_pipe.c  2005-08-04 03:04:58 UTC (rev 9039)
@@ -839,6 +839,7 @@
 /***
  Register commands to an RPC pipe
 ***/
+
 NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char 
*srv, const struct api_struct *cmds, int size)
 {
 struct rpc_table *rpc_entry;
@@ -898,26 +899,33 @@
 
 static void free_pipe_spnego_auth_data(struct pipe_auth_data *auth)
 {
-   AUTH_NTLMSSP_STATE *a = auth-a_u.spnego_auth-auth_ntlmssp_state;
+   AUTH_NTLMSSP_STATE *a = auth-a_u.auth_ntlmssp_state;
 
if (a) {
auth_ntlmssp_end(a);
}
+   auth-a_u.auth_ntlmssp_state = NULL;
 }
 
 /***
- Handle a SPNEGO bind auth.
+ Handle the first part of a SPNEGO bind auth.
 ***/
 
 static BOOL pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct 
*rpc_in_p, RPC_HDR_AUTH *pauth_info, prs_struct *pout_auth)
 {
-DATA_BLOB secblob;
DATA_BLOB blob;
+   DATA_BLOB secblob;
+   DATA_BLOB response;
+   DATA_BLOB chal;
char *OIDs[ASN1_MAX_OIDS];
 int i;
+   NTSTATUS status;
 BOOL got_kerberos_mechanism = False;
+   AUTH_NTLMSSP_STATE *a = NULL;
 
ZERO_STRUCT(secblob);
+   ZERO_STRUCT(chal);
+   ZERO_STRUCT(response);
 
/* Grab the SPNEGO blob. */
blob = data_blob(NULL,p-hdr.auth_len);
@@ -925,20 +933,17 @@
if (!prs_copy_data_out(blob.data, rpc_in_p, p-hdr.auth_len)) {
DEBUG(0,(pipe_spnego_auth_bind_negotiate: Failed to pull %u 
bytes - the SPNEGO auth header.\n,
(unsigned int)p-hdr.auth_len ));
-   data_blob_free(blob);
-   return False;
+   goto err;
}
 
if (blob.data[0] != ASN1_APPLICATION(0)) {
-   data_blob_free(blob);
-   return False;
+   goto err;
}
 
/* parse out the OIDs and the first sec blob */
if (!parse_negTokenTarg(blob, OIDs, secblob)) {
DEBUG(0,(pipe_spnego_auth_bind_negotiate: Failed to parse the 
security blob.\n));
-   data_blob_free(blob);
-   return False;
+   goto err;
 }
 
if (strcmp(OID_KERBEROS5, OIDs[0]) == 0 || strcmp(OID_KERBEROS5_OLD, 
OIDs[0]) == 0) {
@@ -958,35 +963,56 @@
return ret;
}
 
-   if (p-auth.auth_type == PIPE_AUTH_TYPE_SPNEGO_NTLMSSP  
p-auth.a_u.spnego_auth) {
+   if (p-auth.auth_type == PIPE_AUTH_TYPE_SPNEGO_NTLMSSP  
p-auth.a_u.auth_ntlmssp_state) {
/* Free any previous auth type. */
free_pipe_spnego_auth_data(p-auth);
}
 
-   p-auth.a_u.spnego_auth = TALLOC_P(p-pipe_state_mem_ctx, struct 
spnego_ntlmssp_auth_struct);
-   if (!p-auth.a_u.spnego_auth) {
-   return False;
+   /* Initialize the NTLM engine. */
+   status = auth_ntlmssp_start(a);
+   if (!NT_STATUS_IS_OK(status)) {
+   goto err;
}
 
+   /*
+* Pass the first security blob of data to it.
+* This can return an error or NT_STATUS_MORE_PROCESSING_REQUIRED
+* which means we need another packet to complete the bind.
+*/
+
+

svn commit: samba r9040 - branches/SAMBA_3_0/source/rpc_client trunk/source/rpc_client

2005-08-03 Thread jerry
Author: jerry
Date: 2005-08-04 03:11:02 + (Thu, 04 Aug 2005)
New Revision: 9040

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

Log:
revert pointer checks that I had removed; fixes crash in calls to 
enumprinterdata()
Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c
   trunk/source/rpc_client/cli_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c  2005-08-04 03:04:58 UTC 
(rev 9039)
+++ branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c  2005-08-04 03:11:02 UTC 
(rev 9040)
@@ -1586,9 +1586,11 @@
spoolss_io_q_enumprinterdata,
spoolss_io_r_enumprinterdata, 
WERR_GENERAL_FAILURE );
-   
-   *value_needed = out.realvaluesize;
-   *data_needed = out.realdatasize;
+
+   if ( value_needed )
+   *value_needed = out.realvaluesize;
+   if ( data_offered )
+   *data_needed = out.realdatasize;

if (!W_ERROR_IS_OK(out.status))
return out.status;

Modified: trunk/source/rpc_client/cli_spoolss.c
===
--- trunk/source/rpc_client/cli_spoolss.c   2005-08-04 03:04:58 UTC (rev 
9039)
+++ trunk/source/rpc_client/cli_spoolss.c   2005-08-04 03:11:02 UTC (rev 
9040)
@@ -1586,9 +1586,11 @@
spoolss_io_q_enumprinterdata,
spoolss_io_r_enumprinterdata, 
WERR_GENERAL_FAILURE );
-   
-   *value_needed = out.realvaluesize;
-   *data_needed = out.realdatasize;
+
+   if ( value_needed )
+   *value_needed = out.realvaluesize;
+   if ( data_offered )
+   *data_needed = out.realdatasize;

if (!W_ERROR_IS_OK(out.status))
return out.status;



svn commit: samba-web r765 - in trunk/vendors: .

2005-08-03 Thread deryck
Author: deryck
Date: 2005-08-04 03:23:15 + (Thu, 04 Aug 2005)
New Revision: 765

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

Log:
Update email contact for IBM product on vendors page.

deryck
Modified:
   trunk/vendors/ibm.html


Changeset:
Modified: trunk/vendors/ibm.html
===
--- trunk/vendors/ibm.html  2005-07-30 19:24:46 UTC (rev 764)
+++ trunk/vendors/ibm.html  2005-08-04 03:23:15 UTC (rev 765)
@@ -11,7 +11,7 @@
 liVirtualization and High Availability functions/li
 pIBM Global Services has a considerable experience in implementing Samba and 
Linux in non-open environments and stands for successful integration and 
business-optimization. The autonomic capability of IBM Open Enterprise System 
Virtualization will lower operating costs and provide highest quality 
services./p
 
-pContact a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a for 
additional Information./p
+pContact a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a for 
additional Information./p
 
 /td
 /tr



svn commit: samba r9041 - branches/SAMBA_3_0/source/rpc_client trunk/source/rpc_client

2005-08-03 Thread gd
Author: gd
Date: 2005-08-04 03:25:33 + (Thu, 04 Aug 2005)
New Revision: 9041

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

Log:
typo. Thanks jerry.

Guenther


Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c
   trunk/source/rpc_client/cli_spoolss.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c  2005-08-04 03:11:02 UTC 
(rev 9040)
+++ branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c  2005-08-04 03:25:33 UTC 
(rev 9041)
@@ -1589,7 +1589,7 @@
 
if ( value_needed )
*value_needed = out.realvaluesize;
-   if ( data_offered )
+   if ( data_needed )
*data_needed = out.realdatasize;

if (!W_ERROR_IS_OK(out.status))

Modified: trunk/source/rpc_client/cli_spoolss.c
===
--- trunk/source/rpc_client/cli_spoolss.c   2005-08-04 03:11:02 UTC (rev 
9040)
+++ trunk/source/rpc_client/cli_spoolss.c   2005-08-04 03:25:33 UTC (rev 
9041)
@@ -1589,7 +1589,7 @@
 
if ( value_needed )
*value_needed = out.realvaluesize;
-   if ( data_offered )
+   if ( data_needed )
*data_needed = out.realdatasize;

if (!W_ERROR_IS_OK(out.status))



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:20:26 + (Thu, 04 Aug 2005)
New Revision: 9042

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

Log:
fixed the valgrind error in the RAW-SFILEINFO test






Modified:
   branches/SAMBA_4_0/source/torture/raw/setfileinfo.c
   branches/SAMBA_4_0/source/torture/torture_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/setfileinfo.c
===
--- branches/SAMBA_4_0/source/torture/raw/setfileinfo.c 2005-08-04 03:25:33 UTC 
(rev 9041)
+++ branches/SAMBA_4_0/source/torture/raw/setfileinfo.c 2005-08-04 04:20:26 UTC 
(rev 9042)
@@ -174,6 +174,14 @@
dump_all_info(mem_ctx, finfo1); \
}} while (0)
 
+#define CHECK_STATUS(status, correct) do { \
+   if (!NT_STATUS_EQUAL(status, correct)) { \
+   printf((%s) Incorrect status %s - should be %s\n, \
+  __location__, nt_errstr(status), nt_errstr(correct)); \
+   ret = False; \
+   goto done; \
+   }} while (0)
+

printf(test setattr\n);
sfinfo.setattr.in.attrib = FILE_ATTRIBUTE_READONLY;
@@ -485,6 +493,7 @@
 
printf(Trying rename with a root fid\n);
status = create_directory_handle(cli-tree, BASEDIR, d_fnum);
+   CHECK_STATUS(status, NT_STATUS_OK);
sfinfo.rename_information.in.new_name  = 
fnum_fname_new+strlen(BASEDIR)+1;
sfinfo.rename_information.in.root_fid = d_fnum;
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_INVALID_PARAMETER);

Modified: branches/SAMBA_4_0/source/torture/torture_util.c
===
--- branches/SAMBA_4_0/source/torture/torture_util.c2005-08-04 03:25:33 UTC 
(rev 9041)
+++ branches/SAMBA_4_0/source/torture/torture_util.c2005-08-04 04:20:26 UTC 
(rev 9042)
@@ -58,7 +58,7 @@
io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | 
NTCREATEX_SHARE_ACCESS_WRITE;
io.ntcreatex.in.alloc_size = 0;
-   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_CREATE;
+   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
io.ntcreatex.in.security_flags = 0;
io.ntcreatex.in.fname = dname;
@@ -73,6 +73,7 @@
return status;
 }
 
+
 /*
   sometimes we need a fairly complex file to work with, so we can test
   all possible attributes. 



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:20:43 + (Thu, 04 Aug 2005)
New Revision: 9043

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

Log:
fixed return code in RAW-STREAMS test







Modified:
   branches/SAMBA_4_0/source/torture/raw/streams.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/streams.c
===
--- branches/SAMBA_4_0/source/torture/raw/streams.c 2005-08-04 04:20:26 UTC 
(rev 9042)
+++ branches/SAMBA_4_0/source/torture/raw/streams.c 2005-08-04 04:20:43 UTC 
(rev 9043)
@@ -206,7 +206,7 @@
 
 done:
smbcli_close(cli-tree, fnum);
-   return True;
+   return ret;
 }
 
 /* 



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:21:03 + (Thu, 04 Aug 2005)
New Revision: 9044

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

Log:
added a comment so you can see what this test does :-)








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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/open.c
===
--- branches/SAMBA_4_0/source/torture/raw/open.c2005-08-04 04:20:43 UTC 
(rev 9043)
+++ branches/SAMBA_4_0/source/torture/raw/open.c2005-08-04 04:21:03 UTC 
(rev 9044)
@@ -969,7 +969,8 @@
NTSTATUS status;
BOOL ret = True;
 
-   /* reasonable default parameters */
+   printf(Testing ntcreatex with a byte range locked file\n);
+
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED;
io.ntcreatex.in.root_fid = 0;



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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:21:52 + (Thu, 04 Aug 2005)
New Revision: 9045

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

Log:
be friendly towards servers that don't understand the 'share' form for tconx, 
instead of the \\server\share
form









Modified:
   branches/SAMBA_4_0/source/torture/raw/context.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/context.c
===
--- branches/SAMBA_4_0/source/torture/raw/context.c 2005-08-04 04:21:03 UTC 
(rev 9044)
+++ branches/SAMBA_4_0/source/torture/raw/context.c 2005-08-04 04:21:52 UTC 
(rev 9045)
@@ -262,7 +262,7 @@
 {
NTSTATUS status;
BOOL ret = True;
-   const char *share;
+   const char *share, *host;
struct smbcli_tree *tree;
union smb_tcon tcon;
union smb_open io;
@@ -279,6 +279,7 @@
}
 
share = lp_parm_string(-1, torture, share);
+   host  = lp_parm_string(-1, torture, host);

printf(create a second tree context on the same session\n);
tree = smbcli_tree_init(cli-session, mem_ctx, False);
@@ -286,10 +287,11 @@
tcon.generic.level = RAW_TCON_TCONX;
tcon.tconx.in.flags = 0;
tcon.tconx.in.password = data_blob(NULL, 0);
-   tcon.tconx.in.path = share;
+   tcon.tconx.in.path = talloc_asprintf(mem_ctx, %s\\%s, host, 
share);
tcon.tconx.in.device = A:;
status = smb_tree_connect(tree, mem_ctx, tcon);
CHECK_STATUS(status, NT_STATUS_OK);
+   
 
tree-tid = tcon.tconx.out.tid;
printf(tid1=%d tid2=%d\n, cli-tree-tid, tree-tid);



svn commit: lorikeet r392 - in trunk/sangria/src/LatestDesign/classes: . GroupManager

2005-08-03 Thread amit
Author: amit
Date: 2005-08-04 04:22:51 + (Thu, 04 Aug 2005)
New Revision: 392

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

Log:
new class added to manage the group. creation , deletion ang group mapping if 
possible 
Added:
   trunk/sangria/src/LatestDesign/classes/GroupManager/
   trunk/sangria/src/LatestDesign/classes/GroupManager/GroupManagerClass.py


Changeset:
Added: trunk/sangria/src/LatestDesign/classes/GroupManager/GroupManagerClass.py
===
--- trunk/sangria/src/LatestDesign/classes/GroupManager/GroupManagerClass.py
2005-08-02 19:34:41 UTC (rev 391)
+++ trunk/sangria/src/LatestDesign/classes/GroupManager/GroupManagerClass.py
2005-08-04 04:22:51 UTC (rev 392)
@@ -0,0 +1,207 @@
+
+import sys,os,commands
+import string
+
+
+class GroupManager:
+
+def __init__(self, GroupFile):
+self.GroupFile = GroupFile
+
+### method for UNIX group Handling ...
+
+def AddUnixGroup(self, GroupName):
+''' add a user group '''
+
+cmd = groupadd %s %(GroupName)
+( status, cmd_output ) = commands.getstatusoutput( cmd )
+if status:
+print cmd_output
+return 0
+
+return 1  
+
+def ListUnixGroups(self):
+
+list = []
+groupFile = file(self.GroupFile , 'r+')
+line = groupFile.readline()
+while line:
+split = string.split(line , ':')
+list.append(split[0])
+line = groupFile.readline()
+groupFile.close()
+return list
+
+
+def CheckIfUnixGroupExist(self, GroupName):
+for name in self.ListUnixGroups():
+if name == GroupName:
+return 1
+return 0
+
+
+def RemoveUnixGroup(self, GroupName):
+
+cmd = groupdel %s %(GroupName)
+( status, cmd_output ) = commands.getstatusoutput( cmd )
+if status:
+print cmd_output
+return 0
+
+return 1   
+
+
+def AddUserToUnixGroup(self, UserName , GroupName):
+cmd = usermod -G %s %s%( GroupName , UserName)
+( status, cmd_output ) = commands.getstatusoutput( cmd )
+if status:
+print cmd_output
+return 0
+return 1   
+
+def RemoveUserFromUnixGroup(self, UserName , GroupName):
+''' delete the userName from the line corresponding to the GroupName 
in /etc/group
+or
+know all users in that group and then delete the group and add the 
group for all other users ... 
+'''
+
+ret = self.CheckIfUnixGroupExist(GroupName)
+if not ret:
+return 0
+
+users_in_group = self.ListUsersInUnixGroup(GroupName)
+if not users_in_group:
+return 0
+ret = self.RemoveUnixGroup(GroupName)
+if ret:
+ret = self.AddUnixGroup(GroupName)
+
+for user in users_in_group:
+if not user == UserName:
+self.AddUserToUnixGroup(user, GroupName)
+
+def ListUsersInUnixGroup(self , GroupName):
+''' the slash n at the end is giving problems '''
+ret = self.CheckIfUnixGroupExist(GroupName)
+if not ret:
+return 0 
+list = []
+groupFile = file(self.GroupFile , 'r+')
+line = groupFile.readline()
+while line:
+split = string.split(line , ':')
+if split[0] == GroupName:
+resplit = string.split(split[3] , ',')
+for i in range(0 , len(resplit)):
+list.append(string.strip(resplit[i]))
+return list
+line = groupFile.readline()
+groupFile.close()
+return 0
+
+
+
+### methods for SAMBA group Handling ...
+
+def GetMaxRID(self):
+''' returns the maximum RID value '''
+
+cmd = net maxrid
+( status, cmd_output ) = commands.getstatusoutput( cmd )
+if status:
+print cmd_output
+return 0
+
+split = string.split(cmd_output , :)
+rid = string.atoi(split[1])
+return rid   
+
+
+def AddSambaGroup(self, sambagroupnameORntgroup , unixgroup , type = None 
):
+'''{rid=int|sid=string} unixgroup=string [type={domain|local}] 
[ntgroup=string] [comment=string]'''
+
+rid = self.GetMaxRID() + 1
+cmd = net groupmap add ntgroup=\%s\ unixgroup=\%s\ 
rid=%d%(sambagroupnameORntgroup,unixgroup , rid)
+if type:
+cmd = cmd+ type=%s%type
+
+( status, cmd_output ) = commands.getstatusoutput( cmd )
+if status:
+print cmd_output
+return 0
+
+return 1   
+
+
+def ModifySambaGroup(self, sambagroupnameORntgroup , unixgroup=None , 
type=None):
+''' 

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

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:23:08 + (Thu, 04 Aug 2005)
New Revision: 9046

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

Log:
fixed display of privileges in RAW-ACLS test










Modified:
   branches/SAMBA_4_0/source/torture/raw/acls.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/acls.c
===
--- branches/SAMBA_4_0/source/torture/raw/acls.c2005-08-04 04:21:52 UTC 
(rev 9045)
+++ branches/SAMBA_4_0/source/torture/raw/acls.c2005-08-04 04:23:08 UTC 
(rev 9046)
@@ -543,7 +543,7 @@
if (!NT_STATUS_IS_OK(status)) {
printf(smblsa_sid_check_privilege - %s\n, nt_errstr(status));
}
-   printf(SEC_PRIV_TAKE_OWNERSHIP - %s\n, 
has_restore_privilege?Yes:No);
+   printf(SEC_PRIV_TAKE_OWNERSHIP - %s\n, 
has_take_ownership_privilege?Yes:No);
 
for (i=0;iARRAY_SIZE(file_mappings);i++) {
uint32_t expected_mask = 
@@ -823,7 +823,7 @@
if (!NT_STATUS_IS_OK(status)) {
printf(smblsa_sid_check_privilege - %s\n, nt_errstr(status));
}
-   printf(SEC_PRIV_TAKE_OWNERSHIP - %s\n, 
has_restore_privilege?Yes:No);
+   printf(SEC_PRIV_TAKE_OWNERSHIP - %s\n, 
has_take_ownership_privilege?Yes:No);
 
sd = security_descriptor_create(mem_ctx,
NULL, NULL,



svn commit: samba r9047 - in branches/SAMBA_4_0/source/torture/basic: .

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:23:40 + (Thu, 04 Aug 2005)
New Revision: 9047

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

Log:
show the order of the server/correct output to make it easier to demo this test 
;)











Modified:
   branches/SAMBA_4_0/source/torture/basic/denytest.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/denytest.c
===
--- branches/SAMBA_4_0/source/torture/basic/denytest.c  2005-08-04 04:23:08 UTC 
(rev 9046)
+++ branches/SAMBA_4_0/source/torture/basic/denytest.c  2005-08-04 04:23:40 UTC 
(rev 9047)
@@ -1785,6 +1785,8 @@
int failures = 0;
uint8_t buf[1];
 
+   printf(format: server correct\n);
+
ZERO_STRUCT(buf);
 
fname = talloc_asprintf(cli1, \\ntdeny_%d.dll, client);



svn commit: samba r9048 - in branches/SAMBA_4_0/source: include libcli/util

2005-08-03 Thread tridge
Author: tridge
Date: 2005-08-04 04:24:37 + (Thu, 04 Aug 2005)
New Revision: 9048

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

Log:
added a new DOS error code (thanks to EMC)

Modified:
   branches/SAMBA_4_0/source/include/doserr.h
   branches/SAMBA_4_0/source/libcli/util/nterr.c


Changeset:
Modified: branches/SAMBA_4_0/source/include/doserr.h
===
--- branches/SAMBA_4_0/source/include/doserr.h  2005-08-04 04:23:40 UTC (rev 
9047)
+++ branches/SAMBA_4_0/source/include/doserr.h  2005-08-04 04:24:37 UTC (rev 
9048)
@@ -72,6 +72,7 @@
 #define ERRpipeclosing 232 /* named pipe close in progress */
 #define ERRnotconnected 233 /* No process on other end of named pipe */
 #define ERRmoredata 234 /* More data to be returned */
+#define ERReainconsistent 255 /* from EMC */
 #define ERRnomoreitems 259
 #define ERRbaddirectory 267 /* Invalid directory name in a path. */
 #define ERReasnotsupported 282 /* Extended attributes */

Modified: branches/SAMBA_4_0/source/libcli/util/nterr.c
===
--- branches/SAMBA_4_0/source/libcli/util/nterr.c   2005-08-04 04:23:40 UTC 
(rev 9047)
+++ branches/SAMBA_4_0/source/libcli/util/nterr.c   2005-08-04 04:24:37 UTC 
(rev 9048)
@@ -614,6 +614,7 @@
DOS_CODE(ERRDOS, ERRinvalidprintmonitor),
DOS_CODE(ERRDOS, ERRprintmonitorinuse),
DOS_CODE(ERRDOS, ERRprinterhasjobsqueued),
+   DOS_CODE(ERRDOS, ERReainconsistent),
 
DOS_CODE(ERRSRV, ERRerror),
DOS_CODE(ERRSRV, ERRbadpw),



svn commit: samba r9049 - in branches/SAMBA_4_0/source: . build/smb_build heimdal_build

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 04:45:42 + (Thu, 04 Aug 2005)
New Revision: 9049

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

Log:
- add property dependencies to include/proto.h
- make some stuff easier

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-04 
04:24:37 UTC (rev 9048)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-04 
04:45:42 UTC (rev 9049)
@@ -466,34 +466,12 @@
 ;
 }
 
-sub _prepare_proto_rules()
+sub _prepare_clean_rules()
 {
my $output =  '__EOD__';
-# Making this target will just make sure that the prototype files
-# exist, not necessarily that they are up to date.  Since they're
-# removed by 'make clean' this will always be run when you do anything
-# afterwards.
-proto_exists: include/proto.h
-
-delheaders: pch_clean
-   -rm -f $(builddir)/include/proto.h
-
-include/proto.h:
-   @cd $(srcdir)  $(SHELL) script/mkproto.sh $(PERL) \
- -h _PROTO_H_ $(builddir)/include/proto.h \
- $(PROTO_PROTO_OBJS)
-
-# 'make headers' or 'make proto' calls a subshell because we need to
-# make sure these commands are executed in sequence even for a
-# parallel make.
-headers: delheaders proto_exists
-
-proto: idl headers
-
-proto_test:
-   @[ -f $(builddir)/include/proto.h ] || $(MAKE) proto
-
-clean: delheaders heimdal_clean
+clean: heimdal_clean
+   @echo Removing headers
+   @-rm -f include/proto.h
@echo Removing objects
@-find . -name '*.o' -exec rm -f '{}' \;
@echo Removing binaries
@@ -577,7 +555,7 @@
($output .= _prepare_custom_rule($key) ) if $key-{TYPE} eq 
TARGET;
}
 
-   $output .= _prepare_proto_rules();
+   $output .= _prepare_clean_rules();
 
return $output;
 }

Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 04:24:37 UTC 
(rev 9048)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 04:45:42 UTC 
(rev 9049)
@@ -395,6 +395,18 @@
 include ./heimdal_build/et_deps.pl heimdal/lib/krb5/k524_err.et|
 include ./heimdal_build/et_deps.pl heimdal/lib/krb5/krb5_err.et|
 
+heimdal_basics: \
+   heimdal/lib/hdb/hdb_asn1.h \
+   heimdal/lib/gssapi/spnego_asn1.h \
+   heimdal/lib/asn1/krb5_asn1.h \
+   heimdal/lib/roken/vis.h \
+   heimdal/lib/roken/err.h \
+   heimdal/lib/asn1/asn1_err.h \
+   heimdal/lib/hdb/hdb_err.h \
+   heimdal/lib/krb5/heim_err.h \
+   heimdal/lib/krb5/k524_err.h \
+   heimdal/lib/krb5/krb5_err.h
+
 heimdal_clean:
@echo Removing generated ASN1 files
@-find heimdal/lib/asn1 -name 'asn1_*.[cx]' -exec rm -f '{}' \;

Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-04 04:24:37 UTC (rev 9048)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-04 04:45:42 UTC (rev 9049)
@@ -52,7 +52,7 @@
 include lib/replace/config.mk
 include scripting/ejs/config.mk
 
-all: proto bin/asn1_compile bin/compile_et basics binaries
+all: binary_asn1_compile binary_compile_et binaries
 binaries: $(BIN_PROGS) $(SBIN_PROGS)
 manpages: $(MANPAGES)
 everything: all
@@ -141,13 +141,26 @@
 build/pidl/smb_interfaces.pm: build/pidl/smb_interfaces.yp
-yapp -s -m 'smb_interfaces' -o build/pidl/smb_interfaces.pm 
build/pidl/smb_interfaces.yp 
 
+include/config.h:
+   @echo include/config.h not present
+   @echo You need to rerun ./autogen.sh and ./configure
+   @/bin/false
+
+include/proto.h: $(PROTO_PROTO_OBJS:.o=.c)
+   @-rm -f include/includes.h.gch
+   @$(SHELL) script/mkproto.sh $(PERL) \
+ -h _PROTO_H_ include/proto.h \
+ $(PROTO_PROTO_OBJS)
+   @touch include/proto.h
+
+proto: include/proto.h
 pch: proto include/includes.h.gch
 
-pch_clean:
-   -rm -f include/includes.h.gch
+basics: include/config.h \
+   include/proto.h \
+   idl \
+   heimdal_basics
 
-basics: idl proto_exists heimdal/lib/hdb/hdb_asn1.h 
heimdal/lib/gssapi/spnego_asn1.h heimdal/lib/asn1/krb5_asn1.h 
heimdal/lib/roken/vis.h heimdal/lib/roken/err.h heimdal/lib/asn1/asn1_err.h 
heimdal/lib/hdb/hdb_err.h heimdal/lib/krb5/heim_err.h 
heimdal/lib/krb5/k524_err.h heimdal/lib/krb5/krb5_err.h
-
 test: $(DEFAULT_TEST_TARGET)
 
 test-swrap: all



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

2005-08-03 Thread metze
Author: metze
Date: 2005-08-04 04:53:06 + (Thu, 04 Aug 2005)
New Revision: 9050

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

Log:
fix make pch all

metze
Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-04 04:45:42 UTC (rev 9049)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-04 04:53:06 UTC (rev 9050)
@@ -154,7 +154,10 @@
@touch include/proto.h
 
 proto: include/proto.h
-pch: proto include/includes.h.gch
+pch: include/config.h \
+   include/proto.h \
+   idl \
+   include/includes.h.gch
 
 basics: include/config.h \
include/proto.h \



svn commit: samba r9051 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

2005-08-03 Thread lmuelle
Author: lmuelle
Date: 2005-08-04 04:57:51 + (Thu, 04 Aug 2005)
New Revision: 9051

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

Log:
Fix from Fernando Schapachnik [EMAIL PROTECTED] to add logon hours
support for the Postgres backend.

Also add these changes from svn rev 7787 to trunk.

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_pgsql.c
   trunk/source/passdb/pdb_mysql.c
   trunk/source/passdb/pdb_pgsql.c
   trunk/source/passdb/pdb_sql.c


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


svn commit: samba r9052 - in branches/SAMBA_4_0/source: . script

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-04 05:23:07 + (Thu, 04 Aug 2005)
New Revision: 9052

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

Log:
Support lex/yacc compilers without support for -o

Added:
   branches/SAMBA_4_0/source/script/lex_compile.sh
   branches/SAMBA_4_0/source/script/yacc_compile.sh
Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2005-08-04 04:57:51 UTC (rev 9051)
+++ branches/SAMBA_4_0/source/main.mk   2005-08-04 05:23:07 UTC (rev 9052)
@@ -180,7 +180,9 @@
./script/tests/selftest.sh ${selftest_prefix}/st quick SOCKET_WRAPPER
 
 .y.c:
-   $(YACC) -d -o $@ $ 
+   @echo Building $ with $(YACC)
+   @-$(srcdir)/script/yacc_compile.sh $(YACC) $ $@
 
 .l.c:
-   $(LEX) -o $@ $
+   @echo Building $ with $(LEX)
+   @-$(srcdir)/script/lex_compile.sh $(LEX) $ $@

Added: branches/SAMBA_4_0/source/script/lex_compile.sh
===
--- branches/SAMBA_4_0/source/script/lex_compile.sh 2005-08-04 04:57:51 UTC 
(rev 9051)
+++ branches/SAMBA_4_0/source/script/lex_compile.sh 2005-08-04 05:23:07 UTC 
(rev 9052)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+LEX=$1
+SRC=$2
+DEST=$3
+
+dir=`dirname $SRC`
+file=`basename $SRC`
+base=`basename $SRC .l`
+if [ -z $LEX ]; then
+   echo lex not found - not regenerating $DEST
+   return;
+fi
+if [ -r $DEST ]; then
+if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then
+   return;
+fi
+fi
+TOP=`pwd`
+if cd $dir  $LEX $file; then
+sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c  $base.c
+rm -f $base.yy.c
+fi
+cd $TOP


Property changes on: branches/SAMBA_4_0/source/script/lex_compile.sh
___
Name: svn:executable
   + *

Added: branches/SAMBA_4_0/source/script/yacc_compile.sh
===
--- branches/SAMBA_4_0/source/script/yacc_compile.sh2005-08-04 04:57:51 UTC 
(rev 9051)
+++ branches/SAMBA_4_0/source/script/yacc_compile.sh2005-08-04 05:23:07 UTC 
(rev 9052)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+YACC=$1
+SRC=$2
+DEST=$3
+
+dir=`dirname $SRC`
+file=`basename $SRC`
+base=`basename $SRC .y`
+if [ -z $YACC ]; then
+   echo yacc not found
+   return;
+fi
+if [ -r $DEST ]; then
+   if [ x`find $SRC -newer $DEST -print` != x$SRC ]; then
+   return;
+fi
+fi
+TOP=`pwd`
+if cd $dir  $YACC -d $file; then
+   sed -e /^#/!b -e s|y\.tab\.h|$base.h| y.tab.h  $base.h
+   sed '/^#/ s|y\.tab\.c|$base.c|' y.tab.c  $base.c
+   rm -f y.tab.c y.tab.h
+fi
+cd $TOP


Property changes on: branches/SAMBA_4_0/source/script/yacc_compile.sh
___
Name: svn:executable
   + *



svn commit: samba r9053 - in branches/SAMBA_4_0/source/heimdal_build: .

2005-08-03 Thread jelmer
Author: jelmer
Date: 2005-08-04 05:46:17 + (Thu, 04 Aug 2005)
New Revision: 9053

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

Log:
Change order of dependencies (.h files are used when creating the 
two compilers used for generating the rest of the heimdal files)

Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 05:23:07 UTC 
(rev 9052)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-04 05:46:17 UTC 
(rev 9053)
@@ -396,11 +396,11 @@
 include ./heimdal_build/et_deps.pl heimdal/lib/krb5/krb5_err.et|
 
 heimdal_basics: \
+   heimdal/lib/roken/vis.h \
+   heimdal/lib/roken/err.h \
heimdal/lib/hdb/hdb_asn1.h \
heimdal/lib/gssapi/spnego_asn1.h \
heimdal/lib/asn1/krb5_asn1.h \
-   heimdal/lib/roken/vis.h \
-   heimdal/lib/roken/err.h \
heimdal/lib/asn1/asn1_err.h \
heimdal/lib/hdb/hdb_err.h \
heimdal/lib/krb5/heim_err.h \