[Samba] winbind net join password

2011-05-16 Thread sergio.conrad




 Message du 16/05/11 08:19
 De : sergio.conrad 
 A : sergio.con...@laposte.net
 Copie à : 
 Objet : 

 Hello everybody...
 
 I am using winbind for joining Linux machine to Windows Active Directory 
 (version Fedora 14)
 I use authconfig for generating configuration's files
 
 Everything is working perfectly
 
 For joining the Windows domain , I use
 /usr/bin/net join -w domain -S -Uadministrateur
 Enter administrateur's password
 
 AND now the question...
 I am planning to use Symantec Ghost to clone the system to 60 others machines
 I do have a bash script for configuring host's name and configuration network
 
 I am planning to write a second script for joining domain...
 But 
 /usr/bin/net join -w domain -S -Uadministrateur%password simply don' t work
 
 [2011/05/16 08:05:54.292827, 0] passdb/secrets.c:73(secrets_init)
Failed to open /var/lib/samba/private/secrets.tdb
Failed to join domain: Unable to open secrets database
ADS join did not work, falling back to RPC...
[2011/05/16 08:05:54.349910, 0] passdb/secrets.c:73(secrets_init)
Failed to open /var/lib/samba/private/secrets.tdb
[2011/05/16 08:05:54.349985, 0] utils/net_rpc.c:368(rpc_oldjoin_internals)
error storing domain sid for domain
Could not connect to server server.domain
The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE

How could i write this script ?

Thanks to everybody ...
 
 
 
 Une messagerie gratuite, garantie à vie et des services en plus, ça vous 
 tente ?
 Je crée ma boîte mail www.laposte.net
 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net

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

Re: [Samba] Samba 4 and gpo in win7

2011-05-16 Thread Kalle Pettersson

Attached a wireshark file with captures during a gpupdate from a win7 client.

In fact we have more then one DC.

All of the times when trying to access sysvol folder I´v tried through 
\\ip-nr\sysvol and not through \\domain.com\sysvol. Through 
\\domain.com\sysvol I cannot access sysvol.
Is it must to access it that way? Or is it me that getting this all wrong? 





- Ursprungligt meddelande -

Från: Matthieu Patou m...@samba.org
Till: samba@lists.samba.org
Skickat: fredag, 13 maj 2011 22:22:50
Ämne: Re: [Samba] Samba 4 and gpo in win7

On 13/05/2011 20:34, Michael Wood wrote:
 On 13 May 2011 13:23, Kalle Petterssontae...@bredband.net wrote:
 Hi!

 Could access sysvol directory per default from xp and win7 machines.

 Tried adding adding host msdfs = yes in smb.conf.

 Afterwards non of the clients could access sysvol directory through explorer 
 view.
 First, what path did you try to connect to exactly? Assuming your
 server is called server.example.com, did you connect to \\SERVER\...
 or was it \\example.com\...?
you have to try \\domain.tld\ because that's the way client will do.

 And still no gpo applying for win7 clients.

 I´m kinda confused. Are gpo suppose to work with samba4 and win7?
 It works perfect with my win xp clients.
 I think it is supposed to work, but I've not tried it. I'm sure one
 of the Samba developers will say if it's not supposed to work.
Might be a bug (what a surprise ;-) ) in the dfs referal naming
resolution, I really happy to help I just need more information.

Like a trace and the fact if you have more than 1 DC.

In short if you don't have host msdfs = yes, the client will revert to
NT4 authentication when trying to access \\domain.tld\sysvol ... as the
client can't do kerberos authentication on a domain SPN.

XP is quite ok with this degradation, w7 has some problems some time and
tend to do unauthenticated mode which of course fail !

Starting samba in more verbose mode could help too (-d 4 should be good).


Matthieu
--
Matthieu Patou
Samba Team http://samba.org
Private repo http://git.samba.org/?p=mat/samba.git;a=summary


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

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

Re: [Samba] Bit of complex smb networking... is it possible?

2011-05-16 Thread Don Gould

Anyone able to comment if what I'm thinking is possible?

D

On 14/05/2011 9:25 p.m., Don Gould wrote:

Hi Team,

I'm looking for a bit of help to push out an idea...  don't know if 
what I'm thinking is even possible so advice and feedback would be great.


CONCEPT

I want to create a shared folder for all users on a subnet that has a 
defined amount of space they can use.


So, all the users in 192.168.2.0/24 can see /homes/subnet2space/ as 
\\myserver\whatever\


Users connected to 192.168.3.0/24 will see /homes/subnet3space/ as 
\\myserver\whatever\


...and so on...

I'm using a Mikrotik RB750 router.

My Debian 6 server is on 192.168.1.12 and I'm runing Samba 3.5.6 
(because that's what was in the sources).


ISSUES

1. I don't know if it's even possible to do what I'd like to be able 
to do.
2.  I don't want my users to have to log on, I just want them to see 
my server in their network neighbourhood.
3. I can see my server from my XP machine and my Win7 machine while 
they're both on 192.168.1.0/24 addresses.  The minute I put a machine 
on another network I can't see the server any more (even though I can 
ping the server and use http etc).
4. I have no control over the users machines other than DHCP.  So I 
have no idea what workgroup scope the machines are set in, but as I 
understand it, I should be able to set the scope from dhcp, is that 
correct?  If yes, then what do I need to read about to figure out how 
to do that?
5. I ran findsmb on my server and can see the server it self and the 
xp machine, but I can't see the win7 machine (I can see all 3 machines 
from the XP machine and the Win7 machine).
6. It took an age for the windows machines to resolve my server...  
however I don't have a wins server set up...  I'm guessing that I need 
to configure my server as the wins server and then change the dhcp 
server to include this information?
7.  I don't want users on different networks seeing each other, only 
machines on their network and my server on 192.168.1.12.
8. Ideally I want all users to have the same share name (eg 
\\myserver\sharespace) so that I can tell everyone the same name and 
not have to configure a different share name for every network...
9. Failing 8, I only want users on network x.0/24 to see their share 
and not all the shares on my server (of which there would be hundreds).


D







--
Don Gould
31 Acheson Ave
Mairehau
Christchurch, New Zealand
Ph: + 64 3 348 7235
Mobile: + 64 21 114 0699


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


Re: [Samba] Bit of complex smb networking... is it possible?

2011-05-16 Thread Christ Schlacta
should be easy with hosts allow.  just have to manually configure a 
share for each subnet, and the \\myserver\whatever might be 
\\myserver\whatever1 and \\myserver\whatever2, but that should be easy 
to manage.


On 5/16/2011 01:57, Don Gould wrote:

Anyone able to comment if what I'm thinking is possible?

D

On 14/05/2011 9:25 p.m., Don Gould wrote:

Hi Team,

I'm looking for a bit of help to push out an idea...  don't know if 
what I'm thinking is even possible so advice and feedback would be 
great.


CONCEPT

I want to create a shared folder for all users on a subnet that has a 
defined amount of space they can use.


So, all the users in 192.168.2.0/24 can see /homes/subnet2space/ as 
\\myserver\whatever\


Users connected to 192.168.3.0/24 will see /homes/subnet3space/ as 
\\myserver\whatever\


...and so on...

I'm using a Mikrotik RB750 router.

My Debian 6 server is on 192.168.1.12 and I'm runing Samba 3.5.6 
(because that's what was in the sources).


ISSUES

1. I don't know if it's even possible to do what I'd like to be able 
to do.
2.  I don't want my users to have to log on, I just want them to see 
my server in their network neighbourhood.
3. I can see my server from my XP machine and my Win7 machine while 
they're both on 192.168.1.0/24 addresses.  The minute I put a machine 
on another network I can't see the server any more (even though I can 
ping the server and use http etc).
4. I have no control over the users machines other than DHCP.  So I 
have no idea what workgroup scope the machines are set in, but as I 
understand it, I should be able to set the scope from dhcp, is that 
correct?  If yes, then what do I need to read about to figure out how 
to do that?
5. I ran findsmb on my server and can see the server it self and the 
xp machine, but I can't see the win7 machine (I can see all 3 
machines from the XP machine and the Win7 machine).
6. It took an age for the windows machines to resolve my server...  
however I don't have a wins server set up...  I'm guessing that I 
need to configure my server as the wins server and then change the 
dhcp server to include this information?
7.  I don't want users on different networks seeing each other, only 
machines on their network and my server on 192.168.1.12.
8. Ideally I want all users to have the same share name (eg 
\\myserver\sharespace) so that I can tell everyone the same name and 
not have to configure a different share name for every network...
9. Failing 8, I only want users on network x.0/24 to see their share 
and not all the shares on my server (of which there would be hundreds).


D









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


Re: [Samba] Bit of complex smb networking... is it possible?

2011-05-16 Thread Don Gould

On 16/05/2011 9:06 p.m., Christ Schlacta wrote:
should be easy with hosts allow.  just have to manually configure a 
share for each subnet, and the \\myserver\whatever might be 
\\myserver\whatever1 and \\myserver\whatever2, but that should be easy 
to manage.
Will/should the 'hosts allow' prevent visibility of the shares that 
don't apply to other networks?


