[Samba] Samba 3.3.2: idmap uid or idmap gid missing -- winbindd/idmap_tdb

2009-07-14 Thread Chris Hall

I've recently upgraded to 3.3.2.  I run a small domain using tbdsam.

I am getting the following error logged in /var/log/messages:

  Jul 14 08:34:07 localhost winbindd[1727]: [2009/07/14 08:34:07,  0]
winbindd/idmap.c:idmap_alloc_init(587)
  Jul 14 08:34:07 localhost winbindd[1727]:
ERROR: Initialization failed for alloc backend, deferred!

and in /var/log/samba/log.winbindd-idmap I find a little bit more
information:

  [2009/07/14 08:34:07,  1]
winbindd/idmap_tdb.c:idmap_tdb_alloc_init(341)
idmap uid or idmap gid missing
  [2009/07/14 08:34:07,  0] winbindd/idmap.c:idmap_alloc_init(587)
ERROR: Initialization failed for alloc backend, deferred!

Every 30 minutes or so there seems to be a burst of activity, and these
messages appear in clusters of about six.

I see from the Release Notes that things have changed in this area.  I
now have the following in smb.conf:

  passdb backend= tdbsam:/var/lib/samba/private/passdb.tdb

  idmap backend = tdb
  idmap alloc backend   = tdb
  idmap uid = 1-1
  idmap gid = 1-1

What am I missing, please ?

I've tried setting the log level to 5, but no further information
emerges.

-
--

FWIW, I note also that getent passwd does not show me any DOMAIN\foo
entries.  Nor does getent group.

Thanks,

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


[Samba] Winbind, nscd, solaris 10, nscd.conf, group, passwd

2009-07-14 Thread Pierre B.
Hello,

we're using Samba 3.0.28 on big sun hardware with solaris 10, and an connction
to an 3 dc windows domain with winbind.

I've found some entries that for using samba with winbind the nscd must be
turned off. But in detail I found descriptions, winbind caches only passwd and
group entries, which are in nsswitch.conf configured.

In fact of solaris 10 nscd, the nscd is fine gradulary configurable via
/etc/nscd.conf; including turned of caching for some of the services,
e.g. passwd and group.

It there another hint why nscd must still turned off?

Or will samba work with turned off passwd and groups in nscd.conf as we switch
off the whole nscd?

We know by tests that we have many other srvice requests which are cached in
nscd, too(e.g.nameservice)

This is a base question. If any need an example configuration I can check that.

MfG...
Pierre B.

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


Re: [Samba] Samba on RHEL issue

2009-07-14 Thread Linux Addict
On Mon, Jul 13, 2009 at 6:00 PM, Shuaib Ilyas (shilyas)
shil...@cisco.comwrote:

 Hi Jonathon,
 Thanks for looking into it.

 The log messages are as follows:

 [r...@usps-dc1-pc12 samba]#
 [r...@usps-dc1-pc12 samba]#
 [r...@usps-dc1-pc12 samba]# tail smbd.log
  bind failed on port 445 socket_addr = 0.0.0.0.
  Error = Address already in use
 [2009/07/13 14:38:00, 0] smbd/server.c:main(944)
  smbd version 3.0.33-3.7.el5_3.1 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
 [2009/07/13 14:38:00, 1] param/loadparm.c:service_ok(3038)
  NOTE: Service printers is flagged unavailable.
 [2009/07/13 14:38:00, 0] lib/util_sock.c:open_socket_in(822)
  bind failed on port 445 socket_addr = 0.0.0.0.
  Error = Address already in use
 [r...@usps-dc1-pc12 samba]#


 The output of testparm to check the config smb.conf is a s follows:

 r...@usps-dc1-pc12 samba]# testparm /etc/samba/smb.conf
 Load smb config files from /etc/samba/smb.conf
 Processing section [homes]
 Processing section [printers]
 NOTE: Service printers is flagged unavailable.
 Loaded services file OK.
 Server role: ROLE_STANDALONE
 Press enter to see a dump of your service definitions

 [global]
workgroup = WRKGRP
netbios name = SMBSERVER
security = SHARE
default service = global
path = /home
cups options = raw
available = No

 [homes]
comment = Home Directories
path = /home/share
valid users = smbuser
admin users = smbuser
force user = root
read only = No
guest ok = Yes
browseable = No
available = Yes

 [printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
 [r...@usps-dc1-pc12 samba]#
 [r...@usps-dc1-pc12 samba]#

 Any ideas?



 -Original Message-
 From: samba-bounces+shilyas=cisco@lists.samba.org
 [mailto:samba-bounces+shilyas samba-bounces%2Bshilyas=cisco.com@
 lists.samba.org] On Behalf Of
 Jonathon Doran
 Sent: Monday, July 13, 2009 1:23 PM
 To: samba@lists.samba.org
 Subject: Re: [Samba] Samba on RHEL issue

  Quoting Shuaib Ilyas (shilyas) shil...@cisco.com:


  I am trying to install samba on the RHEL. The installation completes
 but
  after that I get the smbd dead message upon checking the status:

 What does the samba logfile say about this?  On Fedora (which should
 have
 the same layout as RHEL), the samba logfile is in
 /var/log/samba/log.smbd

 Have you ran testparm to check smb.conf?
 --
 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




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


Re: [Samba] winbindd: Exceeding 200 client connections, no idle connection found

2009-07-14 Thread Rene

Jeremy Allison schrieb:

On Mon, Jul 13, 2009 at 11:53:15AM -0400, Linux Addict wrote:

On Sun, Mar 22, 2009 at 3:37 PM, Elvar el...@elvar.org wrote:



Elder Souza wrote:


No prob Jeremy, thanx for your help!

Elder Souza
(71) 9972-7573 / (71) 8801-5734


On Tue, Oct 21, 2008 at 5:47 PM, Jeremy Allison j...@samba.org wrote:




On Tue, Oct 21, 2008 at 05:44:05PM -0300, Elder Souza wrote:



It has been fixed after what version? Do you know?



Don't have the time to check the release
notes right now, but it's definately fixed
in 3.0.32 and 3.2.4.

Jeremy.




I just downloaded version 3.0.33 and when I view the local.h file I still
see 200 defined as the max simultaneous connections. Is it really fixed?
Some of my installations require more than 200 simultaneous connections. I'm
still using an older version but until I modified this to 400+ I had
problems.

/* Max number of simultaneous winbindd socket connections. */
#define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200





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




I am using  3.2.4 but I still get this messages. I had many production
servers hit 100% CPU due to winbind. I had to stop winbind 3 times through
rc script to stop winbind.

I didn't have verbose log enabled, but I would go straight and upgrade if
you guys think this is resolved in latest versions.


Ah. My statement that this was fixed in 3.2.4 was wrong, sorry
about that.

I've checked back in the release notes and the fix for this
bug (3204) was discovered by Richard Sharpe in Jan 2009,
and 3.2.4 dates from 18 September 2008.

The fix went into the 3.2 tree on 2009-01-08, and so
it will have been fixed on the 03 February 2009 release
Samba 3.2.8 and above. Sorry for the mistake in claiming
it was fixed in 3.2.4.

Jeremy.



Hi there,

got the same problem on a Samba 3.3.1 installation.

winbindd log is filling up faster than logrotate is able to clean it, 
and my machine finally ends up with a full partition.


Searched the Web now half the day and found that it should be solved in 
3.2.8. Is there any other known Issue how this behavior can occur?



René




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


Re: [Samba] winbindd: Exceeding 200 client connections, no idle connection found

2009-07-14 Thread John H Terpstra - Samba Team
Rene wrote:
 Jeremy Allison schrieb:
 On Mon, Jul 13, 2009 at 11:53:15AM -0400, Linux Addict wrote:
 On Sun, Mar 22, 2009 at 3:37 PM, Elvar el...@elvar.org wrote:


 Elder Souza wrote:

 No prob Jeremy, thanx for your help!

 Elder Souza
 (71) 9972-7573 / (71) 8801-5734


 On Tue, Oct 21, 2008 at 5:47 PM, Jeremy Allison j...@samba.org wrote:



 On Tue, Oct 21, 2008 at 05:44:05PM -0300, Elder Souza wrote:


 It has been fixed after what version? Do you know?


 Don't have the time to check the release
 notes right now, but it's definately fixed
 in 3.0.32 and 3.2.4.

 Jeremy.



 I just downloaded version 3.0.33 and when I view the local.h file I
 still
 see 200 defined as the max simultaneous connections. Is it really
 fixed?
 Some of my installations require more than 200 simultaneous
 connections. I'm
 still using an older version but until I modified this to 400+ I had
 problems.

 /* Max number of simultaneous winbindd socket connections. */
 #define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200





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



 I am using  3.2.4 but I still get this messages. I had many production
 servers hit 100% CPU due to winbind. I had to stop winbind 3 times
 through
 rc script to stop winbind.

 I didn't have verbose log enabled, but I would go straight and
 upgrade if
 you guys think this is resolved in latest versions.

 Ah. My statement that this was fixed in 3.2.4 was wrong, sorry
 about that.

 I've checked back in the release notes and the fix for this
 bug (3204) was discovered by Richard Sharpe in Jan 2009,
 and 3.2.4 dates from 18 September 2008.

 The fix went into the 3.2 tree on 2009-01-08, and so
 it will have been fixed on the 03 February 2009 release
 Samba 3.2.8 and above. Sorry for the mistake in claiming
 it was fixed in 3.2.4.

 Jeremy.
 
 
 Hi there,
 
 got the same problem on a Samba 3.3.1 installation.
 
 winbindd log is filling up faster than logrotate is able to clean it,
 and my machine finally ends up with a full partition.
 
 Searched the Web now half the day and found that it should be solved in
 3.2.8. Is there any other known Issue how this behavior can occur?
 
 
 René

The same problem was experienced in a 4200 user site with 3.3.2 but has
not happened since 3.3.4 went in.

The problem first occurred with 3.0.30, also with 3.2.3, then moved to
3.3.2, and in each case was highly intermittent and we could not get a
lock on what was causing it because it was always a sudden-death problem
that blew up the /var/log/samba file system.  At its worst the problem
ate up 72GB of storage in a matter of minutes.  Also, only one server
out of a dozen was ever affected.  This makes the matter highly
suspicious.

I would suggest moving to 3.3.4 or later, but do not rule out that you
may have a platform integrity problem. Perhaps one of the library files
is damaged.

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


[Samba] map untrusted to domain parameter in 3.4.0

2009-07-14 Thread Marc Muehlfeld

Hello,

in 3.4.0 I saw the new parameter map untrusted to domain and read the 
manpage entry about it.


Do I have to set this parameter to yes on all my member servers now or is 
there way to have connections from workstations to member servers to be 
DOMAIN\user directly?


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


[Samba] New samba server

2009-07-14 Thread sgmayo
I did not get this finished last summer, so decided to just wait and do it
this summer.  I have setup my new samba server and was trying to get some
things tweaked to the way that I want them.  I thought that I had asked
this before and that I could do it, but it seems that it does not work.

My new server is running as a domain server just like the old.  It has the
same domain name and I change the the SID using net setlocalsid to the
same sid number as my old server.  This new server is in a test
environment right now.

I was hoping that my old machines could just log into this server without
having to get out of the domain and then rejoin it, but that does not
work.  It tells me that the domain is not there until I get out of the old
one and then rejoin the new one.  Is that how it has to work?  I was
hoping I would not have to do that if I left the domain name the same and
set the SID on the new server.  I just want to make sure I am not missing
something before I go around to all 400 computers on campus and have them
removed and rejoined to the domain.

Thanks.


-- 
Scott Mayo - System Administrator
Bloomfield Schools
PH: 573-568-5669  FA: 573-568-4565

Question: Because it reverses the logical flow of conversation.
Answer: Why is putting a reply at the top of the message frowned upon?

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


Re: [Samba] New samba server

2009-07-14 Thread sgmayo

sgm...@mail.bloomfield.k12.mo.us wrote:
 I did not get this finished last summer, so decided to just wait and do it
 this summer.  I have setup my new samba server and was trying to get some
 things tweaked to the way that I want them.  I thought that I had asked
 this before and that I could do it, but it seems that it does not work.

 My new server is running as a domain server just like the old.  It has the
 same domain name and I change the the SID using net setlocalsid to the
 same sid number as my old server.  This new server is in a test
 environment right now.

 I was hoping that my old machines could just log into this server without
 having to get out of the domain and then rejoin it, but that does not
 work.  It tells me that the domain is not there until I get out of the old
 one and then rejoin the new one.  Is that how it has to work?  I was
 hoping I would not have to do that if I left the domain name the same and
 set the SID on the new server.  I just want to make sure I am not missing
 something before I go around to all 400 computers on campus and have them
 removed and rejoined to the domain.

Mr. Terpstra gave me a bit of help.  I had done nothing to set my
domainsid, but after doing the following:

net getlocalsid
net getdomainsid

The values are the same on both the old and the new samba server.  This
new server will take the place of my old one.  Right now it is on a
network with nothing else on it besides one of my old windows clients.  If
I remove one of my old clients from the domain and then re-add it, then it
logs in just fine.  If I take an old client from my current network and
put it on this new network and try to login to the new samba server then
it gives me the typical:

Windows cannot connect to the domain either because the domain controller
is down or otherwise unavailable, or because your computer account was not
found. Please try again later. If this message continues to appear contact
your System Administrator for assistance.

The name of the Windows machine is business18 so I did an 'smbldap-adduser
-w business18$' to make sure the machine account was added in to the
directory, but the error was the same.  I even changed the uid of the
machine account to match the old one in case that was coming into play.

Here is my samba config in case someone sees something that I don't. 
Which is quite possible since I forget more than I learn it seems. :) 
I'll be reading on the How-To to see if I can pick anything else up.

[global]
workgroup = BES
server string = Samba Server Version %v
netbios name = SCHOOL

interfaces = lo eth0
hosts allow = 127. 10.0. 19 2.168.0. localhost
ldap passwd sync = Yes
ldap admin dn = cn=Manager,dc=school,dc=bloomfield.k12.mo.us
ldap suffix = dc=school1,dc=bloomfield.k12.mo.us
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Computers
ldap idmap suffix = ou=Users
add machine script = /usr/sbin/smbldap-useradd -w %u
add user script = /usr/sbin/smbldap-useradd -m %u
ldap delete dn = Yes
add group script = /usr/sbin/smbldap-groupadd -p %g
add user to group script = /usr/sbin/smbldap-groupmod -m %u %g
delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g
set primary group script = /usr/sbin/smbldap-usermod -g %g %u

Dos charset = 850
Unix charset = ISO8859-1


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

security = user
passdb backend = ldapsam:ldap://127.0.0.1

domain master = yes
domain logons = yes

local master = yes
os level = 65
preferred master = yes

wins support = yes
dns proxy = no

load printers = yes
cups options = raw

[homes]
comment = Home Directories
browseable = no
writable = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes


-- 
Scott Mayo - System Administrator
Bloomfield Schools
PH: 573-568-5669  FA: 573-568-4565

Question: Because it reverses the logical flow of conversation.
Answer: Why is putting a reply at the top of the message frowned upon?

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


Re: [Samba] Samba on RHEL issue

2009-07-14 Thread Shuaib Ilyas (shilyas)
Hi,

 

Here is the setting:

 

[r...@usps-dc1-pc12 share]# getenforce

Disabled

[r...@usps-dc1-pc12 share]# 

 

Is this correct?

 

Thanks,

 

Shuaib

 

 

 

 

From: Linux Addict [mailto:linuxaddi...@gmail.com] 
Sent: Tuesday, July 14, 2009 6:29 AM
To: Shuaib Ilyas (shilyas)
Cc: Jonathon Doran; samba@lists.samba.org
Subject: Re: [Samba] Samba on RHEL issue

 

 

On Mon, Jul 13, 2009 at 6:00 PM, Shuaib Ilyas (shilyas)
shil...@cisco.com wrote:

Hi Jonathon,
Thanks for looking into it.

The log messages are as follows:


[r...@usps-dc1-pc12 samba]#

[r...@usps-dc1-pc12 samba]#

[r...@usps-dc1-pc12 samba]# tail smbd.log
 bind failed on port 445 socket_addr = 0.0.0.0.
 Error = Address already in use
[2009/07/13 14:38:00, 0] smbd/server.c:main(944)
 smbd version 3.0.33-3.7.el5_3.1 started.
 Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/07/13 14:38:00, 1] param/loadparm.c:service_ok(3038)
 NOTE: Service printers is flagged unavailable.
[2009/07/13 14:38:00, 0] lib/util_sock.c:open_socket_in(822)
 bind failed on port 445 socket_addr = 0.0.0.0.
 Error = Address already in use

[r...@usps-dc1-pc12 samba]#



The output of testparm to check the config smb.conf is a s follows:

r...@usps-dc1-pc12 samba]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section [homes]
Processing section [printers]
NOTE: Service printers is flagged unavailable.
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
   workgroup = WRKGRP
   netbios name = SMBSERVER
   security = SHARE
   default service = global
   path = /home
   cups options = raw
   available = No

[homes]
   comment = Home Directories
   path = /home/share
   valid users = smbuser
   admin users = smbuser
   force user = root
   read only = No
   guest ok = Yes
   browseable = No
   available = Yes

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

[r...@usps-dc1-pc12 samba]#
[r...@usps-dc1-pc12 samba]#

Any ideas?




-Original Message-
From: samba-bounces+shilyas=cisco.com http://cisco.com/
@lists.samba.org http://lists.samba.org/ 
[mailto:samba-bounces+shilyas mailto:samba-bounces%2Bshilyas
=cisco.com http://cisco.com/ @lists.samba.org
http://lists.samba.org/ ] On Behalf Of
Jonathon Doran
Sent: Monday, July 13, 2009 1:23 PM
To: samba@lists.samba.org
Subject: Re: [Samba] Samba on RHEL issue

Quoting Shuaib Ilyas (shilyas) shil...@cisco.com:


 I am trying to install samba on the RHEL. The installation completes
but
 after that I get the smbd dead message upon checking the status:

What does the samba logfile say about this?  On Fedora (which should
have
the same layout as RHEL), the samba logfile is in
/var/log/samba/log.smbd

Have you ran testparm to check smb.conf?
--
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


 

 

Check if the selinux is disabled..

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


Re: [Samba] Samba on RHEL issue

2009-07-14 Thread Frank Murphy
On 14/07/09 19:02, Shuaib Ilyas (shilyas) wrote:
 Hi,
 
  
 
 Here is the setting:
 
  
 
 [r...@usps-dc1-pc12 share]# getenforce
 
 Disabled
 
 [r...@usps-dc1-pc12 share]# 
 
  
 
 Is this correct?
 
  
 
 Thanks,
 
  
 
 Shuaib
 


su setenforce 0


Regards,

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


Re: [Samba] Samba on RHEL issue

2009-07-14 Thread Jonathon Doran

Quoting Frank Murphy frankl...@gmail.com:


su setenforce 0


For the benefit of others, under Fedora I edit /etc/sysconfig/selinux  
to turn this off.


Please recognize the risks you may be adding to your network by  
disabling selinux.  For some people, this is an acceptable situation  
(me for one), but in other environments this could be a bad thing.


I think it is often advisable to try temporarily selinux and/or  
iptables in an environment where things aren't working properly.  This  
can be done for a short period of time, so the risk of compromise is  
lessened.  Knowing that one of these two products is behind your  
troubles is well worth the risk, in my opinion.


I have spent considerable time on a new Fedora 11 install tweaking iptables.

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


Re: [Samba] Samba on RHEL issue

2009-07-14 Thread Frank Murphy
On 14/07/09 20:01, Jonathon Doran wrote:
 Quoting Frank Murphy frankl...@gmail.com:
 
 su setenforce 0
 
 For the benefit of others, under Fedora I edit /etc/sysconfig/selinux to
 turn this off.
 

On Fedora it's just as easy to do setenforce 0\1 as the case may be.
No conf editing required.

Ckeck:
https://www.redhat.com/mailman/listinfo/fedora-selinux-list

fedora is also pretty good at answering CentOS\RHEL Q's


Regards,

Frank


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


Re: [Samba] New samba server

2009-07-14 Thread Ryan Bair
Have you migrated the user data to the new ldap server? Unless Samba
knows about the users, they won't be able to log in.

On Tue, Jul 14, 2009 at 1:28 PM, sgm...@mail.bloomfield.k12.mo.us wrote:

 sgm...@mail.bloomfield.k12.mo.us wrote:
 I did not get this finished last summer, so decided to just wait and do it
 this summer.  I have setup my new samba server and was trying to get some
 things tweaked to the way that I want them.  I thought that I had asked
 this before and that I could do it, but it seems that it does not work.

 My new server is running as a domain server just like the old.  It has the
 same domain name and I change the the SID using net setlocalsid to the
 same sid number as my old server.  This new server is in a test
 environment right now.

 I was hoping that my old machines could just log into this server without
 having to get out of the domain and then rejoin it, but that does not
 work.  It tells me that the domain is not there until I get out of the old
 one and then rejoin the new one.  Is that how it has to work?  I was
 hoping I would not have to do that if I left the domain name the same and
 set the SID on the new server.  I just want to make sure I am not missing
 something before I go around to all 400 computers on campus and have them
 removed and rejoined to the domain.

 Mr. Terpstra gave me a bit of help.  I had done nothing to set my
 domainsid, but after doing the following:

 net getlocalsid
 net getdomainsid

 The values are the same on both the old and the new samba server.  This
 new server will take the place of my old one.  Right now it is on a
 network with nothing else on it besides one of my old windows clients.  If
 I remove one of my old clients from the domain and then re-add it, then it
 logs in just fine.  If I take an old client from my current network and
 put it on this new network and try to login to the new samba server then
 it gives me the typical:

 Windows cannot connect to the domain either because the domain controller
 is down or otherwise unavailable, or because your computer account was not
 found. Please try again later. If this message continues to appear contact
 your System Administrator for assistance.

 The name of the Windows machine is business18 so I did an 'smbldap-adduser
 -w business18$' to make sure the machine account was added in to the
 directory, but the error was the same.  I even changed the uid of the
 machine account to match the old one in case that was coming into play.

 Here is my samba config in case someone sees something that I don't.
 Which is quite possible since I forget more than I learn it seems. :)
 I'll be reading on the How-To to see if I can pick anything else up.

 [global]
        workgroup = BES
        server string = Samba Server Version %v
        netbios name = SCHOOL

        interfaces = lo eth0
        hosts allow = 127. 10.0. 19 2.168.0. localhost
        ldap passwd sync = Yes
        ldap admin dn = cn=Manager,dc=school,dc=bloomfield.k12.mo.us
        ldap suffix = dc=school1,dc=bloomfield.k12.mo.us
        ldap group suffix = ou=Groups
        ldap user suffix = ou=Users
        ldap machine suffix = ou=Computers
        ldap idmap suffix = ou=Users
        add machine script = /usr/sbin/smbldap-useradd -w %u
        add user script = /usr/sbin/smbldap-useradd -m %u
        ldap delete dn = Yes
        add group script = /usr/sbin/smbldap-groupadd -p %g
        add user to group script = /usr/sbin/smbldap-groupmod -m %u %g
        delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g
        set primary group script = /usr/sbin/smbldap-usermod -g %g %u

        Dos charset = 850
        Unix charset = ISO8859-1


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

        security = user
        passdb backend = ldapsam:ldap://127.0.0.1

        domain master = yes
        domain logons = yes

        local master = yes
        os level = 65
        preferred master = yes

        wins support = yes
        dns proxy = no

        load printers = yes
        cups options = raw

 [homes]
        comment = Home Directories
        browseable = no
        writable = yes

 [printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes


 --
 Scott Mayo - System Administrator
 Bloomfield Schools
 PH: 573-568-5669  FA: 573-568-4565

 Question: Because it reverses the logical flow of conversation.
 Answer: Why is putting a reply at the top of the message frowned upon?

 --
 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] Samba on RHEL issue