Also by having all computers in all networks using 192.168.1.12 as the 
wins server, with those machines then become visible to everyone else? 
(something that I don't want) or can I control this?


I can set the scope/workgroup for each network using dhcp options, but 
would this then mean that they can't see myServer?  Or can I make 
myServer appear on more than one workgroup/scope?


D

--
Don Gould
31 Acheson Ave
Mairehau
Christchurch, New Zealand
Ph: + 64 3 348 7235
Mobile: + 64 21 114 0699


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


[Samba] build samba on solaris 10 fails on libwbclient

2011-05-16 Thread Richard Gillman

Hi,

I'm trying to build Samba on Solaris 10 sparc.

./autogen.sh completes but with warnings such as

samba4.m4:6: warning: file `../m4/check_python.m4' included several times
../lib/util/xattr.m4:9: warning: AC_CACHE_VAL(smb_attr_cv_xattr_add_opt, 
...): suspicious cache-id, must contain _cv_ to be cached

../lib/util/xattr.m4:9: the top level
samba4.m4:83: warning: file `../lib/tdb/libtdb.m4' included several times
../source4/build/m4/public.m4:70: SMB_EXT_LIB_FROM_PKGCONFIG is expanded 
from...samba4.m4:83: the top level
../lib/tevent/samba.m4:3: warning: file `../lib/tevent/libtevent.m4' 
included several times

../lib/tevent/samba.m4:3: the top level


./configure --prefix=/nerc/packages/samba/3.5.7  --with-libtalloc=no 
--with-libtdb=no


(I had to build talloc and tdb seperately.)

The make stage fails

creating /users/itss/rgi/samba/samba-3.5.7/source3/exports/libwbclient.syms
Linking shared library bin/libwbclient.so.0
/nerc/packages/gcc/4.4.3/5.10/bin/ld: cannot open linker script file 
/users/itss/rgi/samba/samba-3.5.7/source3/exports/libwbclient.so.0: No 
such file or directory

collect2: ld returned 1 exit status
make: *** [bin/libwbclient.so.0] Error 1
tolka source3 $

gcc is

tolka source3 $ gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.4.3/configure 
--prefix=/nerc/packages/gcc/4.4.3/5.10 --with-gnu-as 
--with-as=/nerc/packages/gcc/4.4.3/5.10/bin/as --with-gnu-ld 
--with-ld=/nerc/packages/gcc/4.4.3/5.10/bin/ld 
--enable-languages=c++,fortran --with-gmp=/nerc/packages/gcc/4.4.3/5.10 
--with-mpfr=/nerc/packages/gcc/4.4.3/5.10 
--with-libiconv-prefix=/nerc/packages/gcc/4.4.3./5.10

Thread model: posix
gcc version 4.4.3 (GCC)
tolka source3 $

PATH is cut-down so I pick up GNU tools ld and make, rather than Solaris 
equivalents.

tolka source3 $ echo $PATH
/nerc/packages/gcc/4.4.3/5.10/bin:/sbin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin:.
tolka source3 $


tolka source3 $ which make
/nerc/packages/gcc/4.4.3/5.10/bin/make
tolka source3 $ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for sparc-sun-solaris2.9
tolka source3 $

tolka source3 $ ld -v
GNU ld (GNU Binutils) 2.20
tolka source3 $

tolka source3 $ echo $CC
/nerc/packages/gcc/4.4.3/5.10/bin/gcc
tolka source3 $ echo $LD_LIBRARY_PATH
/nerc/packages/samba/3.5.7/lib
tolka source3 $ echo  $LD_RUN_PATH
/nerc/packages/samba/3.5.7/lib
tolka source3 $ echo $LDFLAGS
-L/nerc/packages/samba/3.5.7/lib -R/nerc/packages/samba/3.5.7/lib
tolka source3 $

I've tried looking for LD=ld in the configure file as suggested in an 
email May 2010, it doesn't occur. I've tried editing Makefile, add -fPIC 
-shared  -lthread -lintl as suggested in the same email. No luck.


Anybody got any suggestions?

tia, Dick


--
Richard Gillman
IST UNIX Systems Group, Maclean Building, Wallingford OX10 8BB
Tel: 01491 - 692 339 (outside UK: +44 1491 692339)
Fax: 01491 - 692 424

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


[Samba] changing account flags to W

2011-05-16 Thread Francesc Guasch
Hi. I have some machines that I can't log in anymore.

I think I changed their accounts to User accounts by mistake. Now
pdebedit show the U flag instead W.

I tried to change it like this:

# pdbedit -c='[W]' machine-211$
Can only set [NDHLX] flags

I tried also to recreate one machine account.
I removed the account with smbpasswd -x , and added it again,
but it won't login. I guess it is because the SID changed. I tried
setting the SID again:

# pdbedit -U S-1-5-21-64316383-546362030-1349479702-81176 -u machine-214$
Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Unable to modify entry!

- Is there a way to turn those users to machines ?
- Can I change that SID somehow ?

This is Samba 3.2.5 on Debian Lenny.

Thank you very much.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] nt acl inheritance

2011-05-16 Thread Felix Joussein

Hello List,

I've observed the following missbehaivoure, while playing around with nc 
acl's. (see relevant configuration below):


Working with Windows XP:

Open acl enabled share
Set default share permissions by right click on the explorer's top left 
clip control - properties.
Under security I remove the CREATOR-OWNER and CREATORUSER Group, as I 
already know, that these two default groups cause trouble while saving 
acl's and result in a Windows Error Message Invalid Parameter. Also I 
set some default security settings for users and groups accordingly to 
my needs and I apply it to This Folder, and any sub folder or file.


After applying to all new settings, I create a folder.
As expected my default share security settings have been inherited to 
the new folder.
I add an additional user to the acl and take care, that the inheritance 
is also Folder, sub folder and file.


I create a new sub folder to this one and check the acl.
Here is the unwanted behavior: The new sub folder got user permissions 
from it's parent folder, but unlike the default share permissions which 
have been inherited, the additional user's permissions have not been 
inherited but have been copied. When I set the option Inherit 
permissions to sub elements as far as applicable, and apply, then a new 
acl entry is created with the same user but this time inherited. Now I 
can delete the copied settings, and apply to everything.


I hope, these explanations where clear enough.

Here now the configuration:

Version: 3.5.8~dfsg-1ubuntu2.1
smb.conf:
[acl]
comment = ACL Labor
path = /home/acllabor
vfs objects = acl_xattr
read only = no
browsable = yes
valid users = me,you
acl map full control = false
inherit acls = yes
map acl inherit = yes
map read only = Permissions
map archive = no
map hidden = no
map system = no
nt acl support = yes
acl group control = true
dos filemode = yes
enable privileges = yes
store dos attributes = yes

mount options:
/dev/mapper/system-user on /home type ext4 
(rw,errors=remount-ro,acl,user_xattr,)



any help appreciated!

Felix


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


[Samba] Quota support in samba

2011-05-16 Thread Santanu Ghosh
Hi,

Is there any document which talks about quota implementation in samba?
And can anyone suggest a good technical document for samba which cover
\$Extend\$Quota:$Q:INDEX_ALLOCATION functionality? when is it accessed and
what is it for?

Is there any way by which we can set/get 'quota' property of samba shares
from windows client?


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


Re: [Samba] Access denied to samba server from win7 64bit behind a VPN

2011-05-16 Thread Vincent Malien
 this morning, I added entries to the files lmhosts.sam and hosts for 
this server and access is allowed now.

thanks for your help.

Le 13/05/2011 17:04, Vincent Malien a écrit :

 it's a site-to-site VPN
Sorry, my colleague on the other site just shut-down  gone. I'll test 
monday, but I think you mean net view \\IP_ADDRESS_OF_SERVER.

Le 13/05/2011 16:33, Gaiseric Vandal a écrit :

Is this a client-to-site or site-to-site VPN?

Does new view \\IP_ADDRESS_OF_SERVER work?

I have one samba server (compiled from source) where Windows VPN 
clients can't access it by name UNLESS using either WINS ior an 
lmhosts file is configured.   packet sniffing showed the client 
connecting and an initial response, but then the nothing else.   
Clearly not a problem with the clients which could  access every 
other samba or windows server over the VPN. Some Win machines 
were domain members, some weren't.




On 05/13/2011 10:00 AM, Vincent Malien wrote:

 Hi,

I have a problem of Access denied to samba server from win7 64bit 
behind a VPN.
the samba server is 3.2.5-4 release on a debian lenny (I will 
upgrade it soon), member of a win2K AD domain.
the win7 PCs are on the same AD domain, they can access to an other 
samba server witch is very similar (same release, same smb.conf, 
same VPN config).

If I do on a win7 PC: net view \\srvlinux
I see:
L'erreur système 5 s'est produite.
Accès refusé.
on srvlinux, in /var/log/samba/log.PCname, I see:
[2011/05/13 11:26:34,  0] lib/util_sock.c:read_socket_with_timeout(939)
[2011/05/13 11:26:34,  0] lib/util_sock.c:get_peer_addr_internal(1683)
  getpeername failed. Error was Noeud final de transport n'est pas 
connecté
  read_socket_with_timeout: client 0.0.0.0 read error = Connexion 
ré-initialisée par le correspondant.
I think this timeout is because of  the VPN link, but it's the same 
log on the other samba server witch I can access.
I tried to un-join  join server  PC to the domain, but it didn't 
solved.  I also tried with several windows user who can access 
srvlinux from other PCs on the two sides of the VPN.

Any help is welcome .
Vincent MALIEN

this is my smb.conf:
[global]
   workgroup = SOCOFER
   server string = %h server web interne et FTP (Samba %v)
;   wins server = w.x.y.z
   dns proxy = no
;   name resolve order = lmhosts host wins bcast
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
   dos charset = cp850
   unix charset = ISO-8859-1
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   security = ADS
   realm = SOCOFER.DOM
   password server = 192.168.5.44
   client use spnego = yes
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n 
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes
;   domain logons = yes
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password 
--gecos  %u
; add machine script  = /usr/sbin/useradd -g machines -c %u machine 
account -d /var/lib/samba -s /bin/false %u

; add group script = /usr/sbin/addgroup --force-badname %g
;   printing = bsd
;   printcap name = /etc/printcap
;   printing = cups
;   printcap name = cups
;   include = /home/samba/etc/smb.conf.%m
;   message command = /bin/sh -c '/usr/bin/linpopup %f %m %s; rm 
%s' 

   winbind separator = +
   idmap uid = 1-2
   idmap gid = 1-2
   template homedir = /home/%D/%U
   template shell = /bin/bash
   winbind enum groups = yes
   winbind enum users = yes
   usershare max shares = 100
   winbind use default domain = yes
# empêche le client de devenir maitre explorateur
   domain master = no
   local master = no
   preferred master = no
   os level = 0
[homes]
   comment = Home Directories
   browseable = yes
   writable = yes
   create mask = 0777
   directory mask = 0777
   valid users = %S






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


Re: [Samba] Win ME couln't login

2011-05-16 Thread Gaiseric Vandal

run testparm -v

You may need to make sure LANMAN authentication is enabled.  You may 
also need to make sure that you have an LANMAN pw set for the user (this 
should be a separate LDAP field from the NTLM password.)


Or better yet-  replace the machine on the assumption that  Windows ME  
may not supported with current versions of samba.   Microsoft doesn't 
support WIndows ME anymore.  I bet you would have problems accessing 
current versions of Windows server.



On 05/15/2011 11:48 PM, yudi shiddiq wrote:

I have made samba PDC and tested with client win 7, win xp, and win vista
successfully but fail with win millenium edition, the message shows that the
password is incorect or access to the server has been denied.

Installed s/w :
- openldap2-2.4.21-9.1.i586
- openldap2-client-2.4.21-9.1.i586
- samba-3.5.4-4.1.i586

Please give me a clue, because we still have client with OS Win ME


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


Re: [Samba] build samba on solaris 10 fails on libwbclient

2011-05-16 Thread Gaiseric Vandal
On solaris you should be using Sun Studio compilers as well as sun 
dmake  (not sun or gnu make.)  You may want to configure and compile 
with minimal options then incrementally enable and recompile additional 
options.


If you really want to use gcc,  you could try something like
mv /usr/ccs/bin/ld
ln -s /usr/sfw/bin/gld /usr/ccs/bin/ld

That will make sure that  gcc can at least find a version of ld that it 
expects-  but it is still an ugly hack and you  probably won't get it 
working anyway.



If you have a sun/oracle support contract, there is FINALLY an updated 
oracle-provided precompiled samba 3.5.5 patch.



On 05/16/2011 06:42 AM, Richard Gillman wrote:

Hi,

I'm trying to build Samba on Solaris 10 sparc.

./autogen.sh completes but with warnings such as

samba4.m4:6: warning: file `../m4/check_python.m4' included several times
../lib/util/xattr.m4:9: warning: 
AC_CACHE_VAL(smb_attr_cv_xattr_add_opt, ...): suspicious cache-id, 
must contain _cv_ to be cached

../lib/util/xattr.m4:9: the top level
samba4.m4:83: warning: file `../lib/tdb/libtdb.m4' included several times
../source4/build/m4/public.m4:70: SMB_EXT_LIB_FROM_PKGCONFIG is 
expanded from...samba4.m4:83: the top level
../lib/tevent/samba.m4:3: warning: file `../lib/tevent/libtevent.m4' 
included several times

../lib/tevent/samba.m4:3: the top level


./configure --prefix=/nerc/packages/samba/3.5.7  --with-libtalloc=no 
--with-libtdb=no


(I had to build talloc and tdb seperately.)

The make stage fails

creating 
/users/itss/rgi/samba/samba-3.5.7/source3/exports/libwbclient.syms

Linking shared library bin/libwbclient.so.0
/nerc/packages/gcc/4.4.3/5.10/bin/ld: cannot open linker script file 
/users/itss/rgi/samba/samba-3.5.7/source3/exports/libwbclient.so.0: No 
such file or directory

collect2: ld returned 1 exit status
make: *** [bin/libwbclient.so.0] Error 1
tolka source3 $

gcc is

tolka source3 $ gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.4.3/configure 
--prefix=/nerc/packages/gcc/4.4.3/5.10 --with-gnu-as 
--with-as=/nerc/packages/gcc/4.4.3/5.10/bin/as --with-gnu-ld 
--with-ld=/nerc/packages/gcc/4.4.3/5.10/bin/ld 
--enable-languages=c++,fortran 
--with-gmp=/nerc/packages/gcc/4.4.3/5.10 
--with-mpfr=/nerc/packages/gcc/4.4.3/5.10 
--with-libiconv-prefix=/nerc/packages/gcc/4.4.3./5.10

Thread model: posix
gcc version 4.4.3 (GCC)
tolka source3 $

PATH is cut-down so I pick up GNU tools ld and make, rather than 
Solaris equivalents.

tolka source3 $ echo $PATH
/nerc/packages/gcc/4.4.3/5.10/bin:/sbin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin:. 


tolka source3 $


tolka source3 $ which make
/nerc/packages/gcc/4.4.3/5.10/bin/make
tolka source3 $ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for sparc-sun-solaris2.9
tolka source3 $

tolka source3 $ ld -v
GNU ld (GNU Binutils) 2.20
tolka source3 $

tolka source3 $ echo $CC
/nerc/packages/gcc/4.4.3/5.10/bin/gcc
tolka source3 $ echo $LD_LIBRARY_PATH
/nerc/packages/samba/3.5.7/lib
tolka source3 $ echo  $LD_RUN_PATH
/nerc/packages/samba/3.5.7/lib
tolka source3 $ echo $LDFLAGS
-L/nerc/packages/samba/3.5.7/lib -R/nerc/packages/samba/3.5.7/lib
tolka source3 $

I've tried looking for LD=ld in the configure file as suggested in an 
email May 2010, it doesn't occur. I've tried editing Makefile, add 
-fPIC -shared  -lthread -lintl as suggested in the same email. No luck.


Anybody got any suggestions?

tia, Dick




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


Re: [Samba] Access denied to samba server from win7 64bit behind a VPN

2011-05-16 Thread Chris Smith
On Mon, May 16, 2011 at 8:37 AM, Vincent Malien ad...@socofer.com wrote:
  this morning, I added entries to the files lmhosts.sam

FYI, the sam in lmhosts.sam stands for sample - you need to put
the valid data in a file named lmhosts (no .sam, .txt, etc.) or it
isn't being used at all.

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

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  5ad20f6 s3: Fix return check in nss_wins
  from  2163261 WHATSNEW: Add changes since pre3.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 5ad20f61f87618386f343c2aa8c3f3ffe2fefb03
Author: Volker Lendecke v...@samba.org
Date:   Sun May 15 23:26:10 2011 +0200

s3: Fix return check in nss_wins

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon May 16 00:30:42 CEST 2011 on sn-devel-104
(cherry picked from commit 068f847fe2682ab6e356db7b9ae6151f82605f0e)

---

Summary of changes:
 nsswitch/wins.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index e0aa2ad..f5fd7a7 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -99,7 +99,7 @@ static struct in_addr *lookup_byname_backend(const char 
*name, int *count)
in_addr_to_sockaddr_storage(ss, *bcast);
status = name_query(name, 0x00, True, True, ss,
NULL, pss, count, NULL);
-   if (pss) {
+   if (NT_STATUS_IS_OK(status)  (*count  0)) {
if ((ret = SMB_MALLOC_P(struct in_addr)) == NULL) {
return NULL;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  28cba27 libcli/: Fix prototypes for all functions.(cherry picked 
from commit fa387825e2a4563ff85267848d8e9d206bf6db96)
   via  62a6ded More const compiler warning fixes. (cherry picked from 
commit 9efea96d16a9f9526669e7d9288902a15d0ee549)
   via  37a05cb s3-net: fix potential crash bug in display_print_driver3().
  from  5ad20f6 s3: Fix return check in nss_wins

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 28cba271e61245b166d002745737c5fedae80c0c
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Mar 19 00:45:56 2011 +0100

libcli/: Fix prototypes for all functions.(cherry picked from commit 
fa387825e2a4563ff85267848d8e9d206bf6db96)

commit 62a6ded441247daeb61a36fddc3d7eac8114df9f
Author: Jeremy Allison j...@samba.org
Date:   Thu May 5 11:29:01 2011 -0700

More const compiler warning fixes.
(cherry picked from commit 9efea96d16a9f9526669e7d9288902a15d0ee549)

commit 37a05cbd6d00690542a08556ffc55bf5a3afe7d5
Author: Günther Deschner g...@samba.org
Date:   Fri May 13 15:03:59 2011 +0200

s3-net: fix potential crash bug in display_print_driver3().

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Fri May 13 18:49:06 CEST 2011 on sn-devel-104
(cherry picked from commit 3d100216b84f4f25c3e761741eda2cc134957e96)

---

Summary of changes:
 libcli/echo/tests/echo.c   |2 ++
 libcli/nbt/dns_hosts_file.c|1 +
 libcli/security/pysecurity.c   |2 ++
 libcli/security/secacl.c   |1 +
 libcli/util/error.h|2 ++
 source3/lib/util_sid.c |2 +-
 source3/nmbd/nmbd_elections.c  |2 +-
 source3/nmbd/nmbd_incomingdgrams.c |   20 ++--
 source3/nmbd/nmbd_packets.c|   10 +-
 source3/nmbd/nmbd_processlogon.c   |2 +-
 source3/nmbd/nmbd_proto.h  |   22 +++---
 source3/utils/net_rpc_printer.c|2 +-
 12 files changed, 38 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/echo/tests/echo.c b/libcli/echo/tests/echo.c
index 77a7dfa..c47b7d0 100644
--- a/libcli/echo/tests/echo.c
+++ b/libcli/echo/tests/echo.c
@@ -26,6 +26,8 @@
 #include libcli/util/ntstatus.h
 #include libcli/echo/libecho.h
 
+NTSTATUS torture_libcli_echo_init(void);
+
 /* Basic test function that sends an echo request and checks the reply */
 static bool echo_udp_basic(struct torture_context *tctx, const char *address)
 {
diff --git a/libcli/nbt/dns_hosts_file.c b/libcli/nbt/dns_hosts_file.c
index 810e4eb..c6491a9 100644
--- a/libcli/nbt/dns_hosts_file.c
+++ b/libcli/nbt/dns_hosts_file.c
@@ -28,6 +28,7 @@
 #include lib/util/util_net.h
 #include system/filesys.h
 #include system/network.h
+#include libcli/nbt/libnbt.h
 
 /
  Start parsing the dns_hosts_file file.
diff --git a/libcli/security/pysecurity.c b/libcli/security/pysecurity.c
index 56bdd69..87134bf 100644
--- a/libcli/security/pysecurity.c
+++ b/libcli/security/pysecurity.c
@@ -23,6 +23,8 @@
 #include libcli/security/security.h
 #include pytalloc.h
 
+void initsecurity(void);
+
 static PyObject *py_se_access_check(PyObject *module, PyObject *args, PyObject 
*kwargs)
 {
NTSTATUS nt_status;
diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index 9c04df8..47184ae 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -23,6 +23,7 @@
 #include includes.h
 #include librpc/gen_ndr/ndr_security.h
 #include libcli/security/secace.h
+#include libcli/security/secacl.h
 
 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t))
 
diff --git a/libcli/util/error.h b/libcli/util/error.h
index 77a2f5a..7b7de6c 100644
--- a/libcli/util/error.h
+++ b/libcli/util/error.h
@@ -51,4 +51,6 @@ convert a Unix error code to a WERROR
 */
 WERROR unix_to_werror(int unix_error);
 
+NTSTATUS nt_status_squash(NTSTATUS nt_status);
+
 #endif /* _SAMBA_ERROR_H */
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index ef46a38..f080d3d 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -121,7 +121,7 @@ char *sid_binstring_hex(const struct dom_sid *sid)
if (!buf)
return NULL;
sid_linearize(buf, len, sid);
-   hex_encode(buf, len, s);
+   hex_encode((const unsigned char *)buf, len, s);
free(buf);
return s;
 }
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index 899c273..a7b240f 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -258,7 +258,7 @@ static bool win_election(struct work_record *work, int 
version,
   Process an incoming election datagram packet.
 

[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Christian Ambach
The branch, master has been updated
   via  20179bb s3:libsmb convert user-specified domain to uppercase
  from  068f847 s3: Fix return check in nss_wins

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 20179bb5508cddca917732b6a459afa1d7136789
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri May 6 13:16:26 2011 +0200

s3:libsmb convert user-specified domain to uppercase

with client ntlmv2 auth = yes, there is a small difference between
using smbclient -U user\domain and smbclient -U user -W domain
if domain is provided in lowercase

using -W will uppercase the given parameter, while picking the
domain name from -U will not convert it to uppercase and this
leads to failing NTLMv2 authentication

with this patch, there is no difference between
smbclient -U domain\user and smbclient -U user -W domain any more

Autobuild-User: Christian Ambach a...@samba.org
Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/libsmb/cliconnect.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 7f48aee..828cb2c 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1977,6 +1977,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
(p=strchr_m(user2,*lp_winbind_separator( {
*p = 0;
user = p+1;
+   strupper_m(user2);
workgroup = user2;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Christian Ambach
The branch, v3-6-test has been updated
   via  dae276b s3:libsmb convert user-specified domain to uppercase
  from  28cba27 libcli/: Fix prototypes for all functions.(cherry picked 
from commit fa387825e2a4563ff85267848d8e9d206bf6db96)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit dae276b5abde77df24f297149267622e7a6dcddb
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri May 6 13:16:26 2011 +0200

s3:libsmb convert user-specified domain to uppercase

with client ntlmv2 auth = yes, there is a small difference between
using smbclient -U user\domain and smbclient -U user -W domain
if domain is provided in lowercase

using -W will uppercase the given parameter, while picking the
domain name from -U will not convert it to uppercase and this
leads to failing NTLMv2 authentication

with this patch, there is no difference between
smbclient -U domain\user and smbclient -U user -W domain any more

Autobuild-User: Christian Ambach a...@samba.org
Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/libsmb/cliconnect.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 1383978..d3b2d38 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1976,6 +1976,7 @@ NTSTATUS cli_session_setup(struct cli_state *cli,
(p=strchr_m(user2,*lp_winbind_separator( {
*p = 0;
user = p+1;
+   strupper_m(user2);
workgroup = user2;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Günther Deschner
The branch, master has been updated
   via  74d82fa s4-smbtorture: add test_netremotetod.
   via  b194865 s4-libcli/rap: add smbcli_rap_netremotetod().
   via  b82caab s3-rap: add rap_NetRemoteTOD to IDL.
  from  20179bb s3:libsmb convert user-specified domain to uppercase

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 74d82faa78e64bdaed68efb9331a7af1c3016c34
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:50:23 2011 +0200

s4-smbtorture: add test_netremotetod.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May 16 12:45:52 CEST 2011 on sn-devel-104

commit b1948659ad987ce50d048dabc34f03031a243ee5
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:37:08 2011 +0200

s4-libcli/rap: add smbcli_rap_netremotetod().

Guenther

commit b82caab5c9d8821cd125654e3233da40eb4c61d1
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:35:21 2011 +0200

s3-rap: add rap_NetRemoteTOD to IDL.

Guenther

---

Summary of changes:
 librpc/idl/rap.idl |   22 
 source4/libcli/rap/rap.c   |   47 
 source4/selftest/knownfail |1 +
 source4/torture/rap/rap.c  |   17 +++
 4 files changed, 87 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl
index 8087e22..780951c 100644
--- a/librpc/idl/rap.idl
+++ b/librpc/idl/rap.idl
@@ -966,6 +966,28 @@ interface rap
[out] uint16 convert
);
 
+   typedef [public] struct {
+   uint32 TimeSinceJan11970;
+   uint32 TimeSinceBoot;
+   uint8 Hours;
+   uint8 Minutes;
+   uint8 Seconds;
+   uint8 Hundreds;
+   uint16 TimeZone;
+   uint16 ClockFrequency;
+   uint8 Day;
+   uint8 Month;
+   uint16 Year;
+   uint8 Weekday;
+   } rap_TimeOfDayInfo;
+
+   [public] void rap_NetRemoteTOD(
+   [in] uint16 bufsize,
+   [out] rap_status status,
+   [out] uint16 convert,
+   [out] rap_TimeOfDayInfo tod
+   );
+
/* Parameter description strings for RAP calls   */
/* Names are defined name for RAP call with _REQ */
/* appended to end.  */
diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c
index 5ea9e81..7743f64 100644
--- a/source4/libcli/rap/rap.c
+++ b/source4/libcli/rap/rap.c
@@ -1633,3 +1633,50 @@ NTSTATUS smbcli_rap_netuserdelete(struct smbcli_tree 
*tree,
talloc_free(call);
return result;
 }
+
+NTSTATUS smbcli_rap_netremotetod(struct smbcli_tree *tree,
+ TALLOC_CTX *mem_ctx,
+ struct rap_NetRemoteTOD *r)
+{
+   struct rap_call *call;
+   NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+   if (!(call = new_rap_cli_call(mem_ctx, RAP_NetRemoteTOD))) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   rap_cli_push_rcvbuf(call, r-in.bufsize);
+
+   rap_cli_expect_format(call, DDWWBBWB);
+   rap_cli_expect_extra_format(call, );
+
+   if (DEBUGLEVEL = 10) {
+   NDR_PRINT_IN_DEBUG(rap_NetRemoteTOD, r);
+   }
+
+   result = rap_cli_do_call(tree, call);
+
+   if (!NT_STATUS_IS_OK(result))
+   goto done;
+
+   result = NT_STATUS_INVALID_PARAMETER;
+
+   NDR_GOTO(ndr_pull_rap_status(call-ndr_pull_param, NDR_SCALARS, 
r-out.status));
+   NDR_GOTO(ndr_pull_uint16(call-ndr_pull_param, NDR_SCALARS, 
r-out.convert));
+
+   NDR_GOTO(ndr_pull_rap_TimeOfDayInfo(call-ndr_pull_data, 
NDR_SCALARS|NDR_BUFFERS, r-out.tod));
+
+   result = NT_STATUS_OK;
+
+   if (!NT_STATUS_IS_OK(result)) {
+   goto done;
+   }
+
+   if (DEBUGLEVEL = 10) {
+   NDR_PRINT_OUT_DEBUG(rap_NetRemoteTOD, r);
+   }
+
+ done:
+   talloc_free(call);
+   return result;
+}
diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index cdd7a2d..d3c3f4e 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -41,6 +41,7 @@ samba4.base.charset.*.Testing partial surrogate
 samba4.rap.*netservergetinfo
 samba4.rap.*netsessionenum
 samba4.rap.*netsessiongetinfo
+samba4.rap.*netremotetod
 samba4.smb2.persistent.handles1
 samba4.winbind.struct.*.show_sequence # Not yet working in winbind
 samba4.winbind.struct.*.getpwent  # Not yet working in winbind
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 5c1c5e1..ee37158 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -206,6 +206,21 @@ static bool test_netsessiongetinfo(struct 

autobuild: intermittent test failure detected

2011-05-16 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba4.stdout
  
The top commit at the time of the failure was:

commit 20179bb5508cddca917732b6a459afa1d7136789
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri May 6 13:16:26 2011 +0200

s3:libsmb convert user-specified domain to uppercase

with client ntlmv2 auth = yes, there is a small difference between
using smbclient -U user\domain and smbclient -U user -W domain
if domain is provided in lowercase

using -W will uppercase the given parameter, while picking the
domain name from -U will not convert it to uppercase and this
leads to failing NTLMv2 authentication

with this patch, there is no difference between
smbclient -U domain\user and smbclient -U user -W domain any more

Autobuild-User: Christian Ambach a...@samba.org
Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Günther Deschner
The branch, master has been updated
   via  a2115b5 waf: Enable Samba3 torture tests in top level build.
   via  320789b s3-selftest: no point in running base.chkpath and 
base.delaywrite twice.
   via  01bc556 s3-printing: Remove obsolete and unused 
cups_pull_comment_location().
   via  da1fa20 s3-spoolss: Get the printer location from cups.
   via  8544678 s3-printing: Get the location info from cups.
   via  d4d31b3 s3: Added waf build header locations for clang complete.
  from  74d82fa s4-smbtorture: add test_netremotetod.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a2115b56268bc71e69930a3d1dffa21ade7ad113
Author: Andreas Schneider a...@samba.org
Date:   Mon May 16 11:56:14 2011 +0200

waf: Enable Samba3 torture tests in top level build.

Signed-off-by: Günther Deschner g...@samba.org

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May 16 13:57:01 CEST 2011 on sn-devel-104

commit 320789b89024c8dbbb59a628f06622748c329eb4
Author: Günther Deschner g...@samba.org
Date:   Mon May 16 12:48:10 2011 +0200

s3-selftest: no point in running base.chkpath and base.delaywrite twice.

Thanks to Bjoern Baumbach for pointing this out!

Guenther

Signed-off-by: Günther Deschner g...@samba.org

commit 01bc556d03a592e1f3c848d71b2e72a7cb74706f
Author: Andreas Schneider a...@samba.org
Date:   Fri May 13 10:57:33 2011 +0200

s3-printing: Remove obsolete and unused cups_pull_comment_location().

Signed-off-by: Günther Deschner g...@samba.org

commit da1fa201040b2dab89fdc99663155a1c79ad4de9
Author: Andreas Schneider a...@samba.org
Date:   Fri May 13 10:28:20 2011 +0200

s3-spoolss: Get the printer location from cups.

Signed-off-by: Günther Deschner g...@samba.org

commit 854467851da48e02dcd8f869cb031c8943707017
Author: Günther Deschner g...@samba.org
Date:   Fri May 13 10:02:42 2011 +0200

s3-printing: Get the location info from cups.

Signed-off-by: Günther Deschner g...@samba.org

commit d4d31b31760ac1e7361f453564b63f17685bf58f
Author: Andreas Schneider a...@samba.org
Date:   Fri May 13 10:27:46 2011 +0200

s3: Added waf build header locations for clang complete.

Signed-off-by: Günther Deschner g...@samba.org

---

Summary of changes:
 librpc/idl/printcap.idl |1 +
 source3/.clang_complete |1 +
 source3/include/proto.h |3 +-
 source3/param/loadparm.c|3 +-
 source3/printing/pcap.c |   24 ++--
 source3/printing/pcap.h |8 +-
 source3/printing/print_aix.c|4 +-
 source3/printing/print_cups.c   |  175 +++
 source3/printing/print_iprint.c |2 +-
 source3/printing/print_standard.c   |2 +-
 source3/printing/print_svid.c   |2 +-
 source3/printing/printer_list.c |   42 +--
 source3/printing/printer_list.h |8 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c |   35 +-
 source3/selftest/tests.py   |6 +-
 source4/selftest/skip   |   24 ++--
 16 files changed, 134 insertions(+), 206 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/printcap.idl b/librpc/idl/printcap.idl
index 5ab380c..d9c34f3 100644
--- a/librpc/idl/printcap.idl
+++ b/librpc/idl/printcap.idl
@@ -7,6 +7,7 @@ interface printcap
typedef struct {
[charset(UTF8),string] uint8 *name;
[charset(UTF8),string] uint8 *info;
+   [charset(UTF8),string] uint8 *location;
} pcap_printer;
 
typedef [public] struct {
diff --git a/source3/.clang_complete b/source3/.clang_complete
index c3f2f30..69dad3b 100644
--- a/source3/.clang_complete
+++ b/source3/.clang_complete
@@ -1,2 +1,3 @@
 -I. -I./.. -Iinclude -I./../lib/replace -I./../lib/tevent -I./librpc 
-I./../lib/talloc -I../lib/tdb/include
+-I./../bin/default/include -I./../bin/default/source3 -I./../bin/default
 -Iinclude/includes.h.gch
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7e25f8e..8c00e3a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1634,7 +1634,8 @@ bool dump_a_parameter(int snum, char *parm_name, FILE * 
f, bool isGlobal);
 struct parm_struct *lp_get_parameter(const char *param_name);
 struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
 bool lp_snum_ok(int iService);
-void lp_add_one_printer(const char *name, const char *comment, void *pdata);
+void lp_add_one_printer(const char *name, const char *comment,
+   const char *location, void *pdata);
 bool lp_loaded(void);
 void lp_killunused(bool (*snumused) (int));
 void 

[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Volker Lendecke
The branch, master has been updated
   via  3358d5a s3: Document gpfs:syncio
   via  2ddfbbb gpfs.so: Add gpfs:syncio option
  from  a2115b5 waf: Enable Samba3 torture tests in top level build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 3358d5a7cae1c2a99495c38069531fc87fe22b24
Author: Volker Lendecke v...@samba.org
Date:   Mon May 16 13:30:26 2011 +0200

s3: Document gpfs:syncio

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon May 16 15:00:40 CEST 2011 on sn-devel-104

commit 2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d
Author: Gregor Beck gb...@sernet.de
Date:   Thu May 5 16:28:58 2011 +0200

gpfs.so: Add gpfs:syncio option

This enables optimizations for shared file access on gpfs

---

Summary of changes:
 docs-xml/manpages-3/vfs_gpfs.8.xml |   20 
 source3/modules/vfs_gpfs.c |   13 +
 2 files changed, 33 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml 
b/docs-xml/manpages-3/vfs_gpfs.8.xml
index 5f89ffa..a6b3124 100644
--- a/docs-xml/manpages-3/vfs_gpfs.8.xml
+++ b/docs-xml/manpages-3/vfs_gpfs.8.xml
@@ -276,6 +276,26 @@
/listitem
/varlistentry
 
+   varlistentry
+   termgpfs:syncio = [yes|no]/term
+   listitem
+   paraThis parameter makes Samba open all files with O_SYNC.
+ This triggers optimizations in GPFS for workloads that
+ heavily share files./para
+
+   paraFollowing is the behaviour of Samba for different
+ values:
+   /para
+   itemizedlist
+   listitemparacommandyes/commandOpen files with O_SYNC
+   /para/listitem
+   listitemparacommandno (default)/commandOpen files as
+   normal Samba would do
+   /para/listitem
+   /itemizedlist
+   /listitem
+   /varlistentry
+
/variablelist
 /refsect1
 
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index d52122c..0a684e0 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -32,6 +32,7 @@
 #include gpfs_gpl.h
 #include nfs4_acls.h
 #include vfs_gpfs.h
+#include system/filesys.h
 
 struct gpfs_config_data {
bool sharemodes;
@@ -1299,6 +1300,17 @@ static uint32_t vfs_gpfs_capabilities(struct 
vfs_handle_struct *handle,
return next;
 }
 
+static int vfs_gpfs_open(struct vfs_handle_struct *handle,
+struct smb_filename *smb_fname, files_struct *fsp,
+int flags, mode_t mode)
+{
+   if (lp_parm_bool(fsp-conn-params-service, gpfs, syncio,
+false)) {
+   flags |= O_SYNC;
+   }
+   return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
+}
+
 
 static struct vfs_fn_pointers vfs_gpfs_fns = {
.connect_fn = vfs_gpfs_connect,
@@ -1326,6 +1338,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
.is_offline = vfs_gpfs_is_offline,
.aio_force = vfs_gpfs_aio_force,
.sendfile = vfs_gpfs_sendfile,
+   .open_fn = vfs_gpfs_open,
.ftruncate = vfs_gpfs_ftruncate
 };
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  40d20d1 s3: Document gpfs:syncio
   via  88c14b4 gpfs.so: Add gpfs:syncio option
  from  dae276b s3:libsmb convert user-specified domain to uppercase

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 40d20d13e78868e312201ba4345730fd6ab36b41
Author: Volker Lendecke v...@samba.org
Date:   Mon May 16 13:30:26 2011 +0200

s3: Document gpfs:syncio

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon May 16 15:00:40 CEST 2011 on sn-devel-104
(cherry picked from commit 3358d5a7cae1c2a99495c38069531fc87fe22b24)

commit 88c14b4a14a7713861443244bac9ff95774e38ed
Author: Gregor Beck gb...@sernet.de
Date:   Thu May 5 16:28:58 2011 +0200

gpfs.so: Add gpfs:syncio option

This enables optimizations for shared file access on gpfs
(cherry picked from commit 2ddfbbbdba0003fda85f2d1c0be87ceca2586e5d)

---

Summary of changes:
 docs-xml/manpages-3/vfs_gpfs.8.xml |   20 
 source3/modules/vfs_gpfs.c |   13 +
 2 files changed, 33 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_gpfs.8.xml 
b/docs-xml/manpages-3/vfs_gpfs.8.xml
index 5f89ffa..a6b3124 100644
--- a/docs-xml/manpages-3/vfs_gpfs.8.xml
+++ b/docs-xml/manpages-3/vfs_gpfs.8.xml
@@ -276,6 +276,26 @@
/listitem
/varlistentry
 
+   varlistentry
+   termgpfs:syncio = [yes|no]/term
+   listitem
+   paraThis parameter makes Samba open all files with O_SYNC.
+ This triggers optimizations in GPFS for workloads that
+ heavily share files./para
+
+   paraFollowing is the behaviour of Samba for different
+ values:
+   /para
+   itemizedlist
+   listitemparacommandyes/commandOpen files with O_SYNC
+   /para/listitem
+   listitemparacommandno (default)/commandOpen files as
+   normal Samba would do
+   /para/listitem
+   /itemizedlist
+   /listitem
+   /varlistentry
+
/variablelist
 /refsect1
 
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 7d5d199..08e5f55 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -32,6 +32,7 @@
 #include gpfs_gpl.h
 #include nfs4_acls.h
 #include vfs_gpfs.h
+#include system/filesys.h
 
 struct gpfs_config_data {
bool sharemodes;
@@ -1299,6 +1300,17 @@ static uint32_t vfs_gpfs_capabilities(struct 
vfs_handle_struct *handle,
return next;
 }
 
+static int vfs_gpfs_open(struct vfs_handle_struct *handle,
+struct smb_filename *smb_fname, files_struct *fsp,
+int flags, mode_t mode)
+{
+   if (lp_parm_bool(fsp-conn-params-service, gpfs, syncio,
+false)) {
+   flags |= O_SYNC;
+   }
+   return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
+}
+
 
 static struct vfs_fn_pointers vfs_gpfs_fns = {
.connect_fn = vfs_gpfs_connect,
@@ -1326,6 +1338,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
.is_offline = vfs_gpfs_is_offline,
.aio_force = vfs_gpfs_aio_force,
.sendfile = vfs_gpfs_sendfile,
+   .open_fn = vfs_gpfs_open,
.ftruncate = vfs_gpfs_ftruncate
 };
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  fb85cf6 s3-proto: remove remaining nss_info prototypes to nss_info.h
  from  40d20d1 s3: Document gpfs:syncio

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit fb85cf65b0cc36a568df03dd0fbc6a605fa17b08
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 15:02:49 2011 +0200

s3-proto: remove remaining nss_info prototypes to nss_info.h

Guenther
(cherry picked from commit d6289641f5d421d188c37819f5fe8ceeb5a86aba)

---

Summary of changes:
 source3/include/nss_info.h |7 +++
 source3/include/proto.h|7 ---
 2 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index bf66ef0..f92937e 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -95,5 +95,12 @@ NTSTATUS nss_map_from_alias( TALLOC_CTX *mem_ctx, const char 
*domain,
 
 NTSTATUS nss_close( const char *parameters );
 
+/* The following definitions come from winbindd/nss_info.c  */
+
+
+/* The following definitions come from winbindd/nss_info_template.c  */
+
+NTSTATUS nss_info_template_init( void );
+
 #endif /* _IDMAP_NSS_H_ */
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6c76029..fedc951 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2803,13 +2803,6 @@ int sessionid_traverse_read(int (*fn)(const char *key,
 char *stdin_new_passwd( void);
 char *get_pass( const char *prompt, bool stdin_get);
 
-/* The following definitions come from winbindd/nss_info.c  */
-
-
-/* The following definitions come from winbindd/nss_info_template.c  */
-
-NTSTATUS nss_info_template_init( void );
-
 /* The following definitions come from lib/avahi.c */
 
 struct AvahiPoll *tevent_avahi_poll(TALLOC_CTX *mem_ctx,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  c6e4a26 s3-rpc_server: remove proto of nonexisting function 
(rpc_pipe_register_commands).
  from  fb85cf6 s3-proto: remove remaining nss_info prototypes to nss_info.h

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit c6e4a26d7b7732130d3b0300e0a84d676d6a81de
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 22:43:59 2011 +0200

s3-rpc_server: remove proto of nonexisting function
(rpc_pipe_register_commands).

Guenther
(cherry picked from commit c6fe379a4637dd1d5db34cbe4f566d3913b21fd2)

---

Summary of changes:
 source3/include/proto.h|4 
 source3/rpc_server/srv_pipe_register.c |2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index fedc951..a8b674b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2725,10 +2725,6 @@ struct ncacn_packet;
 bool create_next_pdu(struct pipes_struct *p);
 bool api_pipe_bind_auth3(struct pipes_struct *p, struct ncacn_packet *pkt);
 bool setup_fault_pdu(struct pipes_struct *p, NTSTATUS status);
-NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
-   const char *srv,
-   const struct ndr_syntax_id *interface,
-   const struct api_struct *cmds, int size);
 bool is_known_pipename(const char *cli_filename, struct ndr_syntax_id *syntax);
 
 /* The following definitions come from rpc_server/srv_pipe_hnd.c  */
diff --git a/source3/rpc_server/srv_pipe_register.c 
b/source3/rpc_server/srv_pipe_register.c
index a6d6542..56d6832 100644
--- a/source3/rpc_server/srv_pipe_register.c
+++ b/source3/rpc_server/srv_pipe_register.c
@@ -197,7 +197,7 @@ NTSTATUS rpc_srv_register(int version, const char *clnt, 
const char *srv,
rpc_entry = SMB_REALLOC_ARRAY_KEEP_OLD_ON_ERROR(rpc_lookup, struct 
rpc_table, rpc_lookup_size);
if (NULL == rpc_entry) {
rpc_lookup_size--;
-   DEBUG(0, (rpc_pipe_register_commands: memory allocation 
failed\n));
+   DEBUG(0, (rpc_srv_register: memory allocation failed\n));
return NT_STATUS_NO_MEMORY;
} else {
rpc_lookup = rpc_entry;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  3bcdab2 s3-spoolss: remove another unused header.
   via  bbe4e6d s3-util: move valid_share_pathname() to lib/util.c
  from  c6e4a26 s3-rpc_server: remove proto of nonexisting function 
(rpc_pipe_register_commands).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 3bcdab23d9e1304e9a0b306c673107907f2e8307
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 13:25:19 2011 +0200

s3-spoolss: remove another unused header.

Guenther
(cherry picked from commit 1a561dedb9995f52411d2fed2c6e0cc1e37a85d1)

commit bbe4e6d975e7b47179572f103d41d95d1cab6edf
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 22:34:56 2011 +0200

s3-util: move valid_share_pathname() to lib/util.c

Guenther
(cherry picked from commit c1f3ff734043082a9488c787324e76a37702f94d)

---

Summary of changes:
 source3/include/proto.h   |5 +---
 source3/lib/util.c|   34 +
 source3/rpc_server/spoolss/srv_spoolss_util.c |1 -
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c |   34 -
 4 files changed, 35 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index a8b674b..157a4ab 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -712,6 +712,7 @@ bool tevent_req_poll_ntstatus(struct tevent_req *req,
  NTSTATUS *status);
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result);
 int timeval_to_msec(struct timeval t);
+char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
 
 /* The following definitions come from lib/util_cmdline.c  */
 
@@ -2766,10 +2767,6 @@ void do_drv_upgrade_printer(struct messaging_context 
*msg,
DATA_BLOB *data);
 void update_monitored_printq_cache(struct messaging_context *msg_ctx);
 
-/* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
-
-char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
-
 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
 
 bool init_service_op_table( void );
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 69568ce..d39aace 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2687,3 +2687,37 @@ int timeval_to_msec(struct timeval t)
 {
return t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
 }
+
+/***
+ Check a given DOS pathname is valid for a share.
+/
+
+char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname)
+{
+   char *ptr = NULL;
+
+   if (!dos_pathname) {
+   return NULL;
+   }
+
+   ptr = talloc_strdup(ctx, dos_pathname);
+   if (!ptr) {
+   return NULL;
+   }
+   /* Convert any '\' paths to '/' */
+   unix_format(ptr);
+   ptr = unix_clean_name(ctx, ptr);
+   if (!ptr) {
+   return NULL;
+   }
+
+   /* NT is braindead - it wants a C: prefix to a pathname ! So strip it. 
*/
+   if (strlen(ptr)  2  ptr[1] == ':'  ptr[0] != '/')
+   ptr += 2;
+
+   /* Only absolute paths allowed. */
+   if (*ptr != '/')
+   return NULL;
+
+   return ptr;
+}
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c 
b/source3/rpc_server/spoolss/srv_spoolss_util.c
index 9e9e253..c8e96e0 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -23,7 +23,6 @@
 #include nt_printing.h
 #include srv_spoolss_util.h
 #include ../librpc/gen_ndr/ndr_spoolss.h
-#include ../librpc/gen_ndr/srv_winreg.h
 #include ../librpc/gen_ndr/ndr_winreg_c.h
 #include ../librpc/gen_ndr/ndr_security.h
 #include secrets.h
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c 
b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index e51fee8..36f4c18 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -1513,40 +1513,6 @@ WERROR _srvsvc_NetShareGetInfo(struct pipes_struct *p,
 }
 
 /***
- Check a given DOS pathname is valid for a share.
-/
-
-char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname)
-{
-   char *ptr = NULL;
-
-   if (!dos_pathname) {
-   return NULL;
-   }
-
-   ptr = talloc_strdup(ctx, dos_pathname);
-   if (!ptr) {
-   return NULL;
-   }
-   /* Convert any '\' paths to '/' */
-   unix_format(ptr);
-   ptr = unix_clean_name(ctx, ptr);
-   if 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  a99d25b s3-system: move LOCK_ defines to lib/system.c
  from  3bcdab2 s3-spoolss: remove another unused header.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit a99d25b3d2af71c0ec05484469a0943b74eb89c4
Author: Günther Deschner g...@samba.org
Date:   Tue May 3 14:45:47 2011 +0200

s3-system: move LOCK_ defines to lib/system.c

Guenther
(cherry picked from commit 4fa2bac6e7ebe11447b535d9c8ec4348a2bbd39e)

---

Summary of changes:
 source3/include/includes.h |9 -
 source3/lib/system.c   |9 +
 2 files changed, 9 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 04850f0..361bdd1 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -582,15 +582,6 @@ typedef char fstring[FSTRING_LEN];
 #endif
 
 
-#if HAVE_KERNEL_SHARE_MODES
-#ifndef LOCK_MAND 
-#define LOCK_MAND  32  /* This is a mandatory flock */
-#define LOCK_READ  64  /* ... Which allows concurrent read operations 
*/
-#define LOCK_WRITE 128 /* ... Which allows concurrent write operations 
*/
-#define LOCK_RW192 /* ... Which allows concurrent read  
write ops */
-#endif
-#endif
-
 #define MAX_SEC_CTX_DEPTH 8/* Maximum number of security contexts */
 
 
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 52b6477..4114ccc 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -833,6 +833,15 @@ FILE *sys_fopen(const char *path, const char *type)
 }
 
 
+#if HAVE_KERNEL_SHARE_MODES
+#ifndef LOCK_MAND
+#define LOCK_MAND  32  /* This is a mandatory flock */
+#define LOCK_READ  64  /* ... Which allows concurrent read operations 
*/
+#define LOCK_WRITE 128 /* ... Which allows concurrent write operations 
*/
+#define LOCK_RW192 /* ... Which allows concurrent read  
write ops */
+#endif
+#endif
+
 /***
  A flock() wrapper that will perform the kernel flock.
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  a68a2b0 s3-winbindd: remove unused headers.
  from  a99d25b s3-system: move LOCK_ defines to lib/system.c

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit a68a2b0cd3192da5450d3de64211f390aa96ef59
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 13:18:39 2011 +0200

s3-winbindd: remove unused headers.

Guenther
(cherry picked from commit 233779cce4f47799d5912f362faadcd564bbf096)

---

Summary of changes:
 source3/winbindd/winbindd_rpc.c  |3 ---
 source3/winbindd/winbindd_samr.c |3 ---
 2 files changed, 0 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 82599e7..bf438a6 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -26,12 +26,9 @@
 #include includes.h
 #include winbindd.h
 #include winbindd_rpc.h
-
 #include rpc_client/rpc_client.h
 #include librpc/gen_ndr/ndr_samr_c.h
-#include librpc/gen_ndr/srv_samr.h
 #include librpc/gen_ndr/ndr_lsa_c.h
-#include librpc/gen_ndr/srv_lsa.h
 #include rpc_client/cli_samr.h
 #include rpc_client/cli_lsarpc.h
 #include ../libcli/security/security.h
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index 4eb040f..ee5ff08 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -26,14 +26,11 @@
 #include includes.h
 #include winbindd.h
 #include winbindd_rpc.h
-
 #include rpc_client/rpc_client.h
 #include ../librpc/gen_ndr/ndr_samr_c.h
 #include rpc_client/cli_samr.h
-#include ../librpc/gen_ndr/srv_samr.h
 #include ../librpc/gen_ndr/ndr_lsa_c.h
 #include rpc_client/cli_lsarpc.h
-#include ../librpc/gen_ndr/srv_lsa.h
 #include rpc_server/rpc_ncacn_np.h
 #include ../libcli/security/security.h
 #include passdb/machine_sid.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  3fe82d0 s3-smbd: avoid using pipes_struct when only session_info is 
needed.
   via  87cd7c5 s3-printing: include ../librpc/ndr/libndr.h  in ads 
printing.
  from  a68a2b0 s3-winbindd: remove unused headers.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 3fe82d0152f9760326e905516c6959fb4b9973e5
Author: Günther Deschner g...@samba.org
Date:   Sat Apr 30 00:37:05 2011 +0200

s3-smbd: avoid using pipes_struct when only session_info is needed.

Guenther
(cherry picked from commit 61cd1067efacd91e22b4acbdf0d1d92dc2efc162)

commit 87cd7c5fe13d8a1a2e7c251feed75900a338ad34
Author: Günther Deschner g...@samba.org
Date:   Sat Apr 30 00:40:28 2011 +0200

s3-printing: include ../librpc/ndr/libndr.h  in ads printing.

Guenther
(cherry picked from commit f7d6a0a1121c355a87dd113d2cb2a4985cdc06ce)

---

Summary of changes:
 source3/printing/nt_printing_ads.c |1 +
 source3/rpc_server/srv_pipe.c  |2 +-
 source3/smbd/proto.h   |2 +-
 source3/smbd/uid.c |9 -
 4 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing_ads.c 
b/source3/printing/nt_printing_ads.c
index ea41471..1ab1b0e 100644
--- a/source3/printing/nt_printing_ads.c
+++ b/source3/printing/nt_printing_ads.c
@@ -28,6 +28,7 @@
 #include krb5_env.h
 #include ../libcli/registry/util_reg.h
 #include auth.h
+#include ../librpc/ndr/libndr.h
 
 #ifdef HAVE_ADS
 /*
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 73a3486..a608a4f 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1559,7 +1559,7 @@ static bool api_pipe_request(struct pipes_struct *p,
((p-auth.auth_type == DCERPC_AUTH_TYPE_NTLMSSP) ||
 (p-auth.auth_type == DCERPC_AUTH_TYPE_KRB5) ||
 (p-auth.auth_type == DCERPC_AUTH_TYPE_SPNEGO))) {
-   if(!become_authenticated_pipe_user(p)) {
+   if(!become_authenticated_pipe_user(p-session_info)) {
data_blob_free(p-out_data.rdata);
return False;
}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index e7dd7f3..31defc6 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1056,7 +1056,7 @@ bool change_to_user(connection_struct *conn, uint16 vuid);
 bool change_to_user_by_session(connection_struct *conn,
   const struct auth_serversupplied_info 
*session_info);
 bool change_to_root_user(void);
-bool become_authenticated_pipe_user(struct pipes_struct *p);
+bool become_authenticated_pipe_user(struct auth_serversupplied_info 
*session_info);
 bool unbecome_authenticated_pipe_user(void);
 void become_root(void);
 void unbecome_root(void);
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index b554b36..7b04713 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -25,7 +25,6 @@
 #include libcli/security/security.h
 #include passdb/lookup_sid.h
 #include auth.h
-#include ntdomain.h
 
 /* what user is current? */
 extern struct current_user current_user;
@@ -409,14 +408,14 @@ bool change_to_root_user(void)
  user. Doesn't modify current_user.
 /
 
-bool become_authenticated_pipe_user(struct pipes_struct *p)
+bool become_authenticated_pipe_user(struct auth_serversupplied_info 
*session_info)
 {
if (!push_sec_ctx())
return False;
 
-   set_sec_ctx(p-session_info-utok.uid, p-session_info-utok.gid,
-   p-session_info-utok.ngroups, p-session_info-utok.groups,
-   p-session_info-security_token);
+   set_sec_ctx(session_info-utok.uid, session_info-utok.gid,
+   session_info-utok.ngroups, session_info-utok.groups,
+   session_info-security_token);
 
return True;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Günther Deschner
The branch, master has been updated
   via  6bfe488 s3-printing: remove cups_pull_comment_location from header 
file
  from  3358d5a s3: Document gpfs:syncio

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 6bfe488f29a9df26f3d6dbc4166200ea286536c1
Author: David Disseldorp dd...@suse.de
Date:   Mon May 16 13:26:41 2011 +0200

s3-printing: remove cups_pull_comment_location from header file

Signed-off-by: Günther Deschner g...@samba.org

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May 16 16:03:57 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/printing/pcap.h |4 
 1 files changed, 0 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/pcap.h b/source3/printing/pcap.h
index e8276f9..63497fd 100644
--- a/source3/printing/pcap.h
+++ b/source3/printing/pcap.h
@@ -44,10 +44,6 @@ bool cups_cache_reload(struct tevent_context *ev,
   struct messaging_context *msg_ctx,
   void (*post_cache_fill_fn)(struct tevent_context *,
  struct messaging_context *));
-bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
-   const char *printername,
-   char **comment,
-   char **location);
 
 /* The following definitions come from printing/print_iprint.c  */
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  8deb28c s3: remove various references to server side dcerpc structs 
(which are not needed).
   via  e74b740 s3: move pipe_auth_data to dcerpc.h
  from  3fe82d0 s3-smbd: avoid using pipes_struct when only session_info is 
needed.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 8deb28c63b324771815513858b89f1a0c58472f8
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 12:36:55 2011 +0200

s3: remove various references to server side dcerpc structs (which are not 
needed).

Guenther
(cherry picked from commit 0bb4701a747599042242b0612bc392a6e6d777af)

commit e74b7405586a50349be236a81e71fd432855663d
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 12:36:25 2011 +0200

s3: move pipe_auth_data to dcerpc.h

Guenther
(cherry picked from commit 80fa624861e6f45c4b6837969253d5fbac2f3b1e)

---

Summary of changes:
 source3/include/ntdomain.h  |   14 --
 source3/librpc/rpc/dcerpc.h |   15 ++-
 source3/librpc/rpc/dcerpc_helpers.c |1 -
 source3/rpc_client/cli_pipe.c   |1 -
 source3/rpc_client/cli_spoolss.c|1 -
 source3/rpcclient/rpcclient.c   |1 -
 source3/utils/net_rpc_printer.c |1 -
 source3/winbindd/winbindd_cm.c  |1 -
 source3/winbindd/winbindd_dual.c|1 -
 source3/winbindd/winbindd_pam.c |1 -
 10 files changed, 14 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 077924d..a18c0a4 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -97,20 +97,6 @@ typedef struct pipe_rpc_fns {
 
 struct gse_context;
 
-/* auth state for all bind types. */
-
-struct pipe_auth_data {
-   enum dcerpc_AuthType auth_type;
-   enum dcerpc_AuthLevel auth_level;
-
-   void *auth_ctx;
-
-   /* Only the client code uses these 3 for now */
-   char *domain;
-   char *user_name;
-   DATA_BLOB user_session_key;
-};
-
 struct dcesrv_ep_entry_list;
 
 /*
diff --git a/source3/librpc/rpc/dcerpc.h b/source3/librpc/rpc/dcerpc.h
index 0a6ddac..30c6d1b 100644
--- a/source3/librpc/rpc/dcerpc.h
+++ b/source3/librpc/rpc/dcerpc.h
@@ -33,7 +33,20 @@
 #define SMB_RPC_INTERFACE_VERSION 1
 
 struct NL_AUTH_MESSAGE;
-struct pipe_auth_data;
+
+/* auth state for all bind types. */
+
+struct pipe_auth_data {
+   enum dcerpc_AuthType auth_type;
+   enum dcerpc_AuthLevel auth_level;
+
+   void *auth_ctx;
+
+   /* Only the client code uses these 3 for now */
+   char *domain;
+   char *user_name;
+   DATA_BLOB user_session_key;
+};
 
 /* The following definitions come from librpc/rpc/dcerpc_helpers.c  */
 NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/rpc/dcerpc_helpers.c 
b/source3/librpc/rpc/dcerpc_helpers.c
index 7e6990c..7520d76 100644
--- a/source3/librpc/rpc/dcerpc_helpers.c
+++ b/source3/librpc/rpc/dcerpc_helpers.c
@@ -28,7 +28,6 @@
 #include ntlmssp_wrap.h
 #include librpc/crypto/gse.h
 #include librpc/crypto/spnego.h
-#include ntdomain.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_PARSE
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 8e155f8..b1fc4bf 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -34,7 +34,6 @@
 #include librpc/crypto/spnego.h
 #include rpc_dce.h
 #include cli_pipe.h
-#include ntdomain.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_CLI
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 831da85..3c15e2f 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -26,7 +26,6 @@
 #include rpc_client/rpc_client.h
 #include ../librpc/gen_ndr/ndr_spoolss_c.h
 #include rpc_client/cli_spoolss.h
-#include ntdomain.h
 
 /**
  convencience wrapper around rpccli_spoolss_OpenPrinterEx
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index cebe2a9..17a4cc9 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -30,7 +30,6 @@
 #include ../libcli/smbreadline/smbreadline.h
 #include ../libcli/security/security.h
 #include passdb.h
-#include ntdomain.h
 
 enum pipe_auth_type_spnego {
PIPE_AUTH_TYPE_SPNEGO_NONE = 0,
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 304f2b4..1d4428c 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -27,7 +27,6 @@
 #include registry/reg_objects.h
 #include ../libcli/security/security.h
 #include ../libcli/registry/util_reg.h
-#include ntdomain.h
 
 /* support itanium as well */
 static const struct 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  1fff258 libcli/named_pipe_auth: add forward declaration in 
npa_tstream.h.
   via  00e5d08 s3-waf: check for pthread support.
   via  f7411da s3-proto: move remaining krb5 protos to krb5_protos.h
  from  8deb28c s3: remove various references to server side dcerpc structs 
(which are not needed).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 1fff2580d791a92137f9d5ab27dcb4a82188f020
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 23:58:18 2011 +0200

libcli/named_pipe_auth: add forward declaration in npa_tstream.h.

Guenther
(cherry picked from commit 89ceb489784358f9476bb6be0ad3ab9ea4d1b9c2)

commit 00e5d087ca0ce1c5258d89aec44d59adeb681b50
Author: Günther Deschner g...@samba.org
Date:   Wed Apr 27 16:07:35 2011 +0200

s3-waf: check for pthread support.

Guenther
(cherry picked from commit cad8fafa0391e9f13c2958c45ca5ec57f93f1e7b)

commit f7411daa8cb1bb8222a09d112031a259cbd69ac8
Author: Günther Deschner g...@samba.org
Date:   Tue May 3 12:05:47 2011 +0200

s3-proto: move remaining krb5 protos to krb5_protos.h

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue May  3 15:38:40 CEST 2011 on sn-devel-104
(cherry picked from commit 9c48345e32c9aebd93c67103ea6984d74f2061b4)

---

Summary of changes:
 libcli/named_pipe_auth/npa_tstream.h |1 +
 source3/include/krb5_protos.h|6 ++
 source3/include/proto.h  |7 ---
 source3/wscript  |   31 +++
 4 files changed, 38 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/named_pipe_auth/npa_tstream.h 
b/libcli/named_pipe_auth/npa_tstream.h
index f222317..1d85de7 100644
--- a/libcli/named_pipe_auth/npa_tstream.h
+++ b/libcli/named_pipe_auth/npa_tstream.h
@@ -23,6 +23,7 @@
 struct tevent_req;
 struct tevent_context;
 struct auth_session_info_transport;
+struct tsocket_address;
 
 struct tevent_req *tstream_npa_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
diff --git a/source3/include/krb5_protos.h b/source3/include/krb5_protos.h
index 530122b..e9f282b 100644
--- a/source3/include/krb5_protos.h
+++ b/source3/include/krb5_protos.h
@@ -146,3 +146,9 @@ int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
time_t *tgs_expire,
const char *impersonate_princ_s);
 
+/* The following definitions come from libsmb/clikrb5.c  */
+
+bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
+  DATA_BLOB *edata,
+  DATA_BLOB *edata_out);
+bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB 
*unwrapped_pac_data);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 157a4ab..213ce12 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1674,13 +1674,6 @@ NTSTATUS cli_force_encryption(struct cli_state *c,
const char *password,
const char *domain);
 
-/* The following definitions come from libsmb/clikrb5.c  */
-
-bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx, 
-  DATA_BLOB *edata, 
-  DATA_BLOB *edata_out);
-bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB 
*unwrapped_pac_data);
-
 /* The following definitions come from libsmb/clilist.c  */
 
 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
diff --git a/source3/wscript b/source3/wscript
index 32c688c..a1043c8 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1713,6 +1713,37 @@ main() {
 if Options.options.with_profiling_data:
 conf.DEFINE('WITH_PROFILE', 1);
 
+PTHREAD_CFLAGS='error'
+PTHREAD_LDFLAGS='error'
+
+if PTHREAD_LDFLAGS == 'error':
+if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthread'):
+PTHREAD_CFLAGS='-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS'
+PTHREAD_LDFLAGS='-lpthread'
+if PTHREAD_LDFLAGS == 'error':
+if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthreads'):
+PTHREAD_CFLAGS='-D_THREAD_SAFE'
+PTHREAD_LDFLAGS='-lpthreads'
+if PTHREAD_LDFLAGS == 'error':
+if conf.CHECK_FUNCS_IN('pthread_attr_init', 'c_r'):
+PTHREAD_CFLAGS='-D_THREAD_SAFE -pthread'
+PTHREAD_LDFLAGS='-pthread'
+if PTHREAD_LDFLAGS == 'error':
+if conf.CHECK_FUNC('pthread_attr_init'):
+PTHREAD_CFLAGS='-D_REENTRANT'
+PTHREAD_LDFLAGS='-lpthread'
+# especially for HP-UX, where the CHECK_FUNC macro fails to test for
+# pthread_attr_init. On pthread_mutex_lock it works there...
+if PTHREAD_LDFLAGS == 'error':
+if 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  a68a7df s3-rpc_client: run minimal_includes.pl.
   via  79294de s3-rpcclient: run minimal_includes.pl.
   via  aba946b s3-param: run minimal_includes.pl.
   via  0241e64 s3-libsmb: run minimal_includes.pl.
   via  7987f15 s3-libnet: run minimal_includes.pl.
   via  af98bc2 s3-libads: run minimal_includes.pl.
   via  274f3fe s3-lib: run minimal_includes.pl.
   via  2a0c263 s3-auth: run minimal_includes.pl
  from  1fff258 libcli/named_pipe_auth: add forward declaration in 
npa_tstream.h.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit a68a7dfedd72cb97e98069ed0cc9d53dedb0b4ac
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:54:56 2011 +0200

s3-rpc_client: run minimal_includes.pl.

Guenther
(cherry picked from commit bd92826aa837f56119153b93cfce7f843e567896)

commit 79294deb58ea85f5d0d688b56df47a6c3bbb82fb
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:51:12 2011 +0200

s3-rpcclient: run minimal_includes.pl.

Guenther
(cherry picked from commit c11d52c7f6b560fe66a2f197e30602d57370fd5c)

commit aba946b91dd4dc32e3b5dbf2b19e01a4181b4f4e
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:36:51 2011 +0200

s3-param: run minimal_includes.pl.

Guenther
(cherry picked from commit 62314da8059ae888c0d1b299c486156664611e06)

commit 0241e64238249c730acbf3d18d36532a14c74570
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:31:42 2011 +0200

s3-libsmb: run minimal_includes.pl.

Guenther
(cherry picked from commit ea8960448d0a40067382a8d14ae19351d20acbdd)

commit 7987f1555648051ef4a5a00b42062d4fb149c0e2
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:25:31 2011 +0200

s3-libnet: run minimal_includes.pl.

Guenther
(cherry picked from commit a05a59e8e2a421f22978e6eedbb1a7501a603aff)

commit af98bc24e3f8708f6382611538afa2df2d5a68c5
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:22:05 2011 +0200

s3-libads: run minimal_includes.pl.

Guenther
(cherry picked from commit 653b84d2d6ed7387f93e5a126b5f2114b831044e)

commit 274f3fea50cd3ae5bb5bdedc75402a11cfcbb114
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:10:23 2011 +0200

s3-lib: run minimal_includes.pl.

Guenther
(cherry picked from commit 63ebc918e4514f0006b94856d9b089255fca9718)

commit 2a0c2636c40ef35a46f3ae33a4f28f0c87174d13
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:03:48 2011 +0200

s3-auth: run minimal_includes.pl

Guenther
(cherry picked from commit 58db720e27d4b0c580fb4d3e036d823bc5d3a141)

---

Summary of changes:
 source3/auth/auth_sam.c |1 -
 source3/auth/auth_unix.c|1 -
 source3/auth/auth_util.c|1 -
 source3/auth/server_info_sam.c  |2 --
 source3/auth/token_util.c   |1 -
 source3/lib/filename_util.c |1 -
 source3/lib/util_builtin.c  |1 -
 source3/libads/ldap_printer.c   |2 --
 source3/libnet/libnet_dssync_passdb.c   |1 -
 source3/libnet/libnet_samsync.c |1 -
 source3/libsmb/cli_np_tstream.c |1 -
 source3/libsmb/smbsock_connect.c|1 -
 source3/param/loadparm.c|1 -
 source3/rpc_client/cli_pipe.c   |1 -
 source3/rpc_client/cli_winreg_int.c |1 -
 source3/rpc_client/rpc_transport_sock.c |1 -
 source3/rpcclient/cmd_spoolss.c |1 -
 17 files changed, 0 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 8d2300d..d09d60e 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -22,7 +22,6 @@
 
 #include includes.h
 #include auth.h
-#include ../libcli/auth/libcli_auth.h
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 8f9eacf..086c39e 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -20,7 +20,6 @@
 #include includes.h
 #include auth.h
 #include system/passwd.h
-#include ../librpc/gen_ndr/samr.h
 #include smbd/globals.h
 
 #undef DBGC_CLASS
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index cba7156..a904da4 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -23,7 +23,6 @@
 
 #include includes.h
 #include auth.h
-#include smbd/globals.h
 #include ../libcli/auth/libcli_auth.h
 #include ../lib/crypto/arcfour.h
 #include rpc_client/init_lsa.h
diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c
index 5fd78a3..31fd9f9 100644
--- a/source3/auth/server_info_sam.c
+++ b/source3/auth/server_info_sam.c
@@ -23,8 +23,6 @@
 
 #include 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  fce32d9 s4-smbtorture: add test_netremotetod.
   via  1ace901 s4-libcli/rap: add smbcli_rap_netremotetod().
   via  e4765bf s3-rap: add rap_NetRemoteTOD to IDL.
  from  a68a7df s3-rpc_client: run minimal_includes.pl.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit fce32d92de313862fc9d34fff28d1d10d2f4e5b4
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:50:23 2011 +0200

s4-smbtorture: add test_netremotetod.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May 16 12:45:52 CEST 2011 on sn-devel-104
(cherry picked from commit 74d82faa78e64bdaed68efb9331a7af1c3016c34)

commit 1ace9011db167b96cb60fef713d69d8d502e9222
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:37:08 2011 +0200

s4-libcli/rap: add smbcli_rap_netremotetod().

Guenther
(cherry picked from commit b1948659ad987ce50d048dabc34f03031a243ee5)

commit e4765bf9f800f565b355d6821459d87658698174
Author: Günther Deschner g...@samba.org
Date:   Wed May 11 23:35:21 2011 +0200

s3-rap: add rap_NetRemoteTOD to IDL.

Guenther
(cherry picked from commit b82caab5c9d8821cd125654e3233da40eb4c61d1)

---

Summary of changes:
 librpc/idl/rap.idl |   22 
 source4/libcli/rap/rap.c   |   47 
 source4/selftest/knownfail |1 +
 source4/torture/rap/rap.c  |   17 +++
 4 files changed, 87 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl
index 8087e22..780951c 100644
--- a/librpc/idl/rap.idl
+++ b/librpc/idl/rap.idl
@@ -966,6 +966,28 @@ interface rap
[out] uint16 convert
);
 
+   typedef [public] struct {
+   uint32 TimeSinceJan11970;
+   uint32 TimeSinceBoot;
+   uint8 Hours;
+   uint8 Minutes;
+   uint8 Seconds;
+   uint8 Hundreds;
+   uint16 TimeZone;
+   uint16 ClockFrequency;
+   uint8 Day;
+   uint8 Month;
+   uint16 Year;
+   uint8 Weekday;
+   } rap_TimeOfDayInfo;
+
+   [public] void rap_NetRemoteTOD(
+   [in] uint16 bufsize,
+   [out] rap_status status,
+   [out] uint16 convert,
+   [out] rap_TimeOfDayInfo tod
+   );
+
/* Parameter description strings for RAP calls   */
/* Names are defined name for RAP call with _REQ */
/* appended to end.  */
diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c
index 5ea9e81..7743f64 100644
--- a/source4/libcli/rap/rap.c
+++ b/source4/libcli/rap/rap.c
@@ -1633,3 +1633,50 @@ NTSTATUS smbcli_rap_netuserdelete(struct smbcli_tree 
*tree,
talloc_free(call);
return result;
 }
+
+NTSTATUS smbcli_rap_netremotetod(struct smbcli_tree *tree,
+ TALLOC_CTX *mem_ctx,
+ struct rap_NetRemoteTOD *r)
+{
+   struct rap_call *call;
+   NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+   if (!(call = new_rap_cli_call(mem_ctx, RAP_NetRemoteTOD))) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   rap_cli_push_rcvbuf(call, r-in.bufsize);
+
+   rap_cli_expect_format(call, DDWWBBWB);
+   rap_cli_expect_extra_format(call, );
+
+   if (DEBUGLEVEL = 10) {
+   NDR_PRINT_IN_DEBUG(rap_NetRemoteTOD, r);
+   }
+
+   result = rap_cli_do_call(tree, call);
+
+   if (!NT_STATUS_IS_OK(result))
+   goto done;
+
+   result = NT_STATUS_INVALID_PARAMETER;
+
+   NDR_GOTO(ndr_pull_rap_status(call-ndr_pull_param, NDR_SCALARS, 
r-out.status));
+   NDR_GOTO(ndr_pull_uint16(call-ndr_pull_param, NDR_SCALARS, 
r-out.convert));
+
+   NDR_GOTO(ndr_pull_rap_TimeOfDayInfo(call-ndr_pull_data, 
NDR_SCALARS|NDR_BUFFERS, r-out.tod));
+
+   result = NT_STATUS_OK;
+
+   if (!NT_STATUS_IS_OK(result)) {
+   goto done;
+   }
+
+   if (DEBUGLEVEL = 10) {
+   NDR_PRINT_OUT_DEBUG(rap_NetRemoteTOD, r);
+   }
+
+ done:
+   talloc_free(call);
+   return result;
+}
diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index cdd7a2d..d3c3f4e 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -41,6 +41,7 @@ samba4.base.charset.*.Testing partial surrogate
 samba4.rap.*netservergetinfo
 samba4.rap.*netsessionenum
 samba4.rap.*netsessiongetinfo
+samba4.rap.*netremotetod
 samba4.smb2.persistent.handles1
 samba4.winbind.struct.*.show_sequence # Not yet working in winbind
 samba4.winbind.struct.*.getpwent  # Not yet working in winbind
diff --git 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  7a4cc69 s3-rpc_server: (re)move last globally included rpc_server 
prototypes.
   via  ce063fd s3: include ntdomain.h before including generated srv_ 
headers.
   via  9a6a1a5 s3-rpc_server: add pipes_struct forward declaration.
   via  44c6ed7 s3-printing: avoid using pipes_struct when only 
session_info is needed.
   via  54559a5 s3-proto: move remaining srvsvc protos to own header file.
   via  8143106 s3-proto: move remaining spoolss protos to own header file.
   via  e3c65e2 s3-proto: move more rpc_server prototypes out of proto.h
   via  6c07214 s3-proto: move rpc_srv_register protos and structs to town 
headerfile.
   via  2cc2f7f s3-proto: move more headers to rpc_server/rpc_ncacn_np.h 
where they origin from.
   via  0b0dc24 s3-proto: remove duplicate prototypes.
   via  944dceb s3-rpc_server: remove some unneeded headers.
   via  dfdc021 s3-proto: move rpc_server/rpc_handles.c protos to ntdomain.h
   via  f92793f s3-proto: move more librpc prototypes to librpc/rpc/dcerpc.h
   via  7daafe4 s3-proto: move more rpc client prototypes to cli_pipe.h.
  from  fce32d9 s4-smbtorture: add test_netremotetod.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 7a4cc69ac8d2b6f53735a2f2cea8d40b7e965235
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 13:27:45 2011 +0200

s3-rpc_server: (re)move last globally included rpc_server prototypes.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May  2 16:05:31 CEST 2011 on sn-devel-104
(cherry picked from commit 56cd3b3595cb0c98fa2dfa397c915fbf37d2)

commit ce063fde45bfe649f8f50dd72e42db10b3d94f30
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 13:21:53 2011 +0200

s3: include ntdomain.h before including generated srv_ headers.

Guenther
(cherry picked from commit 0e76eddcc8a4e7e98167b8f92387fae015fae095)

commit 9a6a1a5b934247c3d8c81934788231e331c2b020
Author: Günther Deschner g...@samba.org
Date:   Mon May 2 13:19:51 2011 +0200

s3-rpc_server: add pipes_struct forward declaration.

Guenther
(cherry picked from commit 911cdc56c146014058063b872372ff8096c06065)

commit 44c6ed73b6f27484014cde771715c94475cac53f
Author: Günther Deschner g...@samba.org
Date:   Sat Apr 30 00:09:09 2011 +0200

s3-printing: avoid using pipes_struct when only session_info is needed.

Guenther
(cherry picked from commit cd5b2b242b39437081592d41d297bce0668b40ab)

commit 54559a55bd90f18330759b88fc9b2457951ccfdb
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 23:57:49 2011 +0200

s3-proto: move remaining srvsvc protos to own header file.

Guenther
(cherry picked from commit daa02f34b181a3ec7224e920f787cc677bc3cdf2)

commit 8143106d7290aa4ae713bc04603b8b589bc86346
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 23:47:25 2011 +0200

s3-proto: move remaining spoolss protos to own header file.

Guenther
(cherry picked from commit c233c21425a183dd1124329fdbca13ab92cc6d6a)

commit e3c65e2b7da2f7fbee4e6211bbe4f01c0873edec
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 23:32:28 2011 +0200

s3-proto: move more rpc_server prototypes out of proto.h

Guenther
(cherry picked from commit 047d8c073b57bc12648a251deaceedb65f4f59cf)

commit 6c07214f6a851f5fef573c8e7ffd9c1959e3702b
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 22:32:12 2011 +0200

s3-proto: move rpc_srv_register protos and structs to town headerfile.

Guenther
(cherry picked from commit 49d5f62b42d821bb8a11b595efb53eb88ec3c570)

commit 2cc2f7fe76e501c95206f91f4170d7e3829d89a0
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 16:40:24 2011 +0200

s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin 
from.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Fri Apr 29 22:05:07 CEST 2011 on sn-devel-104
(cherry picked from commit bbacaec4e9365b128eb11467c95412de7473c1ec)

commit 0b0dc24c82a6dd383cbffebae366fbf8e60ed66e
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 16:20:27 2011 +0200

s3-proto: remove duplicate prototypes.

Guenther
(cherry picked from commit bc781bf7d98baca57c8043bf7dc0a95f8ffd1345)

commit 944dceb45b384c68a581b3f27a914c9e1d9d10cf
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 16:19:54 2011 +0200

s3-rpc_server: remove some unneeded headers.

Guenther
(cherry picked from commit 487cb0c96ef8ca05fcef35d0d7c49bc067f6cff7)

commit dfdc021e75fa4168b01ab77bfa1cb8c2539393db
Author: Günther Deschner g...@samba.org
Date:   Fri Apr 29 15:22:29 2011 +0200

s3-proto: move rpc_server/rpc_handles.c protos to ntdomain.h

Guenther

commit 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  154637c s3-rpc_server: run minimal_includes.pl.
   via  d4e6e96 s3-printing: run minimal_includes.pl.
  from  7a4cc69 s3-rpc_server: (re)move last globally included rpc_server 
prototypes.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 154637cf36f5a47d3e83fcf2e2ed081cbff3e141
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:58:27 2011 +0200

s3-rpc_server: run minimal_includes.pl.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Thu May  5 03:04:38 CEST 2011 on sn-devel-104
(cherry picked from commit 8563d5c384f672276d8ea2ab20a1810ff485e37d)

commit d4e6e964ec87cd91a3bfe03efe754454644a3272
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 00:48:26 2011 +0200

s3-printing: run minimal_includes.pl.

Guenther
(cherry picked from commit c9f3a2c83e208fcf05576eb2137c893fe4f3fe6d)

---

Summary of changes:
 source3/printing/nt_printing.c|5 -
 source3/printing/nt_printing_migrate.c|1 -
 source3/printing/printspoolss.c   |1 -
 source3/printing/spoolssd.c   |2 --
 source3/rpc_server/epmapper/srv_epmapper.c|1 -
 source3/rpc_server/epmd.c |1 -
 source3/rpc_server/eventlog/srv_eventlog_nt.c |1 -
 source3/rpc_server/netlogon/srv_netlog_nt.c   |2 --
 source3/rpc_server/rpc_ep_setup.c |1 -
 source3/rpc_server/samr/srv_samr_nt.c |1 -
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c |1 -
 11 files changed, 0 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 552e1ba..6d4bebb 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -20,12 +20,7 @@
  */
 
 #include includes.h
-#include printing/pcap.h
 #include printing/nt_printing_tdb.h
-#include printing/nt_printing_migrate.h
-#include registry.h
-#include registry/reg_objects.h
-#include ../librpc/gen_ndr/ndr_security.h
 #include ../librpc/gen_ndr/ndr_spoolss.h
 #include rpc_server/spoolss/srv_spoolss_util.h
 #include nt_printing.h
diff --git a/source3/printing/nt_printing_migrate.c 
b/source3/printing/nt_printing_migrate.c
index 883fb52..1a16a60 100644
--- a/source3/printing/nt_printing_migrate.c
+++ b/source3/printing/nt_printing_migrate.c
@@ -25,7 +25,6 @@
 #include rpc_client/rpc_client.h
 #include librpc/gen_ndr/ndr_ntprinting.h
 #include librpc/gen_ndr/ndr_spoolss_c.h
-#include rpc_client/cli_spoolss.h
 #include librpc/gen_ndr/ndr_security.h
 #include rpc_server/rpc_ncacn_np.h
 #include auth.h
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c
index 2f6f19c..3d8b0d8 100644
--- a/source3/printing/printspoolss.c
+++ b/source3/printing/printspoolss.c
@@ -22,7 +22,6 @@
 #include rpc_client/rpc_client.h
 #include ../librpc/gen_ndr/ndr_spoolss_c.h
 #include rpc_server/rpc_ncacn_np.h
-#include smbd/smbd.h
 #include smbd/globals.h
 #include ../libcli/security/security.h
 
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index a6d8a0f..896aee0 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -19,7 +19,6 @@
 #include includes.h
 #include serverid.h
 #include smbd/smbd.h
-#include locking/proto.h
 
 #include messages.h
 #include include/printing.h
@@ -29,7 +28,6 @@
 #include librpc/gen_ndr/srv_spoolss.h
 #include rpc_server/rpc_server.h
 #include rpc_server/rpc_ep_setup.h
-#include rpc_server/srv_pipe_register.h
 #include rpc_server/spoolss/srv_spoolss_nt.h
 
 #define SPOOLSS_PIPE_NAME spoolss
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c 
b/source3/rpc_server/epmapper/srv_epmapper.c
index a44dfde..efa9b6f 100644
--- a/source3/rpc_server/epmapper/srv_epmapper.c
+++ b/source3/rpc_server/epmapper/srv_epmapper.c
@@ -22,7 +22,6 @@
 #include includes.h
 #include ntdomain.h
 #include ../libcli/security/security.h
-#include librpc/gen_ndr/ndr_epmapper.h
 #include librpc/gen_ndr/srv_epmapper.h
 #include srv_epmapper.h
 #include auth.h
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c
index 04fdfb1..4e2056e 100644
--- a/source3/rpc_server/epmd.c
+++ b/source3/rpc_server/epmd.c
@@ -26,7 +26,6 @@
 #include ../librpc/gen_ndr/srv_epmapper.h
 #include rpc_server/rpc_server.h
 #include rpc_server/epmapper/srv_epmapper.h
-#include rpc_server/srv_pipe_register.h
 #include messages.h
 
 #define DAEMON_NAME epmd
diff --git a/source3/rpc_server/eventlog/srv_eventlog_nt.c 
b/source3/rpc_server/eventlog/srv_eventlog_nt.c
index c0d9499..b63d1ab 100644
--- a/source3/rpc_server/eventlog/srv_eventlog_nt.c
+++ b/source3/rpc_server/eventlog/srv_eventlog_nt.c
@@ -24,7 +24,6 @@
 #include ntdomain.h
 #include 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  f407006 s3-includes: remove ipv6 related prototype which is already 
defined in ../lib/util/util_net.h.
   via  007b781 lib/util Move more network utility functions from source3 
into lib/util
  from  154637c s3-rpc_server: run minimal_includes.pl.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit f407006cd59d5957e4564d96c942b2aa913bcd18
Author: Günther Deschner g...@samba.org
Date:   Tue May 3 16:16:50 2011 +0200

s3-includes: remove ipv6 related prototype which is already defined in 
../lib/util/util_net.h.

Guenther
(cherry picked from commit a3609457912123037ca9fc51349d89d7921bc4e7)

commit 007b781b39e4bd2ddc25ab6bd2b6f9b88dfdba8b
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 2 15:23:08 2011 +1000

lib/util Move more network utility functions from source3 into lib/util

This will help with the merge of the interfaces layer.

Andrew Bartlett
(cherry picked from commit fbea52f74a80268446f45936a0cf40400aba8565)

---

Summary of changes:
 lib/util/system.c  |   72 
 lib/util/util.h|   14 -
 lib/util/util_net.c|  155 +++
 lib/util/util_net.h|   35 ++
 source3/include/includes.h |5 --
 source3/include/proto.h|   10 ---
 source3/lib/system.c   |   71 
 source3/lib/util_sock.c|  156 
 8 files changed, 275 insertions(+), 243 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/system.c b/lib/util/system.c
index 9bf5de1..17c0553 100644
--- a/lib/util/system.c
+++ b/lib/util/system.c
@@ -117,3 +117,75 @@ _PUBLIC_ pid_t sys_getpid(void)
 
return mypid;
 }
+
+
+_PUBLIC_ int sys_getpeereid( int s, uid_t *uid)
+{
+#if defined(HAVE_PEERCRED)
+   struct ucred cred;
+   socklen_t cred_len = sizeof(struct ucred);
+   int ret;
+
+   ret = getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void *)cred, cred_len);
+   if (ret != 0) {
+   return -1;
+   }
+
+   if (cred_len != sizeof(struct ucred)) {
+   errno = EINVAL;
+   return -1;
+   }
+
+   *uid = cred.uid;
+   return 0;
+#else
+#if defined(HAVE_GETPEEREID)
+   gid_t gid;
+   return getpeereid(s, uid, gid);
+#endif
+   errno = ENOSYS;
+   return -1;
+#endif
+}
+
+_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
+int salen,
+char *host,
+size_t hostlen,
+char *service,
+size_t servlen,
+int flags)
+{
+   /*
+* For Solaris we must make sure salen is the
+* correct length for the incoming sa_family.
+*/
+
+   if (salen == sizeof(struct sockaddr_storage)) {
+   salen = sizeof(struct sockaddr_in);
+#if defined(HAVE_IPV6)
+   if (psa-sa_family == AF_INET6) {
+   salen = sizeof(struct sockaddr_in6);
+   }
+#endif
+   }
+   return getnameinfo(psa, salen, host, hostlen, service, servlen, flags);
+}
+
+_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr)
+{
+   socklen_t salen = (socklen_t)-1;
+
+   if (addr-sa_family == AF_INET) {
+   salen = sizeof(struct sockaddr_in);
+   } else if (addr-sa_family == AF_UNIX) {
+   salen = sizeof(struct sockaddr_un);
+   }
+#if defined(HAVE_IPV6)
+   else if (addr-sa_family == AF_INET6) {
+   salen = sizeof(struct sockaddr_in6);
+   }
+#endif
+
+   return connect(fd, addr, salen);
+}
diff --git a/lib/util/util.h b/lib/util/util.h
index 78071ad..81289b8 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -133,8 +133,20 @@ _PUBLIC_ pid_t sys_fork(void);
  **/
 _PUBLIC_ pid_t sys_getpid(void);
 
-/* The following definitions come from lib/util/genrand.c  */
+_PUBLIC_ int sys_getpeereid( int s, uid_t *uid);
+
+struct sockaddr;
 
+_PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
+int salen,
+char *host,
+size_t hostlen,
+char *service,
+size_t servlen,
+int flags);
+_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr);
+
+/* The following definitions come from lib/util/genrand.c  */
 /**
  Copy any user given reseed data.
 **/
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 9c8f5c6..e804471 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -540,3 +540,158 @@ void set_sockaddr_port(struct sockaddr *psa, uint16_t 
port)
 }
 
 

[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Andreas Schneider
The branch, master has been updated
   via  a032c9c s3-rpc_server: Force ncalrpc dir to be mode 755.
  from  6bfe488 s3-printing: remove cups_pull_comment_location from header 
file

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit a032c9c8fe8aff455407485169b9445860f89606
Author: Andreas Schneider a...@samba.org
Date:   Mon May 16 16:50:51 2011 +0200

s3-rpc_server: Force ncalrpc dir to be mode 755.

This completes aae9353ecf56323b63da66aa84d8a0a4f219d94d.

directory_create_or_exist() is not needed cause create_pipe_sock() takes
care of setting up the directory correctly.

Andrew please check!

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Mon May 16 17:54:20 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/rpc_server/rpc_server.c |   14 +-
 1 files changed, 1 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index cb6fbf0..b46c451 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -267,13 +267,7 @@ bool setup_named_pipe_socket(const char *pipe_name,
goto out;
}
 
-   if (!directory_create_or_exist(np_dir, geteuid(), 0700)) {
-   DEBUG(0, (Failed to create pipe directory %s - %s\n,
- np_dir, strerror(errno)));
-   goto out;
-   }
-
-   state-fd = create_pipe_sock(np_dir, pipe_name, 0700);
+   state-fd = create_pipe_sock(np_dir, pipe_name, 0755);
if (state-fd == -1) {
DEBUG(0, (Failed to create pipe socket! [%s/%s]\n,
  np_dir, pipe_name));
@@ -891,12 +885,6 @@ bool setup_dcerpc_ncalrpc_socket(struct tevent_context 
*ev_ctx,
return false;
}
 
-   if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
-   DEBUG(0, (Failed to create pipe directory %s - %s\n,
- lp_ncalrpc_dir(), strerror(errno)));
-   goto out;
-   }
-
state-fd = create_pipe_sock(lp_ncalrpc_dir(), name, 0755);
if (state-fd == -1) {
DEBUG(0, (Failed to create pipe socket! [%s/%s]\n,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  138da8f s3: only include tdb headers where needed.
   via  a7f3984 lib/util Move source3 tdb_wrap_open() into the common code.
  from  f407006 s3-includes: remove ipv6 related prototype which is already 
defined in ../lib/util/util_net.h.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 138da8f4b1eb4715b7fb259986b9c1e8ffae469e
Author: Günther Deschner g...@samba.org
Date:   Thu May 5 11:25:29 2011 +0200

s3: only include tdb headers where needed.

Guenther
(cherry picked from commit d8cfca3a9bd2b6b6c562fd202377d95a98eb5472)

commit a7f39847ebf29b821aab2570a2f2bd841a28e836
Author: Andrew Bartlett abart...@samba.org
Date:   Wed May 4 10:28:15 2011 +1000

lib/util Move source3 tdb_wrap_open() into the common code.

This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases.  However, having two different tdb_wrap lists is a worse
fate, so this will do for now.

Andrew Bartlett
(cherry picked from commit 14750139639b3531e57a3ca3f9e481d6e458dc06)

---

Summary of changes:
 lib/util/tdb_wrap.c   |  194 +
 {source4/lib = lib/util}/tdb_wrap.h  |3 -
 lib/util/util_tdb.h   |1 -
 lib/util/wscript_build|   10 ++
 libcli/auth/schannel_state_tdb.c  |4 +-
 source3/Makefile.in   |1 +
 source3/groupdb/mapping.c |1 +
 source3/groupdb/mapping_tdb.c |1 +
 source3/include/ctdbd_conn.h  |2 +
 source3/include/dbwrap.h  |2 +
 source3/include/includes.h|3 +-
 source3/include/printing.h|7 +-
 source3/include/util_tdb.h|8 -
 source3/intl/lang_tdb.c   |1 +
 source3/lib/ctdbd_conn.c  |1 +
 source3/lib/dbwrap.c  |1 +
 source3/lib/dbwrap_ctdb.c |2 +
 source3/lib/dbwrap_tdb.c  |1 +
 source3/lib/dbwrap_util.c |1 +
 source3/lib/eventlog/eventlog.c   |1 +
 source3/lib/eventlog/eventlog.h   |2 +
 source3/lib/g_lock.c  |1 +
 source3/lib/gencache.c|1 +
 source3/lib/messages_ctdbd.c  |1 +
 source3/lib/messages_local.c  |1 +
 source3/lib/server_mutex.c|2 +
 source3/lib/serverid.c|2 +
 source3/lib/sessionid_tdb.c   |1 +
 source3/lib/sharesec.c|1 +
 source3/lib/talloc_dict.c |1 +
 source3/lib/tdb_validate.c|1 +
 source3/lib/util.c|1 +
 source3/lib/util_tdb.c|  161 +
 source3/libnet/libnet_dssync_passdb.c |1 +
 source3/libsmb/samlogon_cache.c   |1 +
 source3/libsmb/smb_share_modes.c  |1 +
 source3/locking/locking.c |1 +
 source3/locking/posix.c   |1 +
 source3/modules/nfs4_acls.c   |1 +
 source3/modules/vfs_acl_tdb.c |1 +
 source3/modules/vfs_xattr_tdb.c   |1 +
 source3/nmbd/nmbd_winsserver.c|1 +
 source3/param/loadparm.c  |1 +
 source3/passdb/login_cache.c  |1 +
 source3/passdb/machine_account_secrets.c  |1 +
 source3/passdb/passdb.c   |1 +
 source3/passdb/pdb_tdb.c  |1 +
 source3/passdb/secrets.c  |1 +
 source3/printing/notify.c |1 +
 source3/printing/nt_printing_migrate.c|1 +
 source3/printing/nt_printing_tdb.c|1 +
 source3/printing/printer_list.c   |1 +
 source3/printing/printing.c   |1 +
 source3/printing/printing_db.c|3 +-
 source3/printing/tests/vlp.c  |1 +
 source3/registry/reg_backend_db.c |1 +
 source3/registry/reg_objects.c|1 +
 source3/registry/reg_perfcount.c  |1 +
 source3/rpc_server/eventlog/srv_eventlog_nt.c |1 +
 source3/rpc_server/spoolss/srv_spoolss_nt.c   |1 +
 source3/smbd/files.c  |1 +
 source3/smbd/globals.c|1 +
 source3/smbd/globals.h|3 +-
 source3/smbd/mangle_hash.c|1 +
 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  68936f4 s3-includes: no need to globally include 
libads/ads_status.h.
   via  58cae16 s3-includes: finally only include client.h when libsmb is 
used.
   via  66f6359 s3-build Remove distinct LOCALEDIR subsystem
   via  3b2fe47 s3-libsmb: move protos to libsmb/proto.h
  from  138da8f s3: only include tdb headers where needed.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 68936f478dfc0cb9c7ae9e7b208b5e5c22ea2973
Author: Günther Deschner g...@samba.org
Date:   Fri May 6 12:54:59 2011 +0200

s3-includes: no need to globally include libads/ads_status.h.

Guenther
(cherry picked from commit 1e208a705718adb105d89093041c0ba5d51f2429)

commit 58cae168b5f29afda9dc7132f2770c3f58a89772
Author: Günther Deschner g...@samba.org
Date:   Fri May 6 12:53:38 2011 +0200

s3-includes: finally only include client.h when libsmb is used.

Guenther
(cherry picked from commit 675573d54b717ffc24cf3b49301ff649aecc259a)

commit 66f6359d9106872e226f08a9bbcf0917c987b84a
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Apr 13 15:13:45 2011 +1000

s3-build Remove distinct LOCALEDIR subsystem

This is no different to the rest of dynconfig, and so should be dealt
with there.

Andrew Bartlett
(cherry picked from commit d309499b9e268bff5e366a9986528f0accbc02b3)

commit 3b2fe4728d6d916508b677e696ecad88f8b7b9fd
Author: Günther Deschner g...@samba.org
Date:   Fri May 6 11:47:43 2011 +0200

s3-libsmb: move protos to libsmb/proto.h

Guenther

---

Summary of changes:
 libgpo/gpo_fetch.c |1 +
 source3/Makefile.in|9 +-
 source3/auth/auth_domain.c |1 +
 source3/auth/auth_server.c |1 +
 source3/build/dynconfig.py |1 +
 source3/build/wscript  |3 -
 source3/client/client.c|1 +
 source3/client/client_proto.h  |2 +
 source3/client/clitar.c|1 +
 source3/client/smbspool.c  |1 +
 source3/dynconfig.c|1 +
 source3/include/ads.h  |1 +
 source3/include/async_smb.h|2 +-
 source3/include/dynconfig.h|4 +
 source3/include/includes.h |3 -
 source3/include/localedir.h|6 -
 source3/include/proto.h|  819 +---
 source3/lib/netapi/cm.c|1 +
 source3/libads/ads_status.c|1 +
 source3/libads/ads_status.h|4 +
 source3/libads/kerberos_proto.h|2 +
 source3/libgpo/gpo_filesync.c  |1 +
 source3/libnet/libnet_join.c   |1 +
 source3/libsmb/async_smb.c |1 +
 source3/libsmb/cli_np_tstream.c|1 +
 source3/libsmb/cliconnect.c|1 +
 source3/libsmb/clidfs.c|1 +
 source3/libsmb/clidgram.c  |1 +
 source3/libsmb/clientgen.c |1 +
 source3/libsmb/clierror.c  |1 +
 source3/libsmb/clifile.c   |1 +
 source3/libsmb/clifsinfo.c |1 +
 source3/libsmb/clilist.c   |1 +
 source3/libsmb/climessage.c|1 +
 source3/libsmb/clioplock.c |1 +
 source3/libsmb/cliprint.c  |1 +
 source3/libsmb/cliquota.c  |1 +
 source3/libsmb/clirap.c|1 +
 source3/libsmb/clirap.h|2 +
 source3/libsmb/clirap2.c   |1 +
 source3/libsmb/clireadwrite.c  |1 +
 source3/libsmb/clisecdesc.c|1 +
 source3/libsmb/clisigning.c|1 +
 source3/libsmb/clistr.c|1 +
 source3/libsmb/clitrans.c  |1 +
 .../libnet/grouptest.h = source3/libsmb/libsmb.h  |   11 +-
 source3/libsmb/libsmb_cache.c  |1 +
 source3/libsmb/libsmb_context.c|1 +
 source3/libsmb/libsmb_dir.c|1 +
 source3/libsmb/libsmb_file.c   |1 +
 source3/libsmb/libsmb_misc.c   |1 +
 source3/libsmb/libsmb_printjob.c   |1 +
 source3/libsmb/libsmb_server.c  

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Günther Deschner
The branch, v3-6-test has been updated
   via  3275986 s3-printing: remove cups_pull_comment_location from header 
file
   via  07652a7 s3-printing: Remove obsolete and unused 
cups_pull_comment_location().
   via  3006de1 s3-spoolss: Get the printer location from cups.
   via  090b5b0 s3-printing: Get the location info from cups.
  from  68936f4 s3-includes: no need to globally include 
libads/ads_status.h.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 327598652b106e9a09bfab5d35d3534c9093356a
Author: David Disseldorp dd...@suse.de
Date:   Mon May 16 13:26:41 2011 +0200

s3-printing: remove cups_pull_comment_location from header file

Signed-off-by: Günther Deschner g...@samba.org

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon May 16 16:03:57 CEST 2011 on sn-devel-104
(cherry picked from commit 6bfe488f29a9df26f3d6dbc4166200ea286536c1)

commit 07652a7c7e55bf1e4acd3e4dd97880b8aba01596
Author: Andreas Schneider a...@samba.org
Date:   Fri May 13 10:57:33 2011 +0200

s3-printing: Remove obsolete and unused cups_pull_comment_location().

Signed-off-by: Günther Deschner g...@samba.org
(cherry picked from commit 01bc556d03a592e1f3c848d71b2e72a7cb74706f)

commit 3006de14fb3b68d2be0bae65023e9ca8e4d11ff6
Author: Andreas Schneider a...@samba.org
Date:   Fri May 13 10:28:20 2011 +0200

s3-spoolss: Get the printer location from cups.

Signed-off-by: Günther Deschner g...@samba.org
(cherry picked from commit da1fa201040b2dab89fdc99663155a1c79ad4de9)

commit 090b5b03d2c52c4fa4eeaecc4b4b815bd1948177
Author: Günther Deschner g...@samba.org
Date:   Fri May 13 10:02:42 2011 +0200

s3-printing: Get the location info from cups.

Signed-off-by: Günther Deschner g...@samba.org
(cherry picked from commit 854467851da48e02dcd8f869cb031c8943707017)

---

Summary of changes:
 librpc/idl/printcap.idl |1 +
 source3/include/proto.h |3 +-
 source3/param/loadparm.c|3 +-
 source3/printing/pcap.c |   24 ++--
 source3/printing/pcap.h |   12 +--
 source3/printing/print_aix.c|4 +-
 source3/printing/print_cups.c   |  175 +++
 source3/printing/print_iprint.c |2 +-
 source3/printing/print_standard.c   |2 +-
 source3/printing/print_svid.c   |2 +-
 source3/printing/printer_list.c |   42 +--
 source3/printing/printer_list.h |8 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c |   35 +-
 13 files changed, 118 insertions(+), 195 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/printcap.idl b/librpc/idl/printcap.idl
index 5ab380c..d9c34f3 100644
--- a/librpc/idl/printcap.idl
+++ b/librpc/idl/printcap.idl
@@ -7,6 +7,7 @@ interface printcap
typedef struct {
[charset(UTF8),string] uint8 *name;
[charset(UTF8),string] uint8 *info;
+   [charset(UTF8),string] uint8 *location;
} pcap_printer;
 
typedef [public] struct {
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d25764b..d072502 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1740,7 +1740,8 @@ bool dump_a_parameter(int snum, char *parm_name, FILE * 
f, bool isGlobal);
 struct parm_struct *lp_get_parameter(const char *param_name);
 struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
 bool lp_snum_ok(int iService);
-void lp_add_one_printer(const char *name, const char *comment, void *pdata);
+void lp_add_one_printer(const char *name, const char *comment,
+   const char *location, void *pdata);
 bool lp_loaded(void);
 void lp_killunused(bool (*snumused) (int));
 void lp_kill_all_services(void);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ca54717..73406c1 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8610,7 +8610,8 @@ static void lp_add_auto_services(char *str)
  Auto-load one printer.
 ***/
 
-void lp_add_one_printer(const char *name, const char *comment, void *pdata)
+void lp_add_one_printer(const char *name, const char *comment,
+   const char *location, void *pdata)
 {
int printers = lp_servicenumber(PRINTERS_NAME);
int i;
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index 7208f4b..62db4f5 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -43,10 +43,11 @@
 struct pcap_cache {
char *name;
char *comment;
+   char *location;
struct pcap_cache *next;
 };
 
-bool 

[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Jeremy Allison
The branch, master has been updated
   via  8cf14c2 Fix the SMB2 showstopper, found by an extended torture test 
from Volker.
   via  fe21bdc Ensure we always write the correct incoming mid into the 
share mode table entries.
  from  a032c9c s3-rpc_server: Force ncalrpc dir to be mode 755.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8cf14c21b3bc55454728bf48b23f696e15c92aea
Author: Jeremy Allison j...@samba.org
Date:   Mon May 16 12:20:14 2011 -0700

Fix the SMB2 showstopper, found by an extended torture test from Volker.

In the oplock refactoring, the algorithm underwent an unnoticed change.
In 3.5.x stat_opens were silently (i.e. no explicit code had comments
explaining this) ignored when looking for oplock breaks and share mode
violations. After the refactoring, the function find_oplock_types()
no longer ignored stat_open entries in the share mode table when looking
for batch and exclusive oplocks. This patch adds two changes to 
find_oplock_types()
to ignore the case where the incoming open request is a stat open being
tested against existing opens, and also when the incoming open request
is a non-stat open being tested against existing stat opens. Neither
of these cause an oplock break or share mode violation. Thanks a *lot*
to Volker, who persevered in reproducing this problem.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Mon May 16 22:38:20 CEST 2011 on sn-devel-104

commit fe21bdc43c0aeacfc8592998e6a90f6f83c939e0
Author: Jeremy Allison j...@samba.org
Date:   Mon May 16 10:41:51 2011 -0700

Ensure we always write the correct incoming mid into the share mode
table entries.

---

Summary of changes:
 source3/modules/onefs_open.c |6 --
 source3/smbd/open.c  |   34 +-
 2 files changed, 33 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index 6ab47d7..101dc5b 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -1310,7 +1310,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
 
-   set_share_mode(lck, fsp, get_current_uid(conn), 0,
+   set_share_mode(lck, fsp, get_current_uid(conn),
+   req ? req-mid : 0,
   fsp-oplock_type);
 
/* Handle strange delete on close create semantics. */
@@ -1666,7 +1667,8 @@ static NTSTATUS onefs_open_directory(connection_struct 
*conn,
return NT_STATUS_DELETE_PENDING;
}
 
-   set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
+   set_share_mode(lck, fsp, get_current_uid(conn),
+   req ? req-mid : 0, NO_OPLOCK);
 
/*
 * For directories the delete on close bit at open time seems
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 076ae1f..bb7e6c2 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -949,7 +949,9 @@ static NTSTATUS send_break_message(files_struct *fsp,
  * Do internal consistency checks on the share mode for a file.
  */
 
-static void find_oplock_types(struct share_mode_lock *lck,
+static void find_oplock_types(files_struct *fsp,
+   int oplock_request,
+   struct share_mode_lock *lck,
struct share_mode_entry **pp_batch,
struct share_mode_entry **pp_ex_or_batch,
bool *got_level2,
@@ -962,11 +964,27 @@ static void find_oplock_types(struct share_mode_lock *lck,
*got_level2 = false;
*got_no_oplock = false;
 
+   /* Ignore stat or internal opens, as is done in
+   delay_for_batch_oplocks() and
+   delay_for_exclusive_oplocks().
+*/
+   if ((oplock_request  INTERNAL_OPEN_ONLY) || 
is_stat_open(fsp-access_mask)) {
+   return;
+   }
+
for (i=0; ilck-num_share_modes; i++) {
if (!is_valid_share_mode_entry(lck-share_modes[i])) {
continue;
}
 
+   if (lck-share_modes[i].op_type == NO_OPLOCK 
+   is_stat_open(lck-share_modes[i].access_mask)) {
+   /* We ignore stat opens in the table - they
+  always have NO_OPLOCK and never get or
+  cause breaks. JRA. */
+   continue;
+   }
+
if (BATCH_OPLOCK_TYPE(lck-share_modes[i].op_type)) {
/* batch - can only be one. */
if (*pp_ex_or_batch || *pp_batch || *got_level2 || 
*got_no_oplock) {
@@ -1906,7 +1924,9 @@ static 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-05-16 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  a2bc1d3 Fix the SMB2 showstopper, found by an extended torture test 
from Volker.
   via  76f6eed Ensure we always write the correct incoming mid into the 
share mode table entries. (cherry picked from commit 
fe21bdc43c0aeacfc8592998e6a90f6f83c939e0)
  from  3275986 s3-printing: remove cups_pull_comment_location from header 
file

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit a2bc1d37b98a0581960039a5ff3deb55cf0c4f90
Author: Jeremy Allison j...@samba.org
Date:   Mon May 16 12:20:14 2011 -0700

Fix the SMB2 showstopper, found by an extended torture test from Volker.

In the oplock refactoring, the algorithm underwent an unnoticed change.
In 3.5.x stat_opens were silently (i.e. no explicit code had comments
explaining this) ignored when looking for oplock breaks and share mode
violations. After the refactoring, the function find_oplock_types()
no longer ignored stat_open entries in the share mode table when looking
for batch and exclusive oplocks. This patch adds two changes to 
find_oplock_types()
to ignore the case where the incoming open request is a stat open being
tested against existing opens, and also when the incoming open request
is a non-stat open being tested against existing stat opens. Neither
of these cause an oplock break or share mode violation. Thanks a *lot*
to Volker, who persevered in reproducing this problem.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Mon May 16 22:38:20 CEST 2011 on sn-devel-104
(cherry picked from commit 8cf14c21b3bc55454728bf48b23f696e15c92aea)

commit 76f6eed7068909c87f103e96e7e94e59647a7736
Author: Jeremy Allison j...@samba.org
Date:   Mon May 16 10:41:51 2011 -0700

Ensure we always write the correct incoming mid into the share mode
table entries.
(cherry picked from commit fe21bdc43c0aeacfc8592998e6a90f6f83c939e0)

---

Summary of changes:
 source3/modules/onefs_open.c |6 --
 source3/smbd/open.c  |   34 +-
 2 files changed, 33 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index 6ab47d7..101dc5b 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -1310,7 +1310,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
new_file_created = True;
}
 
-   set_share_mode(lck, fsp, get_current_uid(conn), 0,
+   set_share_mode(lck, fsp, get_current_uid(conn),
+   req ? req-mid : 0,
   fsp-oplock_type);
 
/* Handle strange delete on close create semantics. */
@@ -1666,7 +1667,8 @@ static NTSTATUS onefs_open_directory(connection_struct 
*conn,
return NT_STATUS_DELETE_PENDING;
}
 
-   set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK);
+   set_share_mode(lck, fsp, get_current_uid(conn),
+   req ? req-mid : 0, NO_OPLOCK);
 
/*
 * For directories the delete on close bit at open time seems
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 91dae4d..e537d0f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -950,7 +950,9 @@ static NTSTATUS send_break_message(files_struct *fsp,
  * Do internal consistency checks on the share mode for a file.
  */
 
-static void find_oplock_types(struct share_mode_lock *lck,
+static void find_oplock_types(files_struct *fsp,
+   int oplock_request,
+   struct share_mode_lock *lck,
struct share_mode_entry **pp_batch,
struct share_mode_entry **pp_ex_or_batch,
bool *got_level2,
@@ -963,11 +965,27 @@ static void find_oplock_types(struct share_mode_lock *lck,
*got_level2 = false;
*got_no_oplock = false;
 
+   /* Ignore stat or internal opens, as is done in
+   delay_for_batch_oplocks() and
+   delay_for_exclusive_oplocks().
+*/
+   if ((oplock_request  INTERNAL_OPEN_ONLY) || 
is_stat_open(fsp-access_mask)) {
+   return;
+   }
+
for (i=0; ilck-num_share_modes; i++) {
if (!is_valid_share_mode_entry(lck-share_modes[i])) {
continue;
}
 
+   if (lck-share_modes[i].op_type == NO_OPLOCK 
+   is_stat_open(lck-share_modes[i].access_mask)) {
+   /* We ignore stat opens in the table - they
+  always have NO_OPLOCK and never get or
+  cause breaks. JRA. */
+   continue;
+   }
+

[SCM] Samba Shared Repository - branch master updated

2011-05-16 Thread Matthieu Patou
The branch, master has been updated
   via  28598e7 s4-dfs: Use a workaround for ndr relative pointer 
bug/limitation
   via  0d2019d s4-torture: Add more tests to DFS referral suite
   via  6553940 torture: adapt to idl evolution
   via  c590c3a s4-dfs: clean the code
   via  3478e3a s4-dfs: fix bugs in idl and adapt code accordingly
   via  d24a22f s4-python: add an option for just fixing gpo folders
   via  2a5ff15 s4-python: keep wheel_gid as an integer
   via  c2ac747 s4-python: raise an error if unable to bind remote ldap 
while joining
  from  8cf14c2 Fix the SMB2 showstopper, found by an extended torture test 
from Volker.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 28598e79330f37abbb709e2b317dde9c8d6c90b5
Author: Matthieu Patou m...@matws.net
Date:   Mon May 16 20:51:20 2011 +0400

s4-dfs: Use a workaround for ndr relative pointer bug/limitation

Autobuild-User: Matthieu Patou m...@samba.org
Autobuild-Date: Tue May 17 01:33:27 CEST 2011 on sn-devel-104

commit 0d2019dcbaad7f82319c1aac1aae51ab45e77c52
Author: Matthieu Patou m...@matws.net
Date:   Sun May 15 22:17:46 2011 +0400

s4-torture: Add more tests to DFS referral suite

commit 6553940c0176298eb25bac850db55363c991cdec
Author: root root@ares.(none)
Date:   Sun May 15 16:25:15 2011 +0400

torture: adapt to idl evolution

commit c590c3a47c39aeb79a8bce502a5477b62e36bbd7
Author: Matthieu Patou m...@matws.net
Date:   Sun May 15 22:18:19 2011 +0400

s4-dfs: clean the code

commit 3478e3add376a291e4b4e3acfe92b2df22287142
Author: Matthieu Patou m...@matws.net
Date:   Sun May 15 19:56:25 2011 +0400

s4-dfs: fix bugs in idl and adapt code accordingly

commit d24a22fe9a414bf37859967848c45f2a7494193d
Author: Matthieu Patou m...@matws.net
Date:   Sun May 15 16:06:18 2011 +0400

s4-python: add an option for just fixing gpo folders

commit 2a5ff1513fe07894e0f9f8ee3ac6fd5ea87a4a6d
Author: Matthieu Patou m...@matws.net
Date:   Sun May 15 16:02:54 2011 +0400

s4-python: keep wheel_gid as an integer

commit c2ac7473f38a1e61499f6cf01ce9de19bcd3abc6
Author: Matthieu Patou m...@matws.net
Date:   Fri May 13 16:04:07 2011 +0400

s4-python: raise an error if unable to bind remote ldap while joining

---

Summary of changes:
 librpc/idl/dfsblobs.idl  |   17 +-
 source4/scripting/bin/upgradeprovision   |  385 +++---
 source4/scripting/python/samba/join.py   |   11 +
 source4/scripting/python/samba/upgradehelpers.py |2 +-
 source4/smb_server/smb/trans2.c  |  141 +
 source4/torture/dfs/domaindfs.c  |  124 +---
 source4/torture/ndr/dfsblob.c|2 +-
 7 files changed, 361 insertions(+), 321 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/dfsblobs.idl b/librpc/idl/dfsblobs.idl
index 6151c3f..7b8795d 100644
--- a/librpc/idl/dfsblobs.idl
+++ b/librpc/idl/dfsblobs.idl
@@ -53,7 +53,6 @@ interface dfsblobs
[relative_short] nstring *DFS_path;
[relative_short] nstring *DFS_alt_path;
[relative_short] nstring *netw_address;
-   /* As stated in MS DFSC 2.2.4.3.1 this array was guid but now 
MUST be 16 null bytes*/
} dfs_normal_referral;
 
typedef struct {
@@ -74,32 +73,20 @@ interface dfsblobs
} dfs_padding;
 
typedef [flag(NDR_NOALIGN)] struct {
+   uint16 size;
DFS_SERVER_TYPE server_type;
DFS_FLAGS_REFERRAL entry_flags;
uint32 ttl;
[switch_is(entry_flags  DFS_FLAG_REFERRAL_DOMAIN_RESP)] 
dfs_referral referrals;
-   } dfs_referral_v3_remaining;
-
-   typedef [flag(NDR_NOALIGN)] struct {
-   uint16 size;
-   dfs_referral_v3_remaining data;
/* this is either 0 or 16 bytes */
[switch_is(size - 18)] dfs_padding service_site_guid;
} dfs_referral_v3;
 
-   typedef struct {
-   uint16 size;
-   DFS_SERVER_TYPE server_type;
-   DFS_FLAGS_REFERRAL entry_flags;
-   uint32 ttl;
-   dfs_normal_referral r1;
-   } dfs_referral_v4;
-
typedef [nodiscriminant] union {
[case(1)] dfs_referral_v1 v1;
[case(2)] dfs_referral_v2 v2;
[case(3)] dfs_referral_v3 v3;
-   [case(4)] dfs_referral_v4 v4;
+   [case(4)] dfs_referral_v3 v4;
[default];
} dfs_referral_version;
 
diff --git a/source4/scripting/bin/upgradeprovision 
b/source4/scripting/bin/upgradeprovision
index 8c79917..4e48a48 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -151,6 +151,8 @@