2009-07-14 Thread Linux Addict
On Tue, Jul 14, 2009 at 4:00 PM, Frank Murphy frankl...@gmail.com wrote:

 On 14/07/09 20:01, Jonathon Doran wrote:
  Quoting Frank Murphy frankl...@gmail.com:
 
  su setenforce 0
 
  For the benefit of others, under Fedora I edit /etc/sysconfig/selinux to
  turn this off.
 

 On Fedora it's just as easy to do setenforce 0\1 as the case may be.
 No conf editing required.

 Ckeck:
 https://www.redhat.com/mailman/listinfo/fedora-selinux-list

 fedora is also pretty good at answering CentOS\RHEL Q's


 Regards,

 Frank


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




Looks like selinux is disabled.

Lets try this.


Stop the smbd and winbind

/etc/init.d/smbd stop
/etc/init.d/winbind stop

Update the smb.conf with log level = 10 and Start the smbd on Interactive
mode.

smbd -i


Observer the log it generates and attach it on a file .  The last line must
be waiting for a connection.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] shared drives are getting disconnected after some time

2009-07-14 Thread Linux Addict
On Tue, Jul 14, 2009 at 12:54 AM, Nitin Bhadauria 
nitin.bhadau...@tetrain.com wrote:

 Dear All,

 I am using samba 3.0.33-3.7.el5 with openldap for centralized
 authentication and Nfs mount partition for storage drives.

 Now the user who logged in the domain and using a shared drive, if they
 stay ideal for approx 30min.
 The drive get disconnected and when they try to open it 2-3 times it
 start working again.

 Please revert if any buddy else has faced the same problem.

 Regards,
 Nitin

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




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


Re: [Samba] New samba server

2009-07-14 Thread sgmayo
Ryan Bair wrote:
 Have you migrated the user data to the new ldap server? Unless Samba
knows about the users, they won't be able to log in.

No.  I was wanting to start off clean.  I have a perl script that I wrote
that will add the users in at one time.  I just created one user and one
machine account right now to test with.

Mr. Terpstra suggested using slapcat and slapadd.  I could do that, but I
am actually planning on changing usernames.  I use to truncate them at 8
characters, but I plan on quitting that.  I am going with
firstinitial.lastname.  I'll look at slapcat.  Maybe I can just export the
machines and not the users.

I am still a bit stumped on why this does not work though if I have added
the machine into the ldap directory.  Does Windows actually store some
information about the domain also that could be causing the problem?

I have a feeling that this upgrade is going to be a pain in the butt when
the teachers get back.  Especially with the name changes, because that
means when they login, a new profile is going to be created and all of
their documents will be in the other profile.  I have warned and warned
them to keep things backed up, and not just leave them on the computer
so...


-- 
Scott Mayo - System Administrator
Bloomfield Schools
PH: 573-568-5669  FA: 573-568-4565

Question: Because it reverses the logical flow of conversation.
Answer: Why is putting a reply at the top of the message frowned upon?




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


[Samba] Samba users can still login after password change

2009-07-14 Thread David Christensen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anyone know why a user can still use their old password to login to a
samba domain when the sambaNTPassword and sambaLMPassword that are
stored in the ldap backend have been changed?

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkpdASAACgkQ5B+8XEnAvqsTtgCdGDWklq0MefW7lPZZm5pNmQGG
klgAoIEQOsfHexkzG5RMxIA6U32vW7zj
=a2EB
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] two rules for [homes]?

2009-07-14 Thread Todd Chester
Hi All,

I have a situation where I want users in one group to use one set of rules
for [homes] and another set of users in a different group to a different set
of rules for [homes].  Is this possible (and how)?

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


Re: [Samba] two rules for [homes]?

2009-07-14 Thread Todd Chester
On Tue, Jul 14, 2009 at 5:17 PM, Nick Pappin npap...@latahfcu.org wrote:

 You could get creative with includes and make something unique about the
 two groups of people.

 --
 W. Nick Pappin


 On Tue, Jul 14, 2009 at 4:58 PM, Todd Chester margoandt...@gmail.comwrote:

 Hi All,

 I have a situation where I want users in one group to use one set of rules
 for [homes] and another set of users in a different group to a different
 set
 of rules for [homes].  Is this possible (and how)?

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



Hi Nick,

I am not finding anything in man smb.conf for includes.  What do you
mean?

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


[Samba] ftp.samba.org still have old version

2009-07-14 Thread OPC oota
ftp://ftp.samba.org (and rsync) have version 3.3.5 and
not appear 3.3.6 and 3.4.0.  it still old.

Why?

--
--- Oota Toshiya ---  t-oota at dh.jp.nec.com
NEC Computers Software Operations Unit  Shiba,Minato,Tokyo
Open Source Software Platform Development Division  Japan,Earth,Solar system
(samba-jp/ldap-jp Staff,mutt-j/samba-jp postmaster)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] two rules for [homes]?

2009-07-14 Thread Tim Bates

Todd Chester wrote:

Hi All,

I have a situation where I want users in one group to use one set of rules
for [homes] and another set of users in a different group to a different set
of rules for [homes].  Is this possible (and how)?



Sure is possible. I do this at the school I work for so that staff and 
student homes get different settings.


I did it by removing the entire [homes] section from the normal 
config, and creating 2 new files containing only this section. One is 
called homes-staff.conf and the other homes-students.conf. Using the 
following line, I then include the correct one for the logged in user:

include = /etc/samba/homes-%G.conf

The %G is replaced by the primary group of the user who is connected.

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


Re: [Samba] Samba users can still login after password change

2009-07-14 Thread Norberto Bensa
On Tue, Jul 14, 2009 at 7:05 PM, David
Christensendavid.christen...@viveli.com wrote:
 Anyone know why a user can still use their old password to login to a
 samba domain when the sambaNTPassword and sambaLMPassword that are
 stored in the ldap backend have been changed?

Weird theory here:

clients lost connection with logon server, so they use the cached
password (the old one)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Build status as of Tue Jul 14 06:00:01 2009

2009-07-14 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-07-13 
22:30:48.0 -0600
+++ /home/build/master/cache/broken_results.txt 2009-07-14 00:00:02.0 
-0600
@@ -1,4 +1,4 @@
-Build status as of Tue Jul 14 04:30:45 2009
+Build status as of Tue Jul 14 06:00:01 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -16,7 +16,7 @@
 samba_3_current 30 16 0 
 samba_3_master 32 26 5 
 samba_3_next 32 29 1 
-samba_4_0_test 32 29 11
+samba_4_0_test 32 29 10
 talloc   33 33 0 
 tdb  31 31 0 
 


[SCM] CTDB repository - branch 1.0.82 updated - ctdb-1.0.82-11-g2c81311

2009-07-14 Thread Ronnie Sahlberg
The branch, 1.0.82 has been updated
   via  2c81311d3a7e1ce7ea6008a3f9a90dca00fee8d2 (commit)
   via  f434f09f09bce30794c9429be8f619fecd24a6e1 (commit)
  from  8ada39306af1f1fdfe122dd0fc6d041aa6acf1c0 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.82


- Log -
commit 2c81311d3a7e1ce7ea6008a3f9a90dca00fee8d2
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 14 10:54:05 2009 +1000

new version 1.0.82-6

commit f434f09f09bce30794c9429be8f619fecd24a6e1
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue May 19 08:55:42 2009 +1000

Change the loglevel of registered tcp client for ... to INFO
instead of ERR

---

Summary of changes:
 packaging/RPM/ctdb.spec |4 +++-
 server/ctdb_takeover.c  |4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index f2f6c2f..7ddf414 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.82
-Release: 5
+Release: 6
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -132,6 +132,8 @@ fi
 %{_libdir}/pkgconfig/ctdb.pc
 
 %changelog
+* Tue Jul 14 2009 : Version 1.0.82-6
+ - change loglevel for registering tcp clients
 * Wed Jun 10 2009 : Version 1.0.82-5
  - When banning a node, only drop all ips on the node being banned, not all 
nodes.
 * Tue Jun 9 2009 : Version 1.0.82-4
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 4b32c6e..29c0ee6 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -1118,13 +1118,13 @@ int32_t ctdb_control_tcp_client(struct ctdb_context 
*ctdb, uint32_t client_id,
 
switch (addr.sa.sa_family) {
case AF_INET:
-   DEBUG(DEBUG_ERR,(registered tcp client for %u-%s:%u 
(client_id %u pid %u)\n,
+   DEBUG(DEBUG_INFO,(registered tcp client for %u-%s:%u 
(client_id %u pid %u)\n,
(unsigned)ntohs(tcp_sock-dest.ip.sin_port), 
ctdb_addr_to_str(tcp_sock-src),
(unsigned)ntohs(tcp_sock-src.ip.sin_port), client_id, 
client-pid));
break;
case AF_INET6:
-   DEBUG(DEBUG_ERR,(registered tcp client for %u-%s:%u 
(client_id %u pid %u)\n,
+   DEBUG(DEBUG_INFO,(registered tcp client for %u-%s:%u 
(client_id %u pid %u)\n,
(unsigned)ntohs(tcp_sock-dest.ip6.sin6_port), 
ctdb_addr_to_str(tcp_sock-src),
(unsigned)ntohs(tcp_sock-src.ip6.sin6_port), 
client_id, client-pid));


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-326-gbd58a14

2009-07-14 Thread Volker Lendecke
The branch, master has been updated
   via  bd58a1461724eb92c9fedd014edb7465f5a16b40 (commit)
  from  e67de63ba6c6de60400e7deb4664d259f6dfb638 (commit)

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


- Log -
commit bd58a1461724eb92c9fedd014edb7465f5a16b40
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Thu Jul 9 14:45:23 2009 +0200

reject ACLs with DESC_DACL_PROTECTED on GPFS

as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would 
be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is 
currently silently ignored by Samba. That means that if you deselect the Allow 
inheritable permissions... checkbox in Windows' ACL dialog and then apply the 
ACL, the flag will be back immediately.

To make sure that automatic migration with e.g. robocopy does not lead to 
ACLs silently (and unintentionally) changed, this patch adds an explicit check 
for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are 
shown up on the Windows side and the Administrator is aware of the ACLs not 
being settable like intended

Signed-off-by: Christian Ambach christian.amb...@de.ibm.com

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 47858cb..ffa8db0 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -445,6 +445,11 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(files_struct 
*fsp, uint32 security_i
 
if (acl-acl_versionGPFS_ACL_VERSION_NFS4)
{
+   if ((psd-typeSEC_DESC_DACL_PROTECTED)) {
+   DEBUG(2, (Rejecting unsupported ACL with 
DACL_PROTECTED bit set\n));
+   return NT_STATUS_NOT_SUPPORTED;
+   }
+
result = smb_set_nt_acl_nfs4(
fsp, security_info_sent, psd,
gpfsacl_process_smbacl);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-329-g39fa946

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  39fa9468c6b8099429b971d75c0647033b60901c (commit)
   via  d7c366f8de13ce6f2cf691b95974a18e21d0fff7 (commit)
   via  05959636328ae71b1969a85241a93883f20bcb69 (commit)
  from  bd58a1461724eb92c9fedd014edb7465f5a16b40 (commit)

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


- Log -
commit 39fa9468c6b8099429b971d75c0647033b60901c
Author: Günther Deschner g...@samba.org
Date:   Mon Jul 13 23:42:57 2009 +0200

s3-account_policy: remove trailing whitespace.

Guenther

commit d7c366f8de13ce6f2cf691b95974a18e21d0fff7
Author: Günther Deschner g...@samba.org
Date:   Mon Jul 13 23:38:16 2009 +0200

s3: re-run make idl.

Guenther

commit 05959636328ae71b1969a85241a93883f20bcb69
Author: Günther Deschner g...@samba.org
Date:   Mon Jul 13 22:46:51 2009 +0200

samr: add missing samr_ValidationStatus codes.

Guenther

---

Summary of changes:
 librpc/gen_ndr/ndr_samr.c |2 +
 librpc/gen_ndr/samr.h |6 +++-
 librpc/idl/samr.idl   |4 ++-
 source3/lib/account_pol.c |   64 ++--
 4 files changed, 42 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c
index 58b7ae2..258aba9 100644
--- a/librpc/gen_ndr/ndr_samr.c
+++ b/librpc/gen_ndr/ndr_samr.c
@@ -4831,12 +4831,14 @@ _PUBLIC_ void ndr_print_samr_ValidationStatus(struct 
ndr_print *ndr, const char
case SAMR_VALIDATION_STATUS_SUCCESS: val = 
SAMR_VALIDATION_STATUS_SUCCESS; break;
case SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE: val = 
SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE; break;
case SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT: val = 
SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT; break;
+   case SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED: val = 
SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED; break;
case SAMR_VALIDATION_STATUS_BAD_PASSWORD: val = 
SAMR_VALIDATION_STATUS_BAD_PASSWORD; break;
case SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT: val = 
SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT; break;
case SAMR_VALIDATION_STATUS_PWD_TOO_SHORT: val = 
SAMR_VALIDATION_STATUS_PWD_TOO_SHORT; break;
case SAMR_VALIDATION_STATUS_PWD_TOO_LONG: val = 
SAMR_VALIDATION_STATUS_PWD_TOO_LONG; break;
case SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH: val = 
SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH; break;
case SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT: val = 
SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT; break;
+   case SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR: val = 
SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR; break;
}
ndr_print_enum(ndr, name, ENUM, val, r);
 }
diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h
index e44de1b..ce84b45 100644
--- a/librpc/gen_ndr/samr.h
+++ b/librpc/gen_ndr/samr.h
@@ -834,24 +834,28 @@ enum samr_ValidationStatus
SAMR_VALIDATION_STATUS_SUCCESS=0,
SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1,
SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2,
+   SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED=3,
SAMR_VALIDATION_STATUS_BAD_PASSWORD=4,
SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5,
SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6,
SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7,
SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8,
-   SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9
+   SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9,
+   SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR=10
 }
 #else
  { __donnot_use_enum_samr_ValidationStatus=0x7FFF}
 #define SAMR_VALIDATION_STATUS_SUCCESS ( 0 )
 #define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 )
 #define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 )
+#define SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED ( 3 )
 #define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 )
 #define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 )
 #define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 )
 #define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 )
 #define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 )
 #define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 )
+#define SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR ( 10 )
 #endif
 ;
 
diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl
index b7c151d..8a5692f 100644
--- a/librpc/idl/samr.idl
+++ b/librpc/idl/samr.idl
@@ -1544,12 +1544,14 @@ import misc.idl, lsa.idl, security.idl;
SAMR_VALIDATION_STATUS_SUCCESS = 0,
SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE = 1,
SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT = 2,
+   SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED = 3,
SAMR_VALIDATION_STATUS_BAD_PASSWORD = 4,

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-330-g9f15ef1

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  9f15ef11bdf75dbc1a1af3c2bc35b1d653216f62 (commit)
  from  39fa9468c6b8099429b971d75c0647033b60901c (commit)

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


- Log -
commit 9f15ef11bdf75dbc1a1af3c2bc35b1d653216f62
Author: Günther Deschner g...@samba.org
Date:   Mon Jul 13 23:53:49 2009 +0200

s3-account_policy: add pdb_policy_type enum.

Guenther

---

Summary of changes:
 source3/include/passdb.h   |   22 ++-
 source3/include/proto.h|   22 +++---
 source3/include/smb.h  |   14 
 source3/lib/account_pol.c  |   88 
 source3/libnet/libnet_samsync_passdb.c |   23 ---
 source3/passdb/passdb.c|   16 ++--
 source3/passdb/pdb_ads.c   |   10 ++-
 source3/passdb/pdb_get_set.c   |6 +-
 source3/passdb/pdb_interface.c |   16 ++--
 source3/passdb/pdb_ldap.c  |   40 ++-
 source3/registry/reg_backend_netlogon_params.c |2 +-
 source3/rpc_server/srv_samr_nt.c   |   62 
 source3/rpc_server/srv_samr_util.c |2 +-
 source3/smbd/chgpasswd.c   |6 +-
 source3/torture/pdbtest.c  |6 +-
 source3/winbindd/winbindd_passdb.c |   10 ++--
 16 files changed, 179 insertions(+), 166 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 4e53311..2b4f9c2 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -205,6 +205,22 @@ struct pdb_domain_info {
struct GUID guid;
 };
 
+/*
+ * Types of account policy.
+ */
+enum pdb_policy_type {
+   PDB_POLICY_MIN_PASSWORD_LEN = 1,
+   PDB_POLICY_PASSWORD_HISTORY = 2,
+   PDB_POLICY_USER_MUST_LOGON_TO_CHG_PASS  = 3,
+   PDB_POLICY_MAX_PASSWORD_AGE = 4,
+   PDB_POLICY_MIN_PASSWORD_AGE = 5,
+   PDB_POLICY_LOCK_ACCOUNT_DURATION = 6,
+   PDB_POLICY_RESET_COUNT_TIME = 7,
+   PDB_POLICY_BAD_ATTEMPT_LOCKOUT = 8,
+   PDB_POLICY_TIME_TO_LOGOUT = 9,
+   PDB_POLICY_REFUSE_MACHINE_PW_CHANGE = 10
+};
+
 #define PDB_CAP_STORE_RIDS 0x0001
 #define PDB_CAP_ADS0x0002
 
@@ -351,10 +367,12 @@ struct pdb_methods
 enum lsa_SidType *attrs);
 
NTSTATUS (*get_account_policy)(struct pdb_methods *methods,
-  int policy_index, uint32 *value);
+  enum pdb_policy_type type,
+  uint32_t *value);
 
NTSTATUS (*set_account_policy)(struct pdb_methods *methods,
-  int policy_index, uint32 value);
+  enum pdb_policy_type type,
+  uint32_t value);
 
NTSTATUS (*get_seq_num)(struct pdb_methods *methods, time_t *seq_num);
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7b3eaa0..0dd1e98 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -290,16 +290,16 @@ bool check_access(int sock, const char **allow_list, 
const char **deny_list);
 /* The following definitions come from lib/account_pol.c  */
 
 void account_policy_names_list(const char ***names, int *num_names);
-const char *decode_account_policy_name(int field);
-const char *get_account_policy_attr(int field);
-const char *account_policy_get_desc(int field);
-int account_policy_name_to_fieldnum(const char *name);
-bool account_policy_get_default(int account_policy, uint32 *val);
+const char *decode_account_policy_name(enum pdb_policy_type type);
+const char *get_account_policy_attr(enum pdb_policy_type type);
+const char *account_policy_get_desc(enum pdb_policy_type type);
+enum pdb_policy_type account_policy_name_to_typenum(const char *name);
+bool account_policy_get_default(enum pdb_policy_type type, uint32_t *val);
 bool init_account_policy(void);
-bool account_policy_get(int field, uint32 *value);
-bool account_policy_set(int field, uint32 value);
-bool cache_account_policy_set(int field, uint32 value);
-bool cache_account_policy_get(int field, uint32 *value);
+bool account_policy_get(enum pdb_policy_type type, uint32_t *value);
+bool account_policy_set(enum pdb_policy_type type, uint32_t value);
+bool cache_account_policy_set(enum pdb_policy_type type, uint32_t value);
+bool cache_account_policy_get(enum pdb_policy_type type, uint32_t *value);
 struct db_context *get_account_pol_db( void );
 
 /* The following definitions come from lib/adt_tree.c  */
@@ -4595,8 +4595,8 @@ NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
  const char **names,
   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-331-g9d7cb48

2009-07-14 Thread Simo Sorce
The branch, master has been updated
   via  9d7cb4826a7b605a170bd5d5efee331557188b6e (commit)
  from  9f15ef11bdf75dbc1a1af3c2bc35b1d653216f62 (commit)

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


- Log -
commit 9d7cb4826a7b605a170bd5d5efee331557188b6e
Author: Sumit Bose sb...@redhat.com
Date:   Fri Jul 10 22:44:27 2009 +0200

remove all '\n' from ldb_debug

---

Summary of changes:
 source4/lib/ldb/common/ldb.c   |2 +-
 source4/lib/ldb/common/ldb_debug.c |1 +
 source4/lib/ldb/common/ldb_ldif.c  |   12 ++--
 source4/lib/ldb/common/ldb_match.c |2 +-
 source4/lib/ldb/common/ldb_modules.c   |   24 
 source4/lib/ldb/ldb_ildap/ldb_ildap.c  |6 +++---
 source4/lib/ldb/ldb_ldap/ldb_ldap.c|6 +++---
 source4/lib/ldb/ldb_map/ldb_map.c  |   16 
 source4/lib/ldb/ldb_map/ldb_map_inbound.c  |8 
 source4/lib/ldb/ldb_map/ldb_map_outbound.c |8 
 source4/lib/ldb/ldb_tdb/ldb_cache.c|6 +++---
 source4/lib/ldb/ldb_tdb/ldb_index.c|6 +++---
 source4/lib/ldb/ldb_tdb/ldb_pack.c |2 +-
 source4/lib/ldb/ldb_tdb/ldb_tdb.c  |2 +-
 source4/lib/ldb/modules/asq.c  |2 +-
 source4/lib/ldb/modules/operational.c  |4 ++--
 source4/lib/ldb/modules/paged_results.c|2 +-
 source4/lib/ldb/modules/rdn_name.c |4 ++--
 source4/lib/ldb/modules/sort.c |2 +-
 19 files changed, 58 insertions(+), 57 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c
index 64ad683..164e5a9 100644
--- a/source4/lib/ldb/common/ldb.c
+++ b/source4/lib/ldb/common/ldb.c
@@ -240,7 +240,7 @@ int ldb_connect(struct ldb_context *ldb, const char *url,
 
if (ldb_load_modules(ldb, options) != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_FATAL,
- Unable to load modules for %s: %s\n,
+ Unable to load modules for %s: %s,
  url, ldb_errstring(ldb));
return LDB_ERR_OTHER;
}
diff --git a/source4/lib/ldb/common/ldb_debug.c 
b/source4/lib/ldb/common/ldb_debug.c
index f8009eb..7680862 100644
--- a/source4/lib/ldb/common/ldb_debug.c
+++ b/source4/lib/ldb/common/ldb_debug.c
@@ -56,6 +56,7 @@ static void ldb_debug_stderr(void *context, enum 
ldb_debug_level level,
 {
if (level = LDB_DEBUG_WARNING) {
vfprintf(stderr, fmt, ap);
+   fprintf(stderr, \n);
}
 }
 
diff --git a/source4/lib/ldb/common/ldb_ldif.c 
b/source4/lib/ldb/common/ldb_ldif.c
index d64a9f1..d890ff8 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -296,7 +296,7 @@ int ldb_ldif_write(struct ldb_context *ldb,
}
}
if (!ldb_changetypes[i].name) {
-   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: Invalid ldif 
changetype %d\n,
+   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: Invalid ldif 
changetype %d,
  ldif-changetype);
talloc_free(mem_ctx);
return -1;
@@ -561,7 +561,7 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,

/* first line must be a dn */
if (ldb_attr_cmp(attr, dn) != 0) {
-   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: First line of ldif must 
be a dn not '%s'\n, 
+   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: First line of ldif must 
be a dn not '%s',
  attr);
goto failed;
}
@@ -569,7 +569,7 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
msg-dn = ldb_dn_from_ldb_val(msg, ldb, value);
 
if ( ! ldb_dn_validate(msg-dn)) {
-   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: Unable to parse dn 
'%s'\n, 
+   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: Unable to parse dn 
'%s',
  (char *)value.data);
goto failed;
}
@@ -588,8 +588,8 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
}
}
if (!ldb_changetypes[i].name) {
-   ldb_debug(ldb, LDB_DEBUG_ERROR, 
- Error: Bad ldif changetype 
'%s'\n,(char *)value.data);
+   ldb_debug(ldb, LDB_DEBUG_ERROR,
+ Error: Bad ldif changetype 
'%s',(char *)value.data);
}
flags = 0;
continue;
@@ -638,7 +638,7 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
}
   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-332-gd9c0d58

2009-07-14 Thread Björn Jacke
The branch, master has been updated
   via  d9c0d5823624d302c6fa635d2e44aab985fd307c (commit)
  from  9d7cb4826a7b605a170bd5d5efee331557188b6e (commit)

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


- Log -
commit d9c0d5823624d302c6fa635d2e44aab985fd307c
Author: Björn Jacke b...@sernet.de
Date:   Tue Jul 14 17:40:21 2009 +0200

s3: don't make same innetgr check twice

---

Summary of changes:
 source3/smbd/password.c |   19 +++
 1 files changed, 11 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 928ef01..58824b6 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -428,16 +428,16 @@ bool user_in_netgroup(struct smbd_server_connection 
*sconn,
if (innetgr(ngname, NULL, user, sconn-smb1.sessions.my_yp_domain)) {
DEBUG(5,(user_in_netgroup: Found\n));
return true;
-   } else {
-
-   /*
-* Ok, innetgr is case sensitive. Try once more with lowercase
-* just in case. Attempt to fix #703. JRA.
-*/
+   }
 
-   fstrcpy(lowercase_user, user);
-   strlower_m(lowercase_user);
+   /*
+* Ok, innetgr is case sensitive. Try once more with lowercase
+* just in case. Attempt to fix #703. JRA.
+*/
+   fstrcpy(lowercase_user, user);
+   strlower_m(lowercase_user);
 
+   if (strcmp(user,lowercase_user) != 0) {
DEBUG(5,(looking for user %s of domain %s in netgroup %s\n,
lowercase_user,
sconn-smb1.sessions.my_yp_domain?
@@ -449,6 +449,9 @@ bool user_in_netgroup(struct smbd_server_connection *sconn,
DEBUG(5,(user_in_netgroup: Found\n));
return true;
}
+   } else {
+   /* user name was already lower case! */
+   return false;
}
 #endif /* HAVE_NETGROUP */
return false;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-333-g99c7ee3

2009-07-14 Thread Björn Jacke
The branch, master has been updated
   via  99c7ee3c9145b6187113ff29500b55a32320a9bc (commit)
  from  d9c0d5823624d302c6fa635d2e44aab985fd307c (commit)

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


- Log -
commit 99c7ee3c9145b6187113ff29500b55a32320a9bc
Author: Björn Jacke b...@sernet.de
Date:   Tue Jul 14 17:55:50 2009 +0200

s3: make d9c0d58236 better readble and reduce indentation

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 58824b6..b1a7497 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -437,22 +437,22 @@ bool user_in_netgroup(struct smbd_server_connection 
*sconn,
fstrcpy(lowercase_user, user);
strlower_m(lowercase_user);
 
-   if (strcmp(user,lowercase_user) != 0) {
-   DEBUG(5,(looking for user %s of domain %s in netgroup %s\n,
-   lowercase_user,
-   sconn-smb1.sessions.my_yp_domain?
-   sconn-smb1.sessions.my_yp_domain:(ANY),
-   ngname));
-
-   if (innetgr(ngname, NULL, lowercase_user,
-   sconn-smb1.sessions.my_yp_domain)) {
-   DEBUG(5,(user_in_netgroup: Found\n));
-   return true;
-   }
-   } else {
+   if (strcmp(user,lowercase_user) == 0) {
/* user name was already lower case! */
return false;
}
+
+   DEBUG(5,(looking for user %s of domain %s in netgroup %s\n,
+   lowercase_user,
+   sconn-smb1.sessions.my_yp_domain?
+   sconn-smb1.sessions.my_yp_domain:(ANY),
+   ngname));
+
+   if (innetgr(ngname, NULL, lowercase_user,
+   sconn-smb1.sessions.my_yp_domain)) {
+   DEBUG(5,(user_in_netgroup: Found\n));
+   return true;
+   }
 #endif /* HAVE_NETGROUP */
return false;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-337-g73e9693

2009-07-14 Thread Bo Yang
The branch, master has been updated
   via  73e96935c3604d21552ba93dfd561eaf7606f52d (commit)
   via  2821f5abf5d60cf420877e92db5c615c83471e95 (commit)
   via  86865365ce487a8943370ea2f313000a6440ea9a (commit)
   via  9ef6af73b319048fc6f3891573f0e10066dffee6 (commit)
  from  99c7ee3c9145b6187113ff29500b55a32320a9bc (commit)

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


- Log -
commit 73e96935c3604d21552ba93dfd561eaf7606f52d
Author: Bo Yang boy...@samba.org
Date:   Wed Jul 15 17:03:04 2009 +0800

s3: fix build of pdbedit and net_sam. Guenther, please check. 
Signed-off-by: Bo Yang boy...@samba.org

commit 2821f5abf5d60cf420877e92db5c615c83471e95
Author: Bo Yang boy...@samba.org
Date:   Wed Jul 15 15:37:04 2009 +0800

s3: Fix double free in net usershare.

Signed-off-by: Bo Yang boy...@samba.org

commit 86865365ce487a8943370ea2f313000a6440ea9a
Author: Bo Yang boy...@samba.org
Date:   Wed Jul 15 15:36:02 2009 +0800

S3: Small fix to get rid of annoying log message.

Signed-off-by: Bo Yang boy...@samba.org

commit 9ef6af73b319048fc6f3891573f0e10066dffee6
Author: Bo Yang boy...@samba.org
Date:   Wed Jul 15 15:34:10 2009 +0800

s3: Make smbd aware of permission change of usershare. Since usershare are 
relatively volatile and non-previledge users must disconnect from smbd and 
reconnect to it to make share permission in effect.

---

Summary of changes:
 source3/include/proto.h|7 ++-
 source3/include/smb.h  |6 ++
 source3/param/loadparm.c   |   14 +
 source3/rpc_server/srv_srvsvc_nt.c |6 ++-
 source3/smbd/conn.c|1 +
 source3/smbd/notify_inotify.c  |4 +-
 source3/smbd/process.c |   58 +-
 source3/smbd/service.c |   80 ++
 source3/smbd/uid.c |   96 +++-
 source3/utils/net_sam.c|8 ++--
 source3/utils/net_usershare.c  |   32 ++--
 source3/utils/pdbedit.c|2 +-
 12 files changed, 251 insertions(+), 63 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0dd1e98..d141de4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4296,6 +4296,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
char **pp_comment,
SEC_DESC **ppsd,
bool *pallow_guest);
+bool am_usershare(int iService);
 int load_usershare_service(const char *servicename);
 int load_usershare_shares(void);
 void gfree_loadparm(void);
@@ -7063,7 +7064,8 @@ void reply_transs2(struct smb_request *req);
 
 bool change_to_guest(void);
 void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
-bool change_to_user(connection_struct *conn, uint16 vuid);
+bool change_to_user_force_recheck(connection_struct *conn, uint16 vuid,
+ bool recheck, NTSTATUS *pstatus);
 bool change_to_root_user(void);
 bool become_authenticated_pipe_user(pipes_struct *p);
 bool unbecome_authenticated_pipe_user(void);
@@ -7072,6 +7074,9 @@ void unbecome_root(void);
 bool become_user(connection_struct *conn, uint16 vuid);
 bool unbecome_user(void);
 
+#define change_to_user(conn, vuid) \
+   change_to_user_force_recheck(conn, vuid, 0, NULL)
+
 /* The following definitions come from smbd/utmp.c  */
 
 void sys_utmp_claim(const char *username, const char *hostname,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 2e9cf1b..44216f8 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -550,6 +550,7 @@ typedef struct connection_struct {
unsigned cnum; /* an index passed over the wire */
struct share_params *params;
bool force_user;
+   bool force_recheck_perm;
struct vuid_cache vuid_cache;
struct dptr_struct *dirptr;
bool printer;
@@ -1398,6 +1399,11 @@ struct bitmap {
 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x0200
 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x0400
 #define FILE_NOTIFY_CHANGE_STREAM_WRITE0x0800
+#define FILE_NOTIFY_CHANGE_FILE_CONTENT \
+   (FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME \
+   | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE \
+   | FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_EA \
+   | FILE_NOTIFY_CHANGE_SECURITY)
 
 #define FILE_NOTIFY_CHANGE_NAME \
(FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7e4371b..4415804 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5142,6 +5142,9 @@ static char *lp_string(const char *s)
 #if 0
DEBUG(10, (lp_string(%s)\n, s));
 #endif
+   if 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-338-gd57e67f

2009-07-14 Thread Jeremy Allison
The branch, master has been updated
   via  d57e67f9eb5a6a05f0e173d48e86dd1fe050635e (commit)
  from  73e96935c3604d21552ba93dfd561eaf7606f52d (commit)

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


- Log -
commit d57e67f9eb5a6a05f0e173d48e86dd1fe050635e
Author: Jeremy Allison j...@samba.org
Date:   Tue Jul 14 11:25:45 2009 -0700

Revert this commit :

s3: Make smbd aware of permission change of usershare. Since usershare are 
relatively volatile and
non-previledge users must disconnect from smbd and reconnect to it to make 
share permission in effect.

For now. This is a feature request and I think we need
to design it a little differently so as not to touch
core change_to_user() code.

Jeremy.

---

Summary of changes:
 source3/include/proto.h   |7 +---
 source3/include/smb.h |6 ---
 source3/param/loadparm.c  |   11 +
 source3/smbd/conn.c   |1 -
 source3/smbd/notify_inotify.c |4 +-
 source3/smbd/process.c|   58 +
 source3/smbd/service.c|   80 --
 source3/smbd/uid.c|   96 ++--
 8 files changed, 39 insertions(+), 224 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index d141de4..0dd1e98 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4296,7 +4296,6 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
char **pp_comment,
SEC_DESC **ppsd,
bool *pallow_guest);
-bool am_usershare(int iService);
 int load_usershare_service(const char *servicename);
 int load_usershare_shares(void);
 void gfree_loadparm(void);
@@ -7064,8 +7063,7 @@ void reply_transs2(struct smb_request *req);
 
 bool change_to_guest(void);
 void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
-bool change_to_user_force_recheck(connection_struct *conn, uint16 vuid,
- bool recheck, NTSTATUS *pstatus);
+bool change_to_user(connection_struct *conn, uint16 vuid);
 bool change_to_root_user(void);
 bool become_authenticated_pipe_user(pipes_struct *p);
 bool unbecome_authenticated_pipe_user(void);
@@ -7074,9 +7072,6 @@ void unbecome_root(void);
 bool become_user(connection_struct *conn, uint16 vuid);
 bool unbecome_user(void);
 
-#define change_to_user(conn, vuid) \
-   change_to_user_force_recheck(conn, vuid, 0, NULL)
-
 /* The following definitions come from smbd/utmp.c  */
 
 void sys_utmp_claim(const char *username, const char *hostname,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 44216f8..2e9cf1b 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -550,7 +550,6 @@ typedef struct connection_struct {
unsigned cnum; /* an index passed over the wire */
struct share_params *params;
bool force_user;
-   bool force_recheck_perm;
struct vuid_cache vuid_cache;
struct dptr_struct *dirptr;
bool printer;
@@ -1399,11 +1398,6 @@ struct bitmap {
 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x0200
 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x0400
 #define FILE_NOTIFY_CHANGE_STREAM_WRITE0x0800
-#define FILE_NOTIFY_CHANGE_FILE_CONTENT \
-   (FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME \
-   | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE \
-   | FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_EA \
-   | FILE_NOTIFY_CHANGE_SECURITY)
 
 #define FILE_NOTIFY_CHANGE_NAME \
(FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 4415804..5d3ac92 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8741,6 +8741,17 @@ bool am_usershare(int iService)
 }
 
 /***
+Am I a usershare service?
+***/
+bool am_usershare(int iService)
+{
+   if (iService = 0) {
+   return (ServicePtrs[iService]-usershare == USERSHARE_VALID);
+   }
+   return false;
+}
+
+/***
  Checks if a usershare entry has been modified since last load.
 ***/
 
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 3ddb4c0..af6e091 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -155,7 +155,6 @@ find_again:
return NULL;
}
conn-cnum = i;
-   conn-force_recheck_perm = false;
conn-force_group_gid = (gid_t)-1;
 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-341-g749a508

2009-07-14 Thread Volker Lendecke
The branch, master has been updated
   via  749a50874906ba38f1085065933f2781b81d5dfa (commit)
   via  72da71acf925ffe4cc87ca2bcba3770af3fe3d8b (commit)
   via  74046c8054d2afe7da51c1ff09ffd594a9cb8b73 (commit)
  from  d57e67f9eb5a6a05f0e173d48e86dd1fe050635e (commit)

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


- Log -
commit 749a50874906ba38f1085065933f2781b81d5dfa
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 18:34:36 2009 +0200

Create a talloc_stackframe for each file in wildcard unlink

There might be *many* files to delete

commit 72da71acf925ffe4cc87ca2bcba3770af3fe3d8b
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 18:34:07 2009 +0200

Create a correct talloc hierarchy in make_sec_acl()

commit 74046c8054d2afe7da51c1ff09ffd594a9cb8b73
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 18:33:01 2009 +0200

TALLOC_FREE(sd) in check_open_rights upon an error

---

Summary of changes:
 libcli/security/secacl.c |2 +-
 source3/smbd/open.c  |1 +
 source3/smbd/reply.c |   10 ++
 3 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index 9373ef5..29afe46 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -51,7 +51,7 @@ struct security_acl *make_sec_acl(TALLOC_CTX *ctx,
   positive number. */
 
if ((num_aces)  
-((dst-aces = talloc_array(ctx, struct security_ace, num_aces)) 
+((dst-aces = talloc_array(dst, struct security_ace, num_aces))
  == NULL)) {
return NULL;
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e01350f..404461f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -94,6 +94,7 @@ static NTSTATUS check_open_rights(struct connection_struct 
*conn,
on %s: %s\n,
smb_fname_str_dbg(smb_fname),
nt_errstr(status)));
+   TALLOC_FREE(sd);
return status;
}
 
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index e35c5bc..4d0a2b8 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2646,18 +2646,23 @@ NTSTATUS unlink_internals(connection_struct *conn, 
struct smb_request *req,
 
while ((dname = ReadDirName(dir_hnd, offset,
smb_fname-st))) {
+   TALLOC_CTX *frame = talloc_stackframe();
+
if (!is_visible_file(conn, fname_dir, dname,
 smb_fname-st, true)) {
+   TALLOC_FREE(frame);
continue;
}
 
/* Quick check for . and .. */
if (ISDOT(dname) || ISDOTDOT(dname)) {
+   TALLOC_FREE(frame);
continue;
}
 
if(!mask_match(dname, fname_mask,
   conn-case_sensitive)) {
+   TALLOC_FREE(frame);
continue;
}
 
@@ -2669,23 +2674,28 @@ NTSTATUS unlink_internals(connection_struct *conn, 
struct smb_request *req,
if (!smb_fname-base_name) {
TALLOC_FREE(dir_hnd);
status = NT_STATUS_NO_MEMORY;
+   TALLOC_FREE(frame);
goto out;
}
 
status = check_name(conn, smb_fname-base_name);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(dir_hnd);
+   TALLOC_FREE(frame);
goto out;
}
 
status = do_unlink(conn, req, smb_fname, dirtype);
if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(frame);
continue;
}
 
count++;
DEBUG(3,(unlink_internals: successful unlink [%s]\n,
 smb_fname-base_name));
+
+   TALLOC_FREE(frame);
}
TALLOC_FREE(dir_hnd);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-342-gb134d4b

2009-07-14 Thread Volker Lendecke
The branch, master has been updated
   via  b134d4bc4ad665b82438eb8e1b5cbd1098a36aed (commit)
  from  749a50874906ba38f1085065933f2781b81d5dfa (commit)

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


- Log -
commit b134d4bc4ad665b82438eb8e1b5cbd1098a36aed
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 21:28:13 2009 +0200

Attempt to fix the build

---

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


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5d3ac92..dbbd6e3 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8730,28 +8730,6 @@ static int process_usershare_file(const char *dir_name, 
const char *file_name, i
 }
 
 /***
-Am I a usershare service?
-***/
-bool am_usershare(int iService)
-{
-   if (iService = 0) {
-   return (ServicePtrs[iService]-usershare == USERSHARE_VALID);
-   }
-   return false;
-}
-
-/***
-Am I a usershare service?
-***/
-bool am_usershare(int iService)
-{
-   if (iService = 0) {
-   return (ServicePtrs[iService]-usershare == USERSHARE_VALID);
-   }
-   return false;
-}
-
-/***
  Checks if a usershare entry has been modified since last load.
 ***/
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-343-g036bad6

2009-07-14 Thread Björn Jacke
The branch, master has been updated
   via  036bad61317bc71f59db0e766881dd880253bb52 (commit)
  from  b134d4bc4ad665b82438eb8e1b5cbd1098a36aed (commit)

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


- Log -
commit 036bad61317bc71f59db0e766881dd880253bb52
Author: Björn Jacke b...@sernet.de
Date:   Tue Jul 14 22:23:39 2009 +0200

s3: allow setting the TCP_QUICKACK socket option

---

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


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 31261af..af64f37 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -349,6 +349,9 @@ static const smb_socket_option socket_options[] = {
 #ifdef TCP_FASTACK
   {TCP_FASTACK, IPPROTO_TCP, TCP_FASTACK, 0, OPT_INT},
 #endif
+#ifdef TCP_QUICKACK
+  {TCP_QUICKACK, IPPROTO_TCP, TCP_QUICKACK, 0, OPT_BOOL},
+#endif
   {NULL,0,0,0,0}};
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-344-gb0cce95

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12 (commit)
  from  036bad61317bc71f59db0e766881dd880253bb52 (commit)

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


- Log -
commit b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12
Author: Günther Deschner g...@samba.org
Date:   Tue Jul 14 14:33:08 2009 +0200

s4-smbtorture: restructure test_OpenPrinter_server in RPC-SPOOLSS a bit.

Guenther

---

Summary of changes:
 source4/torture/rpc/spoolss.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 10e18e1..3cfe020 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -75,20 +75,22 @@ struct test_spoolss_context {
 
 #define COMPARE_STRING_ARRAY(tctx, c,r,e)
 
-static bool test_OpenPrinter_server(struct torture_context *tctx, struct 
dcerpc_pipe *p, struct test_spoolss_context *ctx)
+static bool test_OpenPrinter_server(struct torture_context *tctx,
+   struct dcerpc_pipe *p,
+   struct policy_handle *server_handle)
 {
NTSTATUS status;
struct spoolss_OpenPrinter op;
 
-   op.in.printername   = talloc_asprintf(ctx, %s, 
dcerpc_server_name(p));
+   op.in.printername   = talloc_asprintf(tctx, %s, 
dcerpc_server_name(p));
op.in.datatype  = NULL;
op.in.devmode_ctr.devmode= NULL;
op.in.access_mask   = 0;
-   op.out.handle   = ctx-server_handle;
+   op.out.handle   = server_handle;
 
torture_comment(tctx, Testing OpenPrinter(%s)\n, op.in.printername);
 
-   status = dcerpc_spoolss_OpenPrinter(p, ctx, op);
+   status = dcerpc_spoolss_OpenPrinter(p, tctx, op);
torture_assert_ntstatus_ok(tctx, status, dcerpc_spoolss_OpenPrinter 
failed);
torture_assert_werr_ok(tctx, op.out.result, dcerpc_spoolss_OpenPrinter 
failed);
 
@@ -2087,7 +2089,7 @@ bool torture_rpc_spoolss(struct torture_context *torture)
 
ctx = talloc_zero(torture, struct test_spoolss_context);
 
-   ret = test_OpenPrinter_server(torture, p, ctx);
+   ret = test_OpenPrinter_server(torture, p, ctx-server_handle);
 
ret = test_GetPrinterData(torture, p, ctx-server_handle, 
W3SvcInstalled);
ret = test_GetPrinterData(torture, p, ctx-server_handle, 
BeepEnabled);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-345-g3a367ab

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  3a367ab10d3da2d9f5261769af06442550a0f029 (commit)
  from  b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12 (commit)

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


- Log -
commit 3a367ab10d3da2d9f5261769af06442550a0f029
Author: Günther Deschner g...@samba.org
Date:   Thu Jul 2 19:38:12 2009 +0200

s4-smbtorture: add some tests to check spoolss_SetPrinter behavior.

Guenther

---

Summary of changes:
 source4/torture/rpc/spoolss.c |  558 +
 1 files changed, 558 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 3cfe020..b6ad1a7 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -812,6 +812,564 @@ static bool test_GetPrinter(struct torture_context *tctx,
return true;
 }
 
+static bool test_SetPrinter_errors(struct torture_context *tctx,
+  struct dcerpc_pipe *p,
+  struct policy_handle *handle)
+{
+   struct spoolss_SetPrinter r;
+   uint16_t levels[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+   int i;
+
+   struct spoolss_SetPrinterInfoCtr info_ctr;
+   struct spoolss_DevmodeContainer devmode_ctr;
+   struct sec_desc_buf secdesc_ctr;
+
+   info_ctr.level = 0;
+   info_ctr.info.info0 = NULL;
+
+   ZERO_STRUCT(devmode_ctr);
+   ZERO_STRUCT(secdesc_ctr);
+
+   r.in.handle = handle;
+   r.in.info_ctr = info_ctr;
+   r.in.devmode_ctr = devmode_ctr;
+   r.in.secdesc_ctr = secdesc_ctr;
+   r.in.command = 0;
+
+   torture_comment(tctx, Testing SetPrinter all zero\n);
+
+   torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_SetPrinter(p, tctx, r),
+   failed to call SetPrinter);
+   torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_PARAM,
+   failed to call SetPrinter);
+
+ again:
+   for (i=0; i  ARRAY_SIZE(levels); i++) {
+
+   struct spoolss_SetPrinterInfo0 info0;
+   struct spoolss_SetPrinterInfo1 info1;
+   struct spoolss_SetPrinterInfo2 info2;
+   struct spoolss_SetPrinterInfo3 info3;
+   struct spoolss_SetPrinterInfo4 info4;
+   struct spoolss_SetPrinterInfo5 info5;
+   struct spoolss_SetPrinterInfo6 info6;
+   struct spoolss_SetPrinterInfo7 info7;
+   struct spoolss_DeviceModeInfo info8;
+   struct spoolss_DeviceModeInfo info9;
+
+
+   info_ctr.level = levels[i];
+   switch (levels[i]) {
+   case 0:
+   ZERO_STRUCT(info0);
+   info_ctr.info.info0 = info0;
+   break;
+   case 1:
+   ZERO_STRUCT(info1);
+   info_ctr.info.info1 = info1;
+   break;
+   case 2:
+   ZERO_STRUCT(info2);
+   info_ctr.info.info2 = info2;
+   break;
+   case 3:
+   ZERO_STRUCT(info3);
+   info_ctr.info.info3 = info3;
+   break;
+   case 4:
+   ZERO_STRUCT(info4);
+   info_ctr.info.info4 = info4;
+   break;
+   case 5:
+   ZERO_STRUCT(info5);
+   info_ctr.info.info5 = info5;
+   break;
+   case 6:
+   ZERO_STRUCT(info6);
+   info_ctr.info.info6 = info6;
+   break;
+   case 7:
+   ZERO_STRUCT(info7);
+   info_ctr.info.info7 = info7;
+   break;
+   case 8:
+   ZERO_STRUCT(info8);
+   info_ctr.info.info8 = info8;
+   break;
+   case 9:
+   ZERO_STRUCT(info9);
+   info_ctr.info.info9 = info9;
+   break;
+   }
+
+   torture_comment(tctx, Testing SetPrinter level %d, command 
%d\n,
+   info_ctr.level, r.in.command);
+
+   torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_SetPrinter(p, 
tctx, r),
+   failed to call SetPrinter);
+
+   switch (r.in.command) {
+   case SPOOLSS_PRINTER_CONTROL_UNPAUSE: /* 0 */
+   /* is ignored for all levels other then 0 */
+   if (info_ctr.level  0) {
+   /* ignored then */
+   break;
+   }
+   case 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-346-gb6fb8cf

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  b6fb8cf5f38fc434103936b41a5793f5943c129a (commit)
  from  3a367ab10d3da2d9f5261769af06442550a0f029 (commit)

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


- Log -
commit b6fb8cf5f38fc434103936b41a5793f5943c129a
Author: Günther Deschner g...@samba.org
Date:   Fri Jul 3 09:56:28 2009 +0200

s4-smbtorture: add RPC-SPOOLSS-PRINTER test.

Guenther

---

Summary of changes:
 source4/torture/rpc/rpc.c |1 +
 source4/torture/rpc/spoolss.c |  443 +
 2 files changed, 444 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c
index 4043562..6eeba7f 100644
--- a/source4/torture/rpc/rpc.c
+++ b/source4/torture/rpc/rpc.c
@@ -444,6 +444,7 @@ NTSTATUS torture_rpc_init(void)
torture_suite_add_simple_test(suite, SPOOLSS, torture_rpc_spoolss);
torture_suite_add_suite(suite, torture_rpc_spoolss_notify(suite));
torture_suite_add_suite(suite, torture_rpc_spoolss_win(suite));
+   torture_suite_add_suite(suite, torture_rpc_spoolss_printer(suite));
torture_suite_add_simple_test(suite, SAMR, torture_rpc_samr);
torture_suite_add_simple_test(suite, SAMR-USERS, 
torture_rpc_samr_users);
torture_suite_add_simple_test(suite, SAMR-PASSWORDS, 
torture_rpc_samr_passwords);
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index b6ad1a7..a515ef6 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -26,6 +26,11 @@
 #include torture/rpc/rpc.h
 #include librpc/gen_ndr/ndr_spoolss_c.h
 
+#define TORTURE_WELLKNOWN_PRINTER  torture_wkn_printer
+#define TORTURE_PRINTERtorture_printer
+#define TORTURE_WELLKNOWN_PRINTER_EX   torture_wkn_printer_ex
+#define TORTURE_PRINTER_EX torture_printer_ex
+
 struct test_spoolss_context {
/* print server handle */
struct policy_handle server_handle;
@@ -2633,6 +2638,432 @@ static bool test_EnumPrinterDrivers_old(struct 
torture_context *tctx,
return true;
 }
 
+static bool test_DeletePrinter(struct torture_context *tctx,
+  struct dcerpc_pipe *p,
+  struct policy_handle *handle)
+{
+   struct spoolss_DeletePrinter r;
+
+   torture_comment(tctx, Testing DeletePrinter\n);
+
+   r.in.handle = handle;
+
+   torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_DeletePrinter(p, tctx, 
r),
+   failed to delete printer);
+   torture_assert_werr_ok(tctx, r.out.result,
+   failed to delete printer);
+
+   return true;
+}
+
+static bool test_EnumPrinters_findname(struct torture_context *tctx,
+  struct dcerpc_pipe *p,
+  uint32_t flags,
+  uint32_t level,
+  const char *name,
+  bool *found)
+{
+   struct spoolss_EnumPrinters e;
+   uint32_t count;
+   union spoolss_PrinterInfo *info;
+   uint32_t needed;
+   int i;
+
+   *found = false;
+
+   e.in.flags = flags;
+   e.in.server = NULL;
+   e.in.level = level;
+   e.in.buffer = NULL;
+   e.in.offered = 0;
+   e.out.count = count;
+   e.out.info = info;
+   e.out.needed = needed;
+
+   torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_EnumPrinters(p, tctx, 
e),
+   failed to enum printers);
+
+   if (W_ERROR_EQUAL(e.out.result, WERR_INSUFFICIENT_BUFFER)) {
+   DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed);
+   data_blob_clear(blob);
+   e.in.buffer = blob;
+   e.in.offered = needed;
+
+   torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_EnumPrinters(p, 
tctx, e),
+   failed to enum printers);
+   }
+
+   torture_assert_werr_ok(tctx, e.out.result,
+   failed to enum printers);
+
+   for (i=0; i  count; i++) {
+
+   const char *current = NULL;
+
+   switch (level) {
+   case 1:
+   current = info[i].info1.name;
+   break;
+   }
+
+   if (strequal(current, name)) {
+   *found = true;
+   break;
+   }
+   }
+
+   return true;
+}
+
+static bool test_AddPrinter_wellknown(struct torture_context *tctx,
+ struct dcerpc_pipe *p,
+ const char *printername,
+ bool ex)
+{
+   WERROR result;
+   struct spoolss_AddPrinter r;
+   struct spoolss_AddPrinterEx rex;

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-347-gd050541

2009-07-14 Thread Volker Lendecke
The branch, master has been updated
   via  d05054133009526bd9dd08a226747e5cfeef8fc7 (commit)
  from  b6fb8cf5f38fc434103936b41a5793f5943c129a (commit)

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


- Log -
commit d05054133009526bd9dd08a226747e5cfeef8fc7
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 23:12:59 2009 +0200

Fix bug 5886

Ok, that's a very long-standing one. I finally got around to install a 
recent
OpenLDAP and test the different variants of setting a NULL password etc.

Thanks all for your patience!

Volker

---

Summary of changes:
 source3/passdb/pdb_ldap.c |   34 ++
 1 files changed, 26 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 11554a7..1b1e22f 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1701,6 +1701,7 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods 
*my_methods,
char *utf8_password;
char *utf8_dn;
size_t converted_size;
+   int ret;
 
if (!ldap_state-is_nds_ldap) {
 
@@ -1732,14 +1733,31 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods 
*my_methods,
}
 
if ((ber_printf (ber, {)  0) ||
-   (ber_printf (ber, ts, LDAP_TAG_EXOP_MODIFY_PASSWD_ID, 
utf8_dn)  0) ||
-   (ber_printf (ber, ts, LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, 
utf8_password)  0) ||
-   (ber_printf (ber, n})  0)) {
-   DEBUG(0,(ldapsam_modify_entry: ber_printf returns a 
value 0\n));
-   ber_free(ber,1);
-   TALLOC_FREE(utf8_dn);
-   TALLOC_FREE(utf8_password);
-   return NT_STATUS_UNSUCCESSFUL;
+   (ber_printf (ber, ts, LDAP_TAG_EXOP_MODIFY_PASSWD_ID,
+utf8_dn)  0)) {
+   DEBUG(0,(ldapsam_modify_entry: ber_printf returns a 
+value 0\n));
+   ber_free(ber,1);
+   TALLOC_FREE(utf8_dn);
+   TALLOC_FREE(utf8_password);
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+
+   if ((utf8_password != NULL)  (*utf8_password != '\0')) {
+   ret = ber_printf(ber, ts},
+LDAP_TAG_EXOP_MODIFY_PASSWD_NEW,
+utf8_password);
+   } else {
+   ret = ber_printf(ber, });
+   }
+
+   if (ret  0) {
+   DEBUG(0,(ldapsam_modify_entry: ber_printf returns a 
+value 0\n));
+   ber_free(ber,1);
+   TALLOC_FREE(utf8_dn);
+   TALLOC_FREE(utf8_password);
+   return NT_STATUS_UNSUCCESSFUL;
}
 
if ((rc = ber_flatten (ber, bv))0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-348-g4b6401a

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  4b6401ab2cce8319abe0f8176bb460d51bd4a390 (commit)
  from  d05054133009526bd9dd08a226747e5cfeef8fc7 (commit)

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


- Log -
commit 4b6401ab2cce8319abe0f8176bb460d51bd4a390
Author: Günther Deschner g...@samba.org
Date:   Tue Jul 14 23:36:41 2009 +0200

s3-passdb: fix wbc build warning.

Guenther

---

Summary of changes:
 source3/passdb/pdb_wbc_sam.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index ec54d55..2161d2f 100644
--- a/source3/passdb/pdb_wbc_sam.c
+++ b/source3/passdb/pdb_wbc_sam.c
@@ -167,12 +167,12 @@ done:
return result;
 }
 
-static NTSTATUS pdb_wbc_sam_get_account_policy(struct pdb_methods *methods, 
int policy_index, uint32 *value)
+static NTSTATUS pdb_wbc_sam_get_account_policy(struct pdb_methods *methods, 
enum pdb_policy_type type, uint32_t *value)
 {
return NT_STATUS_UNSUCCESSFUL;
 }
 
-static NTSTATUS pdb_wbc_sam_set_account_policy(struct pdb_methods *methods, 
int policy_index, uint32 value)
+static NTSTATUS pdb_wbc_sam_set_account_policy(struct pdb_methods *methods, 
enum pdb_policy_type type, uint32_t value)
 {
return NT_STATUS_UNSUCCESSFUL;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-349-g5334b79

2009-07-14 Thread Steven Danneman
The branch, master has been updated
   via  5334b79142e32c39c56cea2e9c0d5b08e2f217ca (commit)
  from  4b6401ab2cce8319abe0f8176bb460d51bd4a390 (commit)

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


- Log -
commit 5334b79142e32c39c56cea2e9c0d5b08e2f217ca
Author: Aravind aravind.sriniva...@isilon.com
Date:   Tue Jul 7 07:11:56 2009 -0700

torture/smb2: Adding SMB2 Directory enumeration torture tests.

* Most of the tests were ported from SMB torture tests.
* Added one new tests which checks the behavior of the file_index field
  present in SMB2_FIND struct.
* Added one new test to check the enumeration of directories containing
  lots of files (~2000 files) with name lengths varying from 1 to 200 char.

---

Summary of changes:
 source4/torture/smb2/config.mk |1 +
 source4/torture/smb2/dir.c | 1289 +++-
 source4/torture/smb2/smb2.c|1 +
 3 files changed, 1265 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/config.mk b/source4/torture/smb2/config.mk
index bc4fc15..b321b41 100644
--- a/source4/torture/smb2/config.mk
+++ b/source4/torture/smb2/config.mk
@@ -22,6 +22,7 @@ TORTURE_SMB2_OBJ_FILES = $(addprefix $(torturesrcdir)/smb2/, \
smb2.o \
durable_open.o \
oplocks.o \
+   dir.o \
lease.o \
create.o \
read.o \
diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c
index 58cf222..79672ef 100644
--- a/source4/torture/smb2/dir.c
+++ b/source4/torture/smb2/dir.c
@@ -1,20 +1,22 @@
-/* 
+/*
Unix SMB/CIFS implementation.
 
SMB2 dir list test suite
 
Copyright (C) Andrew Tridgell 2005
-   
+   Copyright (C) Zachary Loafman 2009
+   Copyright (C) Aravind Srinivasan 2009
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -22,72 +24,1307 @@
 #include includes.h
 #include libcli/smb2/smb2.h
 #include libcli/smb2/smb2_calls.h
+#include libcli/smb_composite/smb_composite.h
+#include libcli/raw/libcliraw.h
+#include libcli/raw/raw_proto.h
+#include libcli/libcli.h
 
 #include torture/torture.h
 #include torture/smb2/proto.h
+#include torture/util.h
+
+#include system/filesys.h
+
+#define CHECK_STATUS(status, correct) do { \
+   if (!NT_STATUS_EQUAL(status, correct)) { \
+   torture_result(tctx, TORTURE_FAIL, __location__: \
+  Incorrect status %s - should be %s, \
+  nt_errstr(status), nt_errstr(correct)); \
+   ret = false; \
+   goto done; \
+   }} while (0)
+
+#define CHECK_VALUE(v, correct) torture_assert_int_equal(tctx, (v), \
+   (correct), incorrect value);
+
+#define DNAME  smb2_dir
+#define NFILES 100
+
+struct file_elem {
+   char *name;
+   bool found;
+};
+
+static NTSTATUS populate_tree(struct torture_context *tctx,
+ TALLOC_CTX *mem_ctx,
+ struct smb2_tree *tree,
+ struct file_elem *files,
+ int nfiles,
+ struct smb2_handle *h_out)
+{
+   struct smb2_create create;
+   NTSTATUS status;
+   bool ret;
+   int i;
+
+   smb2_deltree(tree, DNAME);
+
+   ZERO_STRUCT(create);
+   create.in.desired_access = SEC_RIGHTS_DIR_ALL;
+   create.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
+   create.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY;
+   create.in.share_access = NTCREATEX_SHARE_ACCESS_READ |
+NTCREATEX_SHARE_ACCESS_WRITE |
+NTCREATEX_SHARE_ACCESS_DELETE;
+   create.in.create_disposition = NTCREATEX_DISP_CREATE;
+   create.in.fname = DNAME;
+
+   status = smb2_create(tree, mem_ctx, create);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   *h_out = create.out.file.handle;
+
+   ZERO_STRUCT(create);
+   create.in.desired_access = SEC_RIGHTS_FILE_ALL;
+   create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
+   create.in.create_disposition = NTCREATEX_DISP_CREATE;
+
+   for (i = 0; i  nfiles; i++) {
+   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-350-ge84d5bb

2009-07-14 Thread Günther Deschner
The branch, master has been updated
   via  e84d5bb02d113ae54172755ea284e7f22b677a7b (commit)
  from  5334b79142e32c39c56cea2e9c0d5b08e2f217ca (commit)

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


- Log -
commit e84d5bb02d113ae54172755ea284e7f22b677a7b
Author: Günther Deschner g...@samba.org
Date:   Wed Jul 15 01:22:32 2009 +0200

s4-selftest: ok, s4 cant print. add RPC-SPOOLSS-PRINTER to knownfail for 
now.

Guenther

---

Summary of changes:
 source4/selftest/knownfail |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/knownfail b/source4/selftest/knownfail
index 9118041..68d406a 100644
--- a/source4/selftest/knownfail
+++ b/source4/selftest/knownfail
@@ -40,6 +40,7 @@ rpc.netlogon.*.DatabaseRedo
 rpc.netlogon.*.ServerGetTrustInfo
 samba4.rpc.samr.passwords.pwdlastset # Not provided by Samba 4 yet
 samba4.rpc.samr.users.privileges
+samba4.rpc.spoolss.printer # Not provided by Samba 4 yet
 base.charset.*.Testing partial surrogate
 .*net.api.delshare.*   # DelShare isn't implemented yet
 rap.*netservergetinfo


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-351-g7be1d72

2009-07-14 Thread Jeremy Allison
The branch, master has been updated
   via  7be1d727a31b34debbcf8faa1e0bea92d145 (commit)
  from  e84d5bb02d113ae54172755ea284e7f22b677a7b (commit)

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


- Log -
commit 7be1d727a31b34debbcf8faa1e0bea92d145
Author: Jeremy Allison j...@samba.org
Date:   Tue Jul 14 16:42:21 2009 -0700

When tallocing a memory block for the state in a tevent_req struct,
ensure it's zeroed out. Vl  Metze please check.
Jeremy.

---

Summary of changes:
 lib/tevent/tevent_req.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 541f93f..1ddf9ef 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -109,6 +109,7 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
talloc_free(req);
return NULL;
}
+   memset(data, '\0', data_size);
talloc_set_name_const(data, type);
 
req-data = data;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-352-g5927ca7

2009-07-14 Thread Jeremy Allison
The branch, master has been updated
   via  5927ca7067a0ead65c00042a62545b0d940f2b2a (commit)
  from  7be1d727a31b34debbcf8faa1e0bea92d145 (commit)

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


- Log -
commit 5927ca7067a0ead65c00042a62545b0d940f2b2a
Author: Jeremy Allison j...@samba.org
Date:   Tue Jul 14 16:54:01 2009 -0700

Change to talloc_zero_size instead of extra memset.
Jeremy.

---

Summary of changes:
 lib/tevent/tevent_req.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 1ddf9ef..0feabb5 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -104,12 +104,11 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
return NULL;
}
 
-   data = talloc_size(req, data_size);
+   data = talloc_zero_size(req, data_size);
if (data == NULL) {
talloc_free(req);
return NULL;
}
-   memset(data, '\0', data_size);
talloc_set_name_const(data, type);
 
req-data = data;


-- 
Samba Shared Repository