Re: [Samba] Samba 3.2, Samba 3.3 release planning

2008-10-22 Thread Michael Adam
Hi William, Jerry,

Gerald (Jerry) Carter wrote:
 William Jojo wrote:
  
  I love that releases are moving very quickly now. My only 
  concern is keeping up with and determining what is appropriate
  as I continue to maintain AIX binaries on my web page.
  
  Presently I have already dropped the 3.0 series and have 
  3.2.4 available with the clustering option for AIX 5.3 and 6.1.
  
  I am trying to determine how best to support a 3.2 and 3.3 
  parallel set or if I should just drop 3.2 after 3.3.1 is
  released or some other arbitrary schedule. :-) :-)
  
  How long after 3.3 is released to production does the Samba 
  team anticipate supporting the 3.2 line?
 
 That has not bee decided yet.  The 3.0.x releases are in
 maintenance mode (transitioned as soon as 3.2.0 was released).
 The 3.0.x series will reach EOL on Jul 1, 2009.
 
 I expect that 3.2.x will be moved to maintenance mode as soon
 as 3.3.0 is released.

Yes that had been decided exactly like this.

 maintenance == only critical bug fixes and security issues
 
 What we've not stated is how long it would be until v3.2.x
 reaches EOL.  Based on past data, I expect 6 - 12 months, but
 that is just a guess and not really up to me.

If I am not completely wrong, this had been decided as well
as follows: A release will reach EOL when the next release
goes into maintenance mode, i.e. when the second next release
comes out. With the aimed release cycle of 6 months, this means
that each release will go into maintenance mode after 6 months
and reach EOL anonther 6 months later. Example: 3.2 will go into
maintenance mode in december 2008, when 3.3 is scheduled for
release, and 3.2 will reach EOL around June 2009 (?) when 3.4 is
scheduled.

At least that is what Karolin had proposed and as far as I
remember at least noone had objected. (Time will tell if the
workload is manageable with such a tight release cycle.)

Please correct me if I am mistaken.

 If I were packaging Samba, I would only focus on the latest
 production release.

Exactly.

Of course it makes sense to try and package the pre-releases of
the next release to see in time whether packaging will require 
adaptions. The pre-release phase is supposed to start roughly half
way through the 6 months period.

Cheers - Michael

-- 
Michael Adam [EMAIL PROTECTED]
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE


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

[Samba] Tool to change password for samba users

2008-10-22 Thread Lunix1618

Hi,

I am looking for a tool that can permit user change their samba 
password, is any tool like an web based application? my users running 
Windows XP so web application is only a choice.


thanks for the hint.
regards,

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


Re: [Samba] Tool to change password for samba users

2008-10-22 Thread Volker Lendecke
On Wed, Oct 22, 2008 at 01:55:55PM +0700, Lunix1618 wrote:
 I am looking for a tool that can permit user change their samba 
 password, is any tool like an web based application? my users running 
 Windows XP so web application is only a choice.

That's built into Windows: Type ctrl-alt-del, change
password, type in either your domain name or the Samba
server's name into the domain field, old password, new
password, and you're done.

Volker


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

Re: [Samba] Tool to change password for samba users

2008-10-22 Thread Lunix1618

Volker Lendecke wrote:

That's built into Windows: Type ctrl-alt-del, change
password, type in either your domain name or the Samba
server's name into the domain field, old password, new
password, and you're done.

  

Thanks, another question:
How to make samba password sync. with Unix account? my samba server is 
3.0.28 running on CentOS 5.2

regards.

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


Re: [Samba] Tool to change password for samba users

2008-10-22 Thread Volker Lendecke
On Wed, Oct 22, 2008 at 03:16:51PM +0700, Lunix1618 wrote:
 Thanks, another question:
 How to make samba password sync. with Unix account? my samba server is 
 3.0.28 running on CentOS 5.2
 regards.

Look at the unix password sync and passwd program
parameters.

Volker


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

[Samba] Multiple domains on the same subnet

2008-10-22 Thread Clifford W. Hansen
I have asked Uncle Google to no avail, probibly asking the wrong question.

We are wanting to migrate from an Active Directory to a Samba Domain, I have 
setup the samba domain and it seems to be working (from the local machine).

But this domain cannot be seen from any of the windows boxen. Is there 
something I need to do to get the windows boxen to see this domain?

The AD Domain is EXAMPLE / example.local.uk

smb.conf
[global]
## Browsing/Identification ###
   workgroup = TESTEXAMPLE
   server string = %h server
   wins support = yes
   dns proxy = no
 Networking 
   interfaces = eth0
   bind interfaces only = true
 Debugging/Accounting 
   log file = /var/log/samba/log.%m
   max log size = 1000
   panic action = /usr/share/samba/panic-action %d
### Authentication ###
   security = user
   encrypt passwords = true
   passdb backend = ldapsam:ldap://localhost/

   ldap admin dn = cn=admin,dc=example,dc=lan
   ldap suffix = dc=example, dc=lan
   ldap group suffix = ou=Groups
   ldap user suffix = ou=Users
   ldap machine suffix = ou=Computers
   ldap idmap suffix = ou=Users

   ldap passwd sync = Yes
   ldap delete dn = Yes

   add user script = /usr/sbin/smbldap-useradd -m %u
   delete user script = /usr/sbin/smbldap-userdel %u
   add machine script = /usr/sbin/smbldap-useradd -w %u
   add group script = /usr/sbin/smbldap-groupadd -p %g
   delete group script = /usr/sbin/smbldap-groupdel %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

   obey pam restrictions = no
   passwd program = /usr/sbin/smbldap-passwd %u
   passwd chat = *New*password* %n\n *Retype*new*password* %n\n 
*all*authentication*tokens*updated*

## Domains ###
   domain logons = yes
   logon path = \\%L\profiles\%U
   logon drive = H:
   logon home = \\%L\%U
   logon script = logon.bat
## Printing ##
   load printers = yes
   printing = cups
   printcap name = cups
 Misc 
   socket options = TCP_NODELAY
   domain master = yes
## Share Definitions #
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   guest ok = yes
   writable = no
   share modes = no
[profiles]
   comment = Users profiles
   path = /home/samba/profiles
   read only = no
   guest ok = no
   browseable = no
   create mask = 0600
   directory mask = 0700
   hide files = /.*/desktop.ini/NTUSER.*/outlook*.lnk/*Briefcase*/Thumbs.db/
   root preexec = /usr/local/bin/samba-mkprofiledir %U %G
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   public = no
   writable = no
   create mode = 0700
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
/smb.conf

I have also tried this with two samba domains (in a VM enviroment) and windows 
only see's the first domain that it was attached to.

What am I doing wrong...
-- 
Thank you,

Clifford W. Hansen
PHP Developer / Linux Administrator

(Cell)+27 82 883 8677
(Fax) +27 86 503 0634
(E-Mail)  [EMAIL PROTECTED]
(MSN) [EMAIL PROTECTED]
(GPG) 0x936D6C19

We have seen strange things today!

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments


signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Multiple IP addresses in DNS record

2008-10-22 Thread Jarrod Hyder
On Tue, Oct 21, 2008 at 8:17 PM, Frank Gruman [EMAIL PROTECTED] wrote:

  On Tue, 2008-10-21 at 13:34 -0400, Jarrod Hyder wrote:

 I have a samba server running on Linux that has two ethernet cards (eth0 
 eth1) that are bonded into a single virtual interface (bond0). This virtual
 interface is connected to the corporate LAN and I have another ethernet card
 (eth2) that is connected to another server that is used for making
 incremental backups. The problem that I am having is that no matter what I
 do, the command net ads dns register -P' causes both the bond0 and eth2 IP
 addresses to show up in the DNS record on the corporate domain controller.

 I have tried to force samba and winbind to use interface = bond0 and
 bind interfaces only = yes and it doesn't seem to help this situation.

 If anyone can shed some light on what I am doing wrong, I would really
 appreciate it.

 BTW, I am using samba 3.0.28a

 --
 Jarrod [EMAIL PROTECTED]


 Jarrod,

 Not sure how much help I can be, but give this a try - add the -d # flag to
 your 'net ads dns ...' command where # can be something up to 10 (more debug
 output).  This can at the very least confirm the smb.conf file being read as
 well as perhaps point you in a better direction.  If nothing else, posted
 the somewhat cleansed output here; it may help others here to see where your
 problem lies.


  Regards,
 Frank


Frank,

Here is the debug output of net ads dns register -P -d 10. I can't really
make heads or tails of it, but I also don't see either of the IP addresses
that are getting registered on the domain. If you could take a look at it I
would really appreciate it.

Thanks,

--
Jarrod Hyder
[EMAIL PROTECTED]
[2008/10/22 07:46:06, 5] lib/debug.c:debug_dump_status(391)
  INFO: Current debug levels:
all: True/10
tdb: False/0
printdrivers: False/0
lanman: False/0
smb: False/0
rpc_parse: False/0
rpc_srv: False/0
rpc_cli: False/0
passdb: False/0
sam: False/0
auth: False/0
winbind: False/0
vfs: False/0
idmap: False/0
quota: False/0
acls: False/0
locking: False/0
msdfs: False/0
dmapi: False/0
[2008/10/22 07:46:06, 3] param/loadparm.c:lp_load(5064)
  lp_load: refreshing parameters
[2008/10/22 07:46:06, 3] param/loadparm.c:init_globals(1440)
  Initialising global parameters
[2008/10/22 07:46:06, 3] param/params.c:pm_process(572)
  params.c:pm_process() - Processing configuration file /etc/samba/smb.conf
[2008/10/22 07:46:06, 3] param/loadparm.c:do_section(3803)
  Processing section [global]
  doing parameter winbind offline logon = yes
  doing parameter interfaces = bond0
  doing parameter bind interfaces only = yes
  doing parameter idmap gid = 1-50
  doing parameter socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 IPT
OS_LOWDELAY SO_KEEPALIVE
  doing parameter wins server = XXX.XXX.XXX.XXX
  doing parameter domain master = No
  doing parameter realm = DOMAIN.COM
  doing parameter veto files = /.undelete/.*/
  doing parameter template shell = /bin/bash
  doing parameter unix extensions = No
  doing parameter unix password sync = Yes
  doing parameter server string = Engineering file server
  doing parameter idmap uid = 1-50
  doing parameter password server = XXX.XXX.XXX.XXX
  doing parameter local master = No
  doing parameter template homedir = /home/shares/cal_homes/%U
  doing parameter workgroup = DOMAIN1
  doing parameter valid users = @DOMAIN1+Domain Users, @DOMAIN2+Domain Users
  doing parameter security = ADS
  doing parameter preferred master = No
  doing parameter winbind separator = +
  doing parameter winbind cache time = 21600
  doing parameter winbind refresh tickets = Yes
  doing parameter idmap cache time = 21600
  doing parameter log level = 1
  doing parameter keepalive = 60
[2008/10/22 07:46:06, 4] param/loadparm.c:lp_load(5095)
  pm_process() returned Yes
[2008/10/22 07:46:06, 7] param/loadparm.c:lp_servicenumber(5233)
  lp_servicenumber: couldn't find homes
[2008/10/22 07:46:06, 10] param/loadparm.c:set_server_role(4339)
  set_server_role: role = ROLE_DOMAIN_MEMBER
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register new charset UCS-2LE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(113)
  Registered charset UCS-2LE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register new charset UTF-16LE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(113)
  Registered charset UTF-16LE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register new charset UCS-2BE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(113)
  Registered charset UCS-2BE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register new charset UTF-16BE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(113)
  Registered charset UTF-16BE
[2008/10/22 07:46:06, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register 

Re: [Samba] Multiple IP addresses in DNS record

2008-10-22 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jarrod Hyder wrote:

 Here is the debug output of net ads dns register -P -d 10. I can't really
 make heads or tails of it, but I also don't see either of the IP addresses
 that are getting registered on the domain. If you could take a look at it I
 would really appreciate it.

I fixed a bug recently that prevently :net ads dns register from
honoring the interfaces line in smb.conf.  The fixed only went
in to the v3.2 and later branches.  If you need a backport to the 3.0
tree, let me know.




cheer,s jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI/yaUIR7qMdg1EfYRArWFAKDUbRvPLVz7e70/S9HRcz/1f1wJsgCgp3Qf
ZZ/rUYun154UpKG6uCTKL30=
=aK5G
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba 3.2, Samba 3.3 release planning

2008-10-22 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael Adam wrote:

 If I am not completely wrong, this had been decided as well
 as follows: A release will reach EOL when the next release
 goes into maintenance mode, i.e. when the second next release
 comes out. With the aimed release cycle of 6 months, this means
 that each release will go into maintenance mode after 6 months
 and reach EOL anonther 6 months later. Example: 3.2 will go into
 maintenance mode in december 2008, when 3.3sdcheduled for
 release, and 3.2 will reach EOL around June 2009 (?) when 3.4 is
 scheduled.
 
 At least that is what Karolin had proposed and as far as I
 remember at least noone had objected. (Time will tell if the
 workload is manageable with such a tight release cycle.)

Thanks.  I couldn't remember if the maintenance release window had
been decided.



cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI/ycXIR7qMdg1EfYRAk1rAKDfxnOBQ7DSslc45gw6afCswf+0JACg50EH
O03EupUOz1yHNw2l5jGECrw=
=XU3u
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: Bad passwords from Vampire / NT migration

2008-10-22 Thread Cooper S. Blake
 Can anyone tell me why net rpc samdump gets the correct LM and NT
 password hashes, but net rpc vampire gets incorrect hashes?  What's
 funny is that vampire seems to produce consistent results, but
 they're consistently wrong.
 
 Is it possible that the NT PDC doesn't trust the Samba server so
 it gives it bad hashes?

I have a few more comments.
1. net rpc vampire does not set the machine or domain SID.  This has
to be done manually using net setlocalsid and net setdomainsid.
Calling net rpc getsid appears to work but does not change anything.
I have seen multiple other people with this same problem going back
a couple years, so it appears to be a longstanding bug.

2. I checked the event log on the Windows NT PDC.  It's interesting
because each time I run the vampire command, it logs 2 or 5 5722
events in a row (the error is that the session setup from my samba
BDC failed to authenticate with the error Access is denied.)  This
error is indicating an invalid machine password from Samba.

Then immediately after the error messages I get two 5713 events,
indicating that the full synchronization request from the BDC
completed successfully.  The first event refers to over 100 objects
and the second event refers to a much smaller number.  So despite
the 5722 error, everything synchronizes.

3. The only evidence of any problem from the vampire command is the
events logged on the PDC, and the invalid passwords.  I tried
deleting the trust account on the PDC and rejoining several times,
with Samba on, off, and nmbd on and off.  The result is always the
same.  The bad password hashes are always the same for each account.
If I change a password on the PDC then run vampire again, the NT
hash changes on the Samba box.  It just seems like the NT hash is
somehow being scrambled, but in a consistent way.

4. It does not seem to matter if I create the BDC trust account on
the PDC using Server Manager, or whether I just join the domain
using net rpc join.  The former step seems unncessary.

5. Here is the stderr output from the vampire command:
[2008/10/20 21:08:23,  0] passdb/pdb_tdb.c:tdb_update_samacct_only(1117)

I did also save the debug level 10 output, but it really doesn't look
to contain anything interesting.

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


Re: [Samba] Multiple IP addresses in DNS record

2008-10-22 Thread Frank Gruman
On Wed, 2008-10-22 at 07:58 -0400, Jarrod Hyder wrote:

 On Tue, Oct 21, 2008 at 8:17 PM, Frank Gruman [EMAIL PROTECTED]
 wrote:
 
 
 On Tue, 2008-10-21 at 13:34 -0400, Jarrod Hyder wrote: 
 
  I have a samba server running on Linux that has two ethernet cards 
 (eth0 
  eth1) that are bonded into a single virtual interface (bond0). This 
 virtual
  interface is connected to the corporate LAN and I have another 
 ethernet card
  (eth2) that is connected to another server that is used for making
  incremental backups. The problem that I am having is that no matter 
 what I
  do, the command net ads dns register -P' causes both the bond0 and 
 eth2 IP
  addresses to show up in the DNS record on the corporate domain 
 controller.
  
  I have tried to force samba and winbind to use interface = bond0 
 and
  bind interfaces only = yes and it doesn't seem to help this 
 situation.
  
  If anyone can shed some light on what I am doing wrong, I would 
 really
  appreciate it.
  
  BTW, I am using samba 3.0.28a
  
  --
  Jarrod Hyder
  [EMAIL PROTECTED]
 
 
 
 
 Jarrod,
 
 Not sure how much help I can be, but give this a try - add the
 -d # flag to your 'net ads dns ...' command where # can be
 something up to 10 (more debug output).  This can at the very
 least confirm the smb.conf file being read as well as perhaps
 point you in a better direction.  If nothing else, posted the
 somewhat cleansed output here; it may help others here to see
 where your problem lies.
 
 
 
 Regards,
 Frank
  
 Frank,
 
 Here is the debug output of net ads dns register -P -d 10. I can't
 really make heads or tails of it, but I also don't see either of the
 IP addresses that are getting registered on the domain. If you could
 take a look at it I would really appreciate it.
 
 Thanks,
 
 --
 Jarrod Hyder
 [EMAIL PROTECTED]
 
snip

 [2008/10/22 07:46:06, 5] lib/util.c:init_names(309)
   Netbios name list:-
   my_netbios_names[0]=SERVER
 [2008/10/22 07:46:06, 2] lib/interface.c:add_interface(81)
   added interface ip=xxx.yyy.xxx.yyy bcast=xxx.yyy.xxx.255 nmask=255.255.255.0
 [2008/10/22 07:46:06, 5] lib/gencache.c:gencache_init(61)
   Opening cache file at /var/lib/samba/gencache.tdb

/snip

Jarrod,

The above snip was the line I was looking for, and had been hoping to
see more than one line added.  Meanwhile, back at the ranch, I see that
Jerry has already responded that this was a bug that was fixed.

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


[Samba] Group-based shares

2008-10-22 Thread Fabiano Caixeta Duarte
Hi!

I have a samba share set like this:

[MyGroup]
path = /group/%g
browseable = yes
writable = yes
public = no
create mask = 0660
directory mask = 0770


That's how I avoid to have lots of shares set on smb.conf.

The problem is that some users have more than one group and need to access
every group share.

Is there a way of mapping shares for each user group?

Thanks!

-- 
Fabiano Caixeta Duarte
Especialista em Redes de Computadores
Linux User #195299
Ribeirão Preto - SP
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] samba performance degrade

2008-10-22 Thread vishesh

dear all
 I am using samba 3.0.28 on RHEl 5.2. I am using samba with winbind 
that authenticate window 2003 domain. From last few months samba was 
running properly. But today samba server performance badly, even 
sometime mapped drive on xp disappear. When i tried to connect samba 
shares, error appear server not available. Anyone suggest me what may be 
the problem. Why samba performance degrade after running around a month.


my configuration is as follows

#=== Global Settings 
=


[global]
#--authconfig--start-line--

# Generated by authconfig on 2008/09/04 22:25:21
# DO NOT EDIT THIS SECTION (delimited by --start-line--/--end-line--)
# Any modification may be deleted or altered by authconfig in future

  workgroup = abp
  password server = s2.abp.del
  realm = ABP.DEL
  security = ads
  idmap uid = 16777216-33554431
  idmap gid = 16777216-33554431
  template shell = /bin/bash
  winbind use default domain = true
  winbind offline logon = false
  winbind enum users = yes
  winbind enum groups = yes

#--authconfig--end-line--
server string =
netbios name = abpdel2
admin users = @abp\domain admins
# --- Network Related Options -
#


   passdb backend = tdbsam



map read only = no
;map system = no
;store dos attributes = yes
hide dot files = yes
veto files=/lost+found/Trash/Recycler
# Share Definitions 
==


;[homes]
;comment = Home Directories
;browseable = no
;writeable = yes
;valid users = %S
;valid users = MYDOMAIN\%S

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

# Un-comment the following and create the netlogon directory for Domain 
Logons

;[netlogon]
;comment = Network Logon Service
;path = /var/lib/samba/netlogon
;guest ok = yes
;writable = no
;share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;path = /var/lib/samba/profiles
;browseable = no
;guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the staff group
;[public]
;comment = Public Stuff
;path = /home/samba
;public = yes
;writable = yes
;printable = no
;write list = +staff

[design]
   comment = home folder for design department
   path = /data/design
   vfs object = recycle
   recycle:repository = /data/design/Trash
   recycle:keeptrace = Yes
   writeable = yes
   create mask = 644
   directory mask = 2755
[home]
   comment = home folder for bwedit
   path = /data/edit/home
   vfs object = recycle
   recycle:repository = /data/edit/home/Trash
   recycle:keeptrace = Yes
   writeable = yes
   create mask = 644
   directory mask = 2755

[user]
   comment =  home directory to tt feature and ab edit users
   path = /data/edit/user
   vfs object = recycle
   recycle:repository = /data/edit/user/Trash
   recycle:keeptrace = Yes
   writeable = yes
   create mask = 644
   directory mask = 2755
[mark]
   comment = marketting users
   path = /data/marketting
   vfs object = recycle
   vfs:repository = /data/marketting/Trash
   vfs:keeptrace = Yes
   writeable = yes
   create mask = 644
   directory mask = 2755

[system]
   comment = home folder for it
   path = /data/system
   vfs object = recycle
   recycle:repository = /data/system/Trash
   recycle:keeptrace = Yes
   writeable = yes

[com]
   path=/data/marketting/com
   vfs object = recycle
   recycle:repository = /data/marketting/Trash
   recycle:keeptrace = Yes
   writeable=yes

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


RE: [Samba] samba performance degrade

2008-10-22 Thread Hoover, Tony
have you ruled out a networking problem? (i.e. Switch didn't auto-neg to the
same speed/duplex settings as the server)? 


 
Tony Hoover, Network Administrator
KSU - Salina, College of Technology and Aviation
(785) 826-2660

Don't Blend in...


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
vishesh
Sent: Wednesday, October 22, 2008 4:55 PM
To: samba@lists.samba.org
Subject: [Samba] samba performance degrade

dear all
  I am using samba 3.0.28 on RHEl 5.2. I am using samba with winbind that
authenticate window 2003 domain. From last few months samba was running
properly. But today samba server performance badly, even sometime mapped
drive on xp disappear. When i tried to connect samba shares, error appear
server not available. Anyone suggest me what may be the problem. Why samba
performance degrade after running around a month.

my configuration is as follows

#=== Global Settings
=

[global]
#--authconfig--start-line--

# Generated by authconfig on 2008/09/04 22:25:21 # DO NOT EDIT THIS SECTION
(delimited by --start-line--/--end-line--) # Any modification may be deleted
or altered by authconfig in future

   workgroup = abp
   password server = s2.abp.del
   realm = ABP.DEL
   security = ads
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/bash
   winbind use default domain = true
   winbind offline logon = false
   winbind enum users = yes
   winbind enum groups = yes

#--authconfig--end-line--
server string =
netbios name = abpdel2
admin users = @abp\domain admins
# --- Network Related Options -
#


passdb backend = tdbsam



 map read only = no
;map system = no
;store dos attributes = yes
hide dot files = yes
veto files=/lost+found/Trash/Recycler
# Share Definitions
==

;[homes]
;comment = Home Directories
;browseable = no
;writeable = yes
;valid users = %S
;valid users = MYDOMAIN\%S

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

# Un-comment the following and create the netlogon directory for Domain
Logons
;[netlogon]
;comment = Network Logon Service
;path = /var/lib/samba/netlogon
;guest ok = yes
;writable = no
;share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;path = /var/lib/samba/profiles
;browseable = no
;guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the staff group
;[public]
;comment = Public Stuff
;path = /home/samba
;public = yes
;writable = yes
;printable = no
;write list = +staff

[design]
comment = home folder for design department
path = /data/design
vfs object = recycle
recycle:repository = /data/design/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755
[home]
comment = home folder for bwedit
path = /data/edit/home
vfs object = recycle
recycle:repository = /data/edit/home/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755

[user]
comment =  home directory to tt feature and ab edit users
path = /data/edit/user
vfs object = recycle
recycle:repository = /data/edit/user/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755
[mark]
comment = marketting users
path = /data/marketting
vfs object = recycle
vfs:repository = /data/marketting/Trash
vfs:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755

[system]
comment = home folder for it
path = /data/system
vfs object = recycle
recycle:repository = /data/system/Trash
recycle:keeptrace = Yes
writeable = yes

[com]
path=/data/marketting/com
vfs object = recycle
recycle:repository = /data/marketting/Trash
recycle:keeptrace = Yes
writeable=yes

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


Re: [Samba] Samba 3.2, Samba 3.3 release planning

2008-10-22 Thread Christian Perrier
Quoting Michael Adam ([EMAIL PROTECTED]):

 If I am not completely wrong, this had been decided as well
 as follows: A release will reach EOL when the next release
 goes into maintenance mode, i.e. when the second next release
 comes out. With the aimed release cycle of 6 months, this means
 that each release will go into maintenance mode after 6 months
 and reach EOL anonther 6 months later. Example: 3.2 will go into
 maintenance mode in december 2008, when 3.3 is scheduled for
 release, and 3.2 will reach EOL around June 2009 (?) when 3.4 is
 scheduled.
 
 At least that is what Karolin had proposed and as far as I
 remember at least noone had objected. (Time will tell if the
 workload is manageable with such a tight release cycle.)


have you folks settled on a security support maintenance window,
i.e. having some kind of commitment to try supporting security patches
for releases that are no longer in maintenance mode.

You see where I'm going, I think: what will happen if security issues
are discovered after June 2009 ? Is there a chance that, at least in a
best effort mode, some patches are provided for 3.2.* series?


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


Re: [Samba] Samba 3.2, Samba 3.3 release planning

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 06:35:50PM +0200, Christian Perrier wrote:
 Quoting Michael Adam ([EMAIL PROTECTED]):
 
  If I am not completely wrong, this had been decided as well
  as follows: A release will reach EOL when the next release
  goes into maintenance mode, i.e. when the second next release
  comes out. With the aimed release cycle of 6 months, this means
  that each release will go into maintenance mode after 6 months
  and reach EOL anonther 6 months later. Example: 3.2 will go into
  maintenance mode in december 2008, when 3.3 is scheduled for
  release, and 3.2 will reach EOL around June 2009 (?) when 3.4 is
  scheduled.
  
  At least that is what Karolin had proposed and as far as I
  remember at least noone had objected. (Time will tell if the
  workload is manageable with such a tight release cycle.)
 
 
 have you folks settled on a security support maintenance window,
 i.e. having some kind of commitment to try supporting security patches
 for releases that are no longer in maintenance mode.
 
 You see where I'm going, I think: what will happen if security issues
 are discovered after June 2009 ? Is there a chance that, at least in a
 best effort mode, some patches are provided for 3.2.* series?

Yes, I think it's reasonable to provide security patches for
a year after release, and I'll commit (personally) to doing
that.

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


Re: [Samba] BUG: Bad passwords from Vampire / NT migration

2008-10-22 Thread Cooper S. Blake
 3. The only evidence of any problem from the vampire command is the
 events logged on the PDC, and the invalid passwords.  I tried
 deleting the trust account on the PDC and rejoining several times,
 with Samba on, off, and nmbd on and off.  The result is always the
 same.  The bad password hashes are always the same for each account.
 If I change a password on the PDC then run vampire again, the NT
 hash changes on the Samba box.  It just seems like the NT hash is
 somehow being scrambled, but in a consistent way.

I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208 if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
 209 sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211 }
 212 
 213 if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
 214 sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields.

Can someone confirm that these are bugs?  Both should be extremely
easy to fix, and so hopefully would make it into the 3.2 and 3.3
branches.

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


[Samba] file and directory permissions?

2008-10-22 Thread Daniel Mader
Hello, 

we have a SLES 10SP2 setup with some collaboration shares distributed with 
Samba. In order to make sure files and folders on these shares are readable 
*and* writeable, the shares typically look like this:

[public]
path = /home/01_public
create mask = 740
directory mask = 750
force create mode = 220
force directory mode = 770
force group = optiker
read list = zhang, @optiker
write list = @optiker

With this, we want to have new or copied files to get -rw-rw and new or 
copied folders to get drwxrwx---.

This works OK for the Windows clients but the unixlike clients (Linux and 
MacOSX) write files with -rwxrw-r--, which is a little different from what we 
expect. Folders are allright.

The file creation works for Linux and Mac boxes, too, when the global option 
unix extensions = no is set. Yet, this leads to some unwanted behavior on 
the unixoid clients: they can no longer see who created a file, and what the 
actual permissions really are...

So, the question is: how can we make sure that files and folders are created 
with certain permissions for all client platforms, and without disabling unix 
extensions?

Also, it does not help to use ACLs on the share parent folders since the file 
permissions are the same as above, then...

Any help is deeply appreciated!


What follows is the global section of the smb.conf, just in case.

[global]
add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody 
-s 
/bin/false %m$
domain logons = Yes
domain master = Yes
hide dot files = yes
hide special files = yes
hosts allow = 127.0.0.1 192.168.173.0/24 132.230.0.0/16
hosts deny = 0.0.0.0/0
idmap backend = ldap:ldap://127.0.0.1
ldap admin dn = cn=moadmin,dc=micro-optics,dc=uni
ldap delete dn = No
ldap group suffix = ou=gruppen
ldap idmap suffix = ou=Idmap
ldap machine suffix = ou=Machines
ldap passwd sync = Yes
ldap replication sleep = 1000
ldap ssl = Start_tls
ldap suffix = dc=micro-optics,dc=uni
ldap timeout = 5
ldap user suffix = ou=nutzer
local master = Yes
log level = 3
logon drive = L:
logon path = \\%L\%U\_msprofile
logon script = logon.bat
netbios name = rioja
os level = 65
passdb backend = ldapsam:ldap://127.0.0.1
preferred master = Yes
security = user
#   unix extensions = no
wins support = Yes
workgroup = micro-optics

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
write list = root
browsable = no
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] BUG: Bad passwords from Vampire / NT migration

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 11:48:51AM -0700, Cooper S. Blake wrote:
  3. The only evidence of any problem from the vampire command is the
  events logged on the PDC, and the invalid passwords.  I tried
  deleting the trust account on the PDC and rejoining several times,
  with Samba on, off, and nmbd on and off.  The result is always the
  same.  The bad password hashes are always the same for each account.
  If I change a password on the PDC then run vampire again, the NT
  hash changes on the Samba box.  It just seems like the NT hash is
  somehow being scrambled, but in a consistent way.
 
 I believe I have found two bugs in the 3.2 code and one bug that
 carried on to the 3.3 branch.  In the 3.2 code, everything is
 located in the utils/net_rpc_samsync.c file.  What I believe is the
 first problem is that fetch_database() is calling
 samsync_fix_delta_array() with rid_crypt set to true, which means
 the password hashes are unencrypted from the RID encryption.
 However, I believe this call is redundant, and the corresponding
 call for samdump has rid_crypt set to false.  So I think the
 rid_crypt param should be false in fetch_database().
 
 If you follow the code, it makes its way to sam_account_from_delta()
 where the password hashes are decrypted a second time by calling
 sam_pwd_hash().  I believe this is what is scrambling my passwords.
 
 These methods were refactored somewhere in the 3.3 branch.  Now the
 net_rpc_samsync.c class calls rpc_vampire_internals, which calls
 libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
 rid_crypt always set to false.  I think that's correct.  But the
 second bug has carried through in the sam_account_from_delta()
 function:
 
  208 if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
  209 sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
  210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
  211 }
  212 
  213 if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
  214 sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
  215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);
 
 If you look closely you'll see that the nt hash is going into the
 lm_passwd variable and the decrypted value is being set in the lanman
 hash, and the lanman hash is being decrypted and put into the nt hash
 field.  So the LanMan and NT hashes look like they're being put in
 the opposite fields.
 
 Can someone confirm that these are bugs?  Both should be extremely
 easy to fix, and so hopefully would make it into the 3.2 and 3.3
 branches.

Great catch. Both look valid to me. I think the best fix for
3.2 is to always set rid_crypt to true, and remove all the
other sam_pwd_hash() calls - just do it in the one place.

Ok, here is a quick patch for 3.2. It removes some silly
static buffers and changes all calls to samsync_fix_delta_array()
to set rid_crypt = true and then removes all the extra
crypto sam_pwd_hash() calls that are no longer needed.

Can you confirm it works for you and I'll check it in
with your credit, and then fix 3.3 and master in the
same way.

Thanks a *LOT*,

Jeremy.
diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c
index 13a7bce..010624e 100644
--- a/source/utils/net_rpc_samsync.c
+++ b/source/utils/net_rpc_samsync.c
@@ -65,21 +65,19 @@ static void display_account_info(uint32_t rid,
 struct netr_DELTA_USER *r)
 {
fstring hex_nt_passwd, hex_lm_passwd;
-   uchar lm_passwd[16], nt_passwd[16];
-   static uchar zero_buf[16];
+   uchar zero_buf[16];
 
+   memset(zero_buf, '\0', sizeof(zero_buf));
/* Decode hashes from password hash (if they are not NULL) */
 
if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-lmpassword.hash, lm_passwd, 0);
-   pdb_sethexpwd(hex_lm_passwd, lm_passwd, r-acct_flags);
+   pdb_sethexpwd(hex_lm_passwd, r-lmpassword.hash, r-acct_flags);
} else {
pdb_sethexpwd(hex_lm_passwd, NULL, 0);
}
 
if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-ntpassword.hash, nt_passwd, 0);
-   pdb_sethexpwd(hex_nt_passwd, nt_passwd, r-acct_flags);
+   pdb_sethexpwd(hex_nt_passwd, r-ntpassword.hash, r-acct_flags);
} else {
pdb_sethexpwd(hex_nt_passwd, NULL, 0);
}
@@ -391,7 +389,7 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd,
 
samsync_fix_delta_array(mem_ctx,
session_key,
-   false,
+   true,
database_id,
delta_enum_array);
 
@@ -466,8 +464,9 @@ static NTSTATUS sam_account_from_delta(struct samu *account,
 {
const char *old_string, 

Re: [Samba] BUG: Bad passwords from Vampire / NT migration

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 12:15:00PM -0700, Jeremy Allison wrote:

 Great catch. Both look valid to me. I think the best fix for
 3.2 is to always set rid_crypt to true, and remove all the
 other sam_pwd_hash() calls - just do it in the one place.
 
 Ok, here is a quick patch for 3.2. It removes some silly
 static buffers and changes all calls to samsync_fix_delta_array()
 to set rid_crypt = true and then removes all the extra
 crypto sam_pwd_hash() calls that are no longer needed.
 
 Can you confirm it works for you and I'll check it in
 with your credit, and then fix 3.3 and master in the
 same way.

Sorry, missed the ntpasswd -- lmpasswd swap.

Here's the correct version for 3.2.

Jeremy.
diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c
index 13a7bce..9ab3a59 100644
--- a/source/utils/net_rpc_samsync.c
+++ b/source/utils/net_rpc_samsync.c
@@ -65,21 +65,19 @@ static void display_account_info(uint32_t rid,
 struct netr_DELTA_USER *r)
 {
fstring hex_nt_passwd, hex_lm_passwd;
-   uchar lm_passwd[16], nt_passwd[16];
-   static uchar zero_buf[16];
+   uchar zero_buf[16];
 
+   memset(zero_buf, '\0', sizeof(zero_buf));
/* Decode hashes from password hash (if they are not NULL) */
 
if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-lmpassword.hash, lm_passwd, 0);
-   pdb_sethexpwd(hex_lm_passwd, lm_passwd, r-acct_flags);
+   pdb_sethexpwd(hex_lm_passwd, r-lmpassword.hash, r-acct_flags);
} else {
pdb_sethexpwd(hex_lm_passwd, NULL, 0);
}
 
if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-ntpassword.hash, nt_passwd, 0);
-   pdb_sethexpwd(hex_nt_passwd, nt_passwd, r-acct_flags);
+   pdb_sethexpwd(hex_nt_passwd, r-ntpassword.hash, r-acct_flags);
} else {
pdb_sethexpwd(hex_nt_passwd, NULL, 0);
}
@@ -391,7 +389,7 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd,
 
samsync_fix_delta_array(mem_ctx,
session_key,
-   false,
+   true,
database_id,
delta_enum_array);
 
@@ -466,8 +464,9 @@ static NTSTATUS sam_account_from_delta(struct samu *account,
 {
const char *old_string, *new_string;
time_t unix_time, stored_time;
-   uchar lm_passwd[16], nt_passwd[16];
-   static uchar zero_buf[16];
+   uchar zero_buf[16];
+
+   memset(zero_buf, '\0', sizeof(zero_buf));
 
/* Username, fullname, home dir, dir drive, logon script, acct
   desc, workstations, profile. */
@@ -631,14 +630,12 @@ static NTSTATUS sam_account_from_delta(struct samu 
*account,
   think this channel is secure enough - don't set the passwords at all
   in that case
*/
-   if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
-   pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
+   if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
+   pdb_set_lanman_passwd(account, r-lmpassword.hash, PDB_CHANGED);
}
 
-   if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
-   pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);
+   if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
+   pdb_set_nt_passwd(account, r-ntpassword.hash, PDB_CHANGED);
}
 
/* TODO: account expiry time */
@@ -1755,15 +1752,16 @@ static NTSTATUS fetch_account_info_to_ldif(struct 
netr_DELTA_USER *r,
fstring username, logonscript, homedrive, homepath = , homedir = ;
fstring hex_nt_passwd, hex_lm_passwd;
fstring description, profilepath, fullname, sambaSID;
-   uchar lm_passwd[16], nt_passwd[16];
char *flags, *user_rdn;
const char *ou;
const char* nopasswd = ;
-   static uchar zero_buf[16];
+   uchar zero_buf[16];
uint32 rid = 0, group_rid = 0, gidNumber = 0;
time_t unix_time;
int i;
 
+   memset(zero_buf, '\0', sizeof(zero_buf));
+
/* Get the username */
fstrcpy(username, r-account_name.string);
 
@@ -1808,14 +1806,12 @@ static NTSTATUS fetch_account_info_to_ldif(struct 
netr_DELTA_USER *r,
 
/* Get lm and nt password data */
if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
-   sam_pwd_hash(r-rid, r-lmpassword.hash, lm_passwd, 0);
-   pdb_sethexpwd(hex_lm_passwd, lm_passwd, r-acct_flags);
+   pdb_sethexpwd(hex_lm_passwd, r-lmpassword.hash, r-acct_flags);
} else {

Re: [Samba] BUG: Bad passwords from Vampire / NT migration

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 12:34:48PM -0700, Jeremy Allison wrote:
 On Wed, Oct 22, 2008 at 12:15:00PM -0700, Jeremy Allison wrote:
 
  Great catch. Both look valid to me. I think the best fix for
  3.2 is to always set rid_crypt to true, and remove all the
  other sam_pwd_hash() calls - just do it in the one place.
  
  Ok, here is a quick patch for 3.2. It removes some silly
  static buffers and changes all calls to samsync_fix_delta_array()
  to set rid_crypt = true and then removes all the extra
  crypto sam_pwd_hash() calls that are no longer needed.
  
  Can you confirm it works for you and I'll check it in
  with your credit, and then fix 3.3 and master in the
  same way.
 
 Sorry, missed the ntpasswd -- lmpasswd swap.
 
 Here's the correct version for 3.2.

Ok, third time lucky :-). As we're always using
rid_crypt = true, remove the argument. Also cope
with detecting the zero'ed nt and lm passwords
at the correct place (before the sam_pwd_hash()
call).

3.2 patch (final :-).

Jeremy.
diff --git a/source/libnet/libnet_samsync.c b/source/libnet/libnet_samsync.c
index 61d53c3..8a14338 100644
--- a/source/libnet/libnet_samsync.c
+++ b/source/libnet/libnet_samsync.c
@@ -32,7 +32,6 @@
 
 static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
 DATA_BLOB *session_key,
-bool rid_crypt,
 enum netr_SamDatabaseID database_id,
 struct netr_DELTA_ENUM *delta)
 {
@@ -41,17 +40,29 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
struct netr_DELTA_USER *user = delta-delta_union.user;
struct samr_Password lm_hash;
struct samr_Password nt_hash;
+   unsigned char zero_buf[16];
 
-   if (rid_crypt) {
-   if (user-lm_password_present) {
+   memset(zero_buf, '\0', sizeof(zero_buf));
+
+   /* Note that win2000 may send us all zeros
+* for the hashes if it doesn't
+* think this channel is secure enough. */
+   if (user-lm_password_present) {
+   if (memcmp(user-lmpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-lmpassword.hash, lm_hash.hash, 
0);
-   user-lmpassword = lm_hash;
+   } else {
+   memset(lm_hash.hash, '\0', sizeof(lm_hash.hash));
}
+   user-lmpassword = lm_hash;
+   }
 
-   if (user-nt_password_present) {
+   if (user-nt_password_present) {
+   if (memcmp(user-ntpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-ntpassword.hash, nt_hash.hash, 
0);
-   user-ntpassword = nt_hash;
+   } else {
+   memset(nt_hash.hash, '\0', sizeof(nt_hash.hash));
}
+   user-ntpassword = nt_hash;
}
 
if (user-user_private_info.SensitiveData) {
@@ -71,26 +82,31 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
return ndr_map_error2ntstatus(ndr_err);
}
 
+   /* Note that win2000 may send us all zeros
+* for the hashes if it doesn't
+* think this channel is secure enough. */
if (keys.keys.keys2.lmpassword.length == 16) {
-   if (rid_crypt) {
+   if (memcmp(keys.keys.keys2.lmpassword.pwd.hash,
+   zero_buf, 16) != 0) {
sam_pwd_hash(rid,
 
keys.keys.keys2.lmpassword.pwd.hash,
 lm_hash.hash, 0);
-   user-lmpassword = lm_hash;
} else {
-   user-lmpassword = 
keys.keys.keys2.lmpassword.pwd;
+   memset(lm_hash.hash, '\0', 
sizeof(lm_hash.hash));
}
+   user-lmpassword = lm_hash;
user-lm_password_present = true;
}
if (keys.keys.keys2.ntpassword.length == 16) {
-   if (rid_crypt) {
+   if (memcmp(keys.keys.keys2.ntpassword.pwd.hash,
+   zero_buf, 16) != 0) {
sam_pwd_hash(rid,
-
keys.keys.keys2.ntpassword.pwd.hash,
-nt_hash.hash, 0);
-   user-ntpassword = nt_hash;
+   keys.keys.keys2.ntpassword.pwd.hash,
+   nt_hash.hash, 0);
} else {
-   user-ntpassword = 
keys.keys.keys2.ntpassword.pwd;
+   memset(nt_hash.hash, '\0', 
sizeof(nt_hash.hash));
}
+   user-ntpassword = nt_hash;

[Samba] Re: Bad passwords from Vampire / NT migration

2008-10-22 Thread Cooper S. Blake
 Great catch. Both look valid to me. I think the best fix for
 3.2 is to always set rid_crypt to true, and remove all the
 other sam_pwd_hash() calls - just do it in the one place.
 
 Ok, here is a quick patch for 3.2. It removes some silly
 static buffers and changes all calls to samsync_fix_delta_array()
 to set rid_crypt = true and then removes all the extra
 crypto sam_pwd_hash() calls that are no longer needed.
 
 Can you confirm it works for you and I'll check it in
 with your credit, and then fix 3.3 and master in the
 same way.
 
 Thanks a *LOT*,
 
 Jeremy.

Thanks for taking a look.  Unfortunately I'm not really setup to
verify the patch or compile the code, as I was just browsing through
the git repositories over the web to try to find the problem.

My current setup is Fedora 9 using packages.  Maybe in the next few
days I can work on downloading and building the 3.2 branch and
trying the fix.  I'm still confused about why my vampire would
result in the LM hash being null but the NT hash being set, but
hopefully this will take care of it.

In either case I will post results if I can get it running.

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


Re: [Samba] Re: Bad passwords from Vampire / NT migration

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 01:53:02PM -0700, Cooper S. Blake wrote:

 Thanks for taking a look.  Unfortunately I'm not really setup to
 verify the patch or compile the code, as I was just browsing through
 the git repositories over the web to try to find the problem.
 
 My current setup is Fedora 9 using packages.  Maybe in the next few
 days I can work on downloading and building the 3.2 branch and
 trying the fix.  I'm still confused about why my vampire would
 result in the LM hash being null but the NT hash being set, but
 hopefully this will take care of it.
 
 In either case I will post results if I can get it running.

Ok, I've pushed the third versino into the git repositories,
so if you can confirm the fix I'd appreciate it.

Thanks a *LOT* for that bug report - absolutely perfect !

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


[Samba] smbd high cpu load

2008-10-22 Thread Wayne Cochran
We have a Linux file server for a set of computer science and  
engineering

labs where each lab contains machines running Mac OS X, Ubuntu Linux,
or some incarnation of Windows. At times the these machines become
almost unusable and I think I have narrowed the problem to smbd  
processes

soaking up all the CPU on the server. Running 'top' on the server
reveals a dozen or so entries like the following:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
18229 millerbr  20   0 12420 3980 2992 R   26  0.1   0:03.85 smbd
18225 tande820   0 12380 3564 2660 S   22  0.1   1:00.19 smbd
18861 dhenniga  20   0 12676 4316 3328 R7  0.1   0:01.86 smbd
18210 samcprui  20   0 12616 4064 3128 S3  0.1   0:55.84 smbd
18214 mlhorn20   0 12568 3912 3060 S3  0.1   0:25.23 smbd
18867 tsze  20   0 12784 4656 3592 S3  0.1   0:10.28 smbd
18728 daflores  20   0 12684 4560 3516 S2  0.1   0:35.44 smbd
18678 twharris  20   0 12780 4556 3552 S1  0.1   0:11.35 smbd
...

Looking through the log files reveals nothing obvious at first glance,  
but of course

I am not sure what to look for and there are a lot of log files.

What steps should I first take to debug the situation?

Thanks for any and all help.

--w

Wayne O. Cochran
Clinical Assistant Professor, Computer Science
Washington State University Vancouver
[EMAIL PROTECTED]
http://ezekiel.vancouver.wsu.edu/~wayne




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


Re: [Samba] smbd high cpu load

2008-10-22 Thread Jeremy Allison
On Wed, Oct 22, 2008 at 03:27:10PM -0700, Wayne Cochran wrote:
 We have a Linux file server for a set of computer science and  
 engineering
 labs where each lab contains machines running Mac OS X, Ubuntu Linux,
 or some incarnation of Windows. At times the these machines become
 almost unusable and I think I have narrowed the problem to smbd  
 processes
 soaking up all the CPU on the server. Running 'top' on the server
 reveals a dozen or so entries like the following:

   PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 18229 millerbr  20   0 12420 3980 2992 R   26  0.1   0:03.85 smbd
 18225 tande820   0 12380 3564 2660 S   22  0.1   1:00.19 smbd
 18861 dhenniga  20   0 12676 4316 3328 R7  0.1   0:01.86 smbd
 18210 samcprui  20   0 12616 4064 3128 S3  0.1   0:55.84 smbd
 18214 mlhorn20   0 12568 3912 3060 S3  0.1   0:25.23 smbd
 18867 tsze  20   0 12784 4656 3592 S3  0.1   0:10.28 smbd
 18728 daflores  20   0 12684 4560 3516 S2  0.1   0:35.44 smbd
 18678 twharris  20   0 12780 4556 3552 S1  0.1   0:11.35 smbd
 ...

 Looking through the log files reveals nothing obvious at first glance,  
 but of course
 I am not sure what to look for and there are a lot of log files.

 What steps should I first take to debug the situation?

What version of Samba are you running on this server ?
What is the operating system on the server ?

What does tracing the smbd execution with strace, or
ptrace say when smbd is spinning like this ?

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


[Samba] IP address

2008-10-22 Thread Darryl Tidd

hello all,
I'm running Samba on a Fedora 9 installation, on a network of approx. 75 
workstations.  Using SMB4K, to browse, it only shows the Fedora box on 
the network, and the IP address is wrong.  The IP is configured to 
192.168.0.xx but it shows 172.16.140.x, I'm really a little lost on this 
one.  Take that back, I'm way lost. 


smb.conf
# Samba config file created using SWAT
# from UNKNOWN ()
# Date: 2008/10/22 18:34:09

[global]
   netbios name = FEDORA
   netbios aliases = FEDORA
   server string = FEDORA
   null passwords = Yes
   username map = /etc/samba/smbusers
   syslog only = Yes
   min protocol = NT1
   announce version = 5.9
   name resolve order = wins hosts bcast lmhosts
   socket options = SO_KEEPALIVE TCP_NODELAY SO_RCVBUF=8192
   printcap name = CUPS
   os level = 255
   lm announce = Yes
   preferred master = Yes
   domain master = Yes
   dns proxy = No
   wins support = Yes
   ldap ssl = no
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   winbind use default domain = Yes
   comment = Darryl's Files
   path = /home/dtidd/Public
   guest ok = Yes
   case sensitive = No
   mangled names = No

[homes]
   valid users = %S
   read only = No

[tools]

--
Darryl Tidd PC Specialist Dealers Auto Auction of OKC 1028 S. Portland 
Oklahoma City, OK 73108 (405)947-2886 x130 Contact Me 
mailto:[EMAIL PROTECTED]

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


Re: [Samba] one ldap server and multiple samba PDC domains

2008-10-22 Thread Andrew Bartlett
On Mon, 2008-10-20 at 08:57 +0330, Mohammad Reza Hosseini wrote:
 hello
 
 Is it possible to have multiple samba servers so multiple samba PDC domains
 but just one ldap server ? (so users in ldap can login to diffrent domains
 but we add them just one time)
 if yes how?

In short, don't.  A lot of folks have got themselves into a lot of
trouble doing this, as it is not a tested or supported configuration.

The only option is to ensure that each Samba domain cannot see the users
of the other domain - the suffixes must be different.  But then why even
share the LDAP server?

I strongly suggest running a single domain for a single organisation,
backed by a single LDAP server (or replicated set of LDAP servers).

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.


signature.asc
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Re: samba4/Win2008: error - directory property cannot be found in the cache

2008-10-22 Thread Andrew Bartlett
On Mon, 2008-10-20 at 10:19 -0400, Joel Reed wrote:
 Joel Reed wrote:
  I setup a samba4 pdc and successfully added a Windows 2008 machine to 
  the domain.
 
  When I start up the Active Directory Users and Computers tool, I get 
  a Naming information cannot be located because: directory property 
  cannot be found in the cache error. 
 I tried this with Windows 2003 as well. The computer can be successfully 
 added to the domain, but the dsa.msc tool fails on load with a similar 
 error about naming information cannot be located.

This is due to a bug in that alpha release of Samba4.  If you try again
with the current GIT tree, this is now fixed (found at the AD interop
event we had at Microsoft, by Microsoft's engineers!).

I'm going to try and get another alpha out in the next week or so.  

In future, send questions about Samba4 (while it is still alpha and beta
software) to samba-technical@ as I don't always get questions here. 

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.


signature.asc
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] samba4 on ubuntu intrepid, winbind success only in single process model

2008-10-22 Thread Andrew Bartlett
On Mon, 2008-10-20 at 21:34 -0400, Joel Reed wrote:
 A brief rundown of my experiences with Samba4 
 http://wiki.samba.org/index.php/Samba4 on Ubuntu Intrepid:
 
   http://ropeonfire.blogspot.com/2008/10/samba4-on-ubuntu-intrepid.html
 
 One note in particular that might be helpful to developers: I could join 
 a linux machine running winbind 2:3.2.3-1ubuntu3 to the domain only when 
 running in single process mode.

Can you post these as bugs in the bugzilla, or at least as mails to
samba-technical please?

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Red Hat Inc.


signature.asc
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] smbd high cpu load

2008-10-22 Thread Cochran, Wayne Owen



-Original Message-
From: Cochran, Wayne Owen
Sent: Wed 10/22/2008 6:04 PM
To: Jeremy Allison
Cc: Lang, Dick
Subject: Re: [Samba] smbd high cpu load
 


On Oct 22, 2008, at 4:06 PM, Jeremy Allison wrote:

 On Wed, Oct 22, 2008 at 03:27:10PM -0700, Wayne Cochran wrote:
 We have a Linux file server for a set of computer science and
 engineering
 labs where each lab contains machines running Mac OS X, Ubuntu Linux,
 or some incarnation of Windows. At times the these machines become
 almost unusable and I think I have narrowed the problem to smbd
 processes
 soaking up all the CPU on the server. Running 'top' on the server
 reveals a dozen or so entries like the following:

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 18229 millerbr  20   0 12420 3980 2992 R   26  0.1   0:03.85 smbd
 18225 tande820   0 12380 3564 2660 S   22  0.1   1:00.19 smbd
 18861 dhenniga  20   0 12676 4316 3328 R7  0.1   0:01.86 smbd
 18210 samcprui  20   0 12616 4064 3128 S3  0.1   0:55.84 smbd
 18214 mlhorn20   0 12568 3912 3060 S3  0.1   0:25.23 smbd
 18867 tsze  20   0 12784 4656 3592 S3  0.1   0:10.28 smbd
 18728 daflores  20   0 12684 4560 3516 S2  0.1   0:35.44 smbd
 18678 twharris  20   0 12780 4556 3552 S1  0.1   0:11.35 smbd
 ...

 Looking through the log files reveals nothing obvious at first  
 glance,
 but of course
 I am not sure what to look for and there are a lot of log files.

 What steps should I first take to debug the situation?

 What version of Samba are you running on this server ?

# smbd -V
Version 3.0.28a


 What is the operating system on the server ?

# uname -a
Linux queenbee 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008  
i686 GNU/Linux
# cat /etc/issue
Ubuntu 8.04.1 \n \l


 What does tracing the smbd execution with strace, or
 ptrace say when smbd is spinning like this ?


Excellent idea.

# strace -p20121  /tmp/ppp.txt
^C

I ran this just for a few seconds  and got *lots* of data:

# wc -l /tmp/ppp.txt
7001 /tmp/ppp.txt

I'll give some (hopefully) interesting samples:

Process 20121 attached - interrupt to quit
read(25, \0\0\0\252, 4)   = 4
read(25,  
\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\5\0\334..., 170) =  
170
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
open(My Documents, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY| 
0x8) = 20
fstat64(20, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
close(20)   = 0
write(25, \0\0\0\340\377SMB2\0\0\0\0\210A 
\310\0\0\0\0\0\0\0\0\0\0..., 228) = 228
gettimeofday({1224723309, 946984}, NULL) = 0
select(29, [5 25 28], [], NULL, {60, 0}) = 1 (in [25], left {60, 0})
read(25, \0\0\0\244, 4)   = 4
read(25,  
\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\5\0\334..., 164) =  
164
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa355f4) = 0
write(25, \0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0...,  
104) = 104
gettimeofday({1224723309, 950980}, NULL) = 0
select(29, [5 25 28], [], NULL, {60, 0}) = 1 (in [25], left {60, 0})
read(25, \0\0\0\244, 4)   = 4
read(25,  
\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\5\0\334..., 164) =  
164
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa355f4) = 0
write(25, \0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0...,  
104) = 104
gettimeofday({1224723309, 954923}, NULL) = 0
select(29, [5 25 28], [], NULL, {60, 0}) = 1 (in [25], left {60, 0})
read(25, \0\0\0\256, 4)   = 4
read(25, \377SMB\242\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\5...,  
174) = 174
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
gettimeofday({1224723309, 957020}, NULL) = 0
fcntl64(13, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa35ba4) = 0
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=436,  
len=1}, 0xbfa35aa4) = 0
fcntl64(8, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=436,  
len=1}, 0xbfa35aa4) = 0
...

read(25, \0\0\0\244, 4)   = 4
read(25,  
\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\5\0\334..., 164) =  
164
stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=37704,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=37704,  

[Samba] join fails samba 3.2 ADS 2003R2 SP2

2008-10-22 Thread Marc-Andre Vallee
Hi,

SLES10 SP2 x86_64 + Samba from repo (samba-3.2.4-8.1)
When I try to join (net ads join -U Administrator), I get :
Failed to join domain: failed to set machine spn: Can't contact LDAP server

My Pre-2000 domain name is CLSC_COTENEIGES
My DNS ADS name is clsccdn.rtss.qc.ca
DNS is ok, I've created an A/PTR record for linux box, ADS seems ok also 
(netdiag/dcdiag)
i've tryied adding both servers into /etc/hosts... no results (upper case, 
lower case..)

I've tryied a couple of things, like modifying my /etc/hosts, /etc/krb5.conf
all seems ok

When turning debug on (-v10), relevants lines at the ends... :

[2008/10/22 22:11:10,  5] libads/ldap.c:ads_try_connect(188)
  ads_try_connect: sending CLDAP request to cls06dlm00036.clsccdn.rtss.qc.ca 
(realm: clsccdn.rtss.qc.ca)
[2008/10/22 22:11:10,  3] libads/ldap.c:ads_connect(430)
  Successfully contacted LDAP server 10.48.128.36
[2008/10/22 22:11:11,  3] libads/ldap.c:ads_connect(480)
  Connected to LDAP server cls06dlm00036.clsccdn.rtss.qc.ca
[2008/10/22 22:11:11,  4] libads/ldap.c:ads_current_time(2607)
  time offset is -38 seconds
[2008/10/22 22:11:11,  4] libads/sasl.c:ads_sasl_bind(1112)
  Found SASL mechanism GSS-SPNEGO

!!! LDAP works !!!
then
  ads_krb5_mk_req: server marked as OK to delegate to, building forwardable TGT
[2008/10/22 22:11:11,  5] lib/util.c:show_msg(642)
[2008/10/22 22:11:11,  5] lib/util.c:show_msg(652)
  size=35
  smb_com=0x71
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51205
  smb_tid=4099
  smb_pid=12818
  smb_uid=6146
  smb_mid=23
  smt_wct=0
  smb_bcc=0
[2008/10/22 22:11:11,  1] libnet/libnet_join.c:libnet_Join(1801)
  libnet_Join:
  libnet_JoinCtx: struct libnet_JoinCtx
  out: struct libnet_JoinCtx
  account_name : NULL
  netbios_domain_name  : 'CLSC_COTENEIGES'
  dns_domain_name  : 'clsccdn.rtss.qc.ca'
  dn   : NULL
  domain_sid   : *
  domain_sid   : 
S-1-5-21-669208389-835535488-317593308
  modified_config  : 0x00 (0)
  error_string : 'failed to set machine spn: Can't 
contact LDAP server'
  domain_is_ad : 0x01 (1)
  result   : WERR_GENERAL_FAILURE


My krb5.conf :

[libdefaults]
default_realm = CLSCCDN.RTSS.QC.CA
clockskew = 300
dns_lookup_realm = false
dns_lookup_kdc = false


[realms]
CLSCCDN.RTSS.QC.CA = {
kdc = cls06dlm00036.clsccdn.rtss.qc.ca:88
default_domain = clsccdn.rtss.qc.ca
admin_server = cls06dlm00036.clsccdn.rtss.qc.ca:749
}
EXAMPLE.COM = {
kdc = kerberos.example.com
admin_server = kerberos.example.com
}

[logging]
kdc = FILE:/var/log/krb5/krb5kdc.log
admin_server = FILE:/var/log/krb5/kadmind.log
default = SYSLOG:NOTICE:DAEMON
[domain_realm]
.clsccdn.rtss.qc.ca = CLSCCDN.RTSS.QC.CA
[appdefaults]
pam = {
debug = true
validate = false
ticket_lifetime = 1d
renew_lifetime = 1d
forwardable = true
proxiable = false
retain_after_close = false
minimum_uid = 1
try_first_pass = true
}

THanks list for the help !!
Marc


Marc-Andre Vallee, CLE10, CLP, VCP, CLA, CNA
Coordonnateur des services Linux

Complys technologies inc. 
Solutions informatiques sur mesure pour votre entreprise. 
Montreal : (514) 645-2875 #103 Quebec : (418) 648-9270 #103

http://www.complys.com 

AVIS DE CONFIDENTIALITE: L' information transmise avec ce courrier electronique 
est de nature privilegie et confidentielle. Elle est destinee l'usage exclusif 
de son destinataire. Si vous n'etes pas le destinataire vise, vous etes par la 
presente avise qu'il est strictement interdit d'utiliser cette information, de 
la copier, la distribuer ou la diffuser. Veuillez s'il vous plait contacter 
l'expediteur initial du courrier electronique et le detruire de votre 
ordinateur.









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


[Samba] Re: Bad passwords from Vampire / NT migration

2008-10-22 Thread Cooper S. Blake
 Ok, I've pushed the third versino into the git repositories,
 so if you can confirm the fix I'd appreciate it.
 
 Thanks a *LOT* for that bug report - absolutely perfect !
 
 Jeremy.

OK, well it was easier than I thought to compile the code, so I
did it tonight.  Yes indeed, that was the problem!  I did a fresh
net rpc join to the domain, then ran net rpc vampire and it
successfully loaded all accounts with proper NT hashes.  The
LanMan hashes are all NULL, but I assume that's by design for
security reasons.  I tested using the v3-2-test branch from git.

This is why open source is cool:  being able to test a patch on
the same day is pretty impressive.  Thanks for the help, and keep
up the good work.

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


Re: [Samba] samba performance degrade

2008-10-22 Thread vishesh kumar
Thanks for attention

 But there is no networking related issue, the server is perfectly
accessible for ftp server. Also there is no RTO for ping to samba server.
The only new thing that i done is configured DNS slave server on that.

On Wed, Oct 22, 2008 at 10:28 PM, Hoover, Tony [EMAIL PROTECTED] wrote:

 have you ruled out a networking problem? (i.e. Switch didn't auto-neg to
 the
 same speed/duplex settings as the server)?


  
 Tony Hoover, Network Administrator
 KSU - Salina, College of Technology and Aviation
 (785) 826-2660

 Don't Blend in...
 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:samba-bounces+hoover samba-bounces%2Bhoover=sal.ksu.edu@
 lists.samba.org] On Behalf Of
 vishesh
 Sent: Wednesday, October 22, 2008 4:55 PM
 To: samba@lists.samba.org
 Subject: [Samba] samba performance degrade

 dear all
  I am using samba 3.0.28 on RHEl 5.2. I am using samba with winbind that
 authenticate window 2003 domain. From last few months samba was running
 properly. But today samba server performance badly, even sometime mapped
 drive on xp disappear. When i tried to connect samba shares, error appear
 server not available. Anyone suggest me what may be the problem. Why samba
 performance degrade after running around a month.

 my configuration is as follows

 #=== Global Settings
 =

 [global]
 #--authconfig--start-line--

 # Generated by authconfig on 2008/09/04 22:25:21 # DO NOT EDIT THIS SECTION
 (delimited by --start-line--/--end-line--) # Any modification may be
 deleted
 or altered by authconfig in future

   workgroup = abp
   password server = s2.abp.del
   realm = ABP.DEL
   security = ads
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/bash
   winbind use default domain = true
   winbind offline logon = false
   winbind enum users = yes
   winbind enum groups = yes

 #--authconfig--end-line--
 server string =
 netbios name = abpdel2
 admin users = @abp\domain admins
 # --- Network Related Options -
 #


passdb backend = tdbsam



  map read only = no
 ;map system = no
 ;store dos attributes = yes
 hide dot files = yes
 veto files=/lost+found/Trash/Recycler
 # Share Definitions
 ==

 ;[homes]
 ;comment = Home Directories
 ;browseable = no
 ;writeable = yes
 ;valid users = %S
 ;valid users = MYDOMAIN\%S

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

 # Un-comment the following and create the netlogon directory for Domain
 Logons
 ;[netlogon]
 ;comment = Network Logon Service
 ;path = /var/lib/samba/netlogon
 ;guest ok = yes
 ;writable = no
 ;share modes = no


 # Un-comment the following to provide a specific roving profile share
 # the default is to use the user's home directory
 ;[Profiles]
 ;path = /var/lib/samba/profiles
 ;browseable = no
 ;guest ok = yes


 # A publicly accessible directory, but read only, except for people in
 # the staff group
 ;[public]
 ;comment = Public Stuff
 ;path = /home/samba
 ;public = yes
 ;writable = yes
 ;printable = no
 ;write list = +staff

 [design]
comment = home folder for design department
path = /data/design
vfs object = recycle
recycle:repository = /data/design/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755
 [home]
comment = home folder for bwedit
path = /data/edit/home
vfs object = recycle
recycle:repository = /data/edit/home/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755

 [user]
comment =  home directory to tt feature and ab edit users
path = /data/edit/user
vfs object = recycle
recycle:repository = /data/edit/user/Trash
recycle:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755
 [mark]
comment = marketting users
path = /data/marketting
vfs object = recycle
vfs:repository = /data/marketting/Trash
vfs:keeptrace = Yes
writeable = yes
create mask = 644
directory mask = 2755

 [system]
comment = home folder for it
path = /data/system
vfs object = recycle
recycle:repository = /data/system/Trash
recycle:keeptrace = Yes
writeable = yes

 [com]
path=/data/marketting/com
vfs object = recycle
recycle:repository = /data/marketting/Trash
recycle:keeptrace = Yes
writeable=yes

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

-- 
To unsubscribe 

[SCM] Samba Shared Repository - branch master updated - 1d9ea911e39b4619a0857171a3362bc2ff40bf96

2008-10-22 Thread Jelmer Vernooij
The branch, master has been updated
   via  1d9ea911e39b4619a0857171a3362bc2ff40bf96 (commit)
   via  c0e14d5021e738a9b89c73558c544596e2ad2000 (commit)
   via  1d5beb7294d939504864c9b1203a5d7dcde7041a (commit)
   via  6d9b24de782b04466ca3c1ce6f6e82d54e93d2f3 (commit)
  from  7a683618e79acef94235ff4adee275c462559ab5 (commit)

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


- Log -
commit 1d9ea911e39b4619a0857171a3362bc2ff40bf96
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 05:24:00 2008 +0200

Change buffer size back to 256, just to be sure.

commit c0e14d5021e738a9b89c73558c544596e2ad2000
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 05:14:14 2008 +0200

Repel pstring to nsswitch/.

commit 1d5beb7294d939504864c9b1203a5d7dcde7041a
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 04:30:54 2008 +0200

Remove pstring usage.

commit 6d9b24de782b04466ca3c1ce6f6e82d54e93d2f3
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 04:25:00 2008 +0200

Remove pstring usages.

---

Summary of changes:
 source4/client/smbmount.c  |3 ++
 source4/include/pstring.h  |   41 --
 source4/libcli/auth/smbencrypt.c   |3 +-
 source4/nsswitch/wb_common.c   |   14 ++-
 source4/nsswitch/wbinfo.c  |1 -
 source4/nsswitch/winbind_nss_config.h  |   11 --
 source4/nsswitch/winbind_struct_protocol.h |8 
 source4/torture/basic/utable.c |   11 +++---
 source4/torture/locktest.c |   24 +++--
 source4/torture/locktest2.c|   52 
 source4/torture/masktest.c |   39 +++--
 source4/torture/winbind/struct_based.c |   17 -
 source4/utils/ntlm_auth.c  |   25 +
 13 files changed, 103 insertions(+), 146 deletions(-)
 delete mode 100644 source4/include/pstring.h


Changeset truncated at 500 lines:

diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index 37c9eaa..d2e98eb 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -24,6 +24,9 @@
 #include asm/types.h
 #include linux/smb_fs.h
 
+#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1)
+#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1)
+
 static pstring credentials;
 static pstring my_netbios_name;
 static pstring password;
diff --git a/source4/include/pstring.h b/source4/include/pstring.h
deleted file mode 100644
index 0cbc964..000
--- a/source4/include/pstring.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 
-   samba -- Unix SMB/CIFS implementation.
-
-   ugly string types from Samba3. Will be removed 
-   with glee when we finally don't use them.
-   
-   Copyright (C) Andrew Tridgell  1992-2000
-   Copyright (C) John H Terpstra  1996-2000
-   Copyright (C) Luke Kenneth Casson Leighton 1996-2000
-   Copyright (C) Paul Ashton  1998-2000
-   Copyright (C) Martin Pool 2002
-   
-   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/.
-*/
-
-#ifndef _PSTRING
-#define _PSTRING
-
-#define PSTRING_LEN 1024
-#define FSTRING_LEN 256
-
-_DEPRECATED_ typedef char pstring[PSTRING_LEN];
-typedef char fstring[FSTRING_LEN];
-
-#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1)
-#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1)
-#define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
-#define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
-
-#endif
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index 096f51e..a78c444 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -27,7 +27,6 @@
 #include auth/ntlmssp/msrpc_parse.h
 #include ../lib/crypto/crypto.h
 #include libcli/auth/libcli_auth.h
-#include pstring.h
 #include param/param.h
 
 /*
@@ -94,7 +93,7 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
 bool E_deshash(const char *passwd, uint8_t p16[16])
 {
bool ret = true;
-   fstring dospwd; 
+   char dospwd[256];
ZERO_STRUCT(dospwd);
 
/* Password must be converted to DOS charset - null 

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3105-g79222e4

2008-10-22 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  79222e476edbccf81e70cf1c0d1f40db0b88e20b (commit)
  from  82ec832f7edffe2fcfd1bb067e092c159bed2973 (commit)

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


- Log -
commit 79222e476edbccf81e70cf1c0d1f40db0b88e20b
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 14:26:05 2008 +0200

Fix bug 5840: Segfault in rpcclient lsaaddacctrights

---

Summary of changes:
 source/rpcclient/cmd_lsarpc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index 0d530ce..befb0f0 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -791,7 +791,7 @@ static NTSTATUS cmd_lsa_add_acct_rights(struct 
rpc_pipe_client *cli,
return NT_STATUS_NO_MEMORY;
}
 
-   for (i=0; iargc-1; i++) {
+   for (i=0; iargc-2; i++) {
init_lsa_StringLarge(rights.names[i], argv[i+2]);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4278-gda21102

2008-10-22 Thread Volker Lendecke
The branch, v3-3-test has been updated
   via  da21102b557d809009d59aa7dff3c55e72a3afea (commit)
  from  9c0fc1d83ceae0ac78b8ea2408e6c385402b6f86 (commit)

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


- Log -
commit da21102b557d809009d59aa7dff3c55e72a3afea
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 14:26:05 2008 +0200

Fix bug 5840: Segfault in rpcclient lsaaddacctrights

---

Summary of changes:
 source/rpcclient/cmd_lsarpc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index 5b5b4ff..110b34c 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -791,7 +791,7 @@ static NTSTATUS cmd_lsa_add_acct_rights(struct 
rpc_pipe_client *cli,
return NT_STATUS_NO_MEMORY;
}
 
-   for (i=0; iargc-1; i++) {
+   for (i=0; iargc-2; i++) {
init_lsa_StringLarge(rights.names[i], argv[i+2]);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - f4e760faf96cd49d0491981d48a7ced96564ee40

2008-10-22 Thread Volker Lendecke
The branch, master has been updated
   via  f4e760faf96cd49d0491981d48a7ced96564ee40 (commit)
  from  1d9ea911e39b4619a0857171a3362bc2ff40bf96 (commit)

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


- Log -
commit f4e760faf96cd49d0491981d48a7ced96564ee40
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 14:26:05 2008 +0200

Fix bug 5840: Segfault in rpcclient lsaaddacctrights

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index aa8662c..6424f1b 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -789,7 +789,7 @@ static NTSTATUS cmd_lsa_add_acct_rights(struct 
rpc_pipe_client *cli,
return NT_STATUS_NO_MEMORY;
}
 
-   for (i=0; iargc-1; i++) {
+   for (i=0; iargc-2; i++) {
init_lsa_StringLarge(rights.names[i], argv[i+2]);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - b8b0274e0351709266dc727d6ee4f857441e5d9e

2008-10-22 Thread Volker Lendecke
The branch, master has been updated
   via  b8b0274e0351709266dc727d6ee4f857441e5d9e (commit)
  from  f4e760faf96cd49d0491981d48a7ced96564ee40 (commit)

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


- Log -
commit b8b0274e0351709266dc727d6ee4f857441e5d9e
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 16:14:26 2008 +0200

Fix a debug message in send_nt_replies()

---

Summary of changes:
 source3/smbd/nttrans.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 69ddcda..b78c946 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -93,9 +93,12 @@ void send_nt_replies(connection_struct *conn,
+ data_alignment_offset);
 
if (useable_space  0) {
-   DEBUG(0, (send_nt_replies failed sanity useable_space 
- = %d!!!, useable_space));
-   exit_server_cleanly(send_nt_replies: srv_send_smb failed.);
+   char *msg = talloc_asprintf(
+   talloc_tos(),
+   send_nt_replies failed sanity useable_space = %d!!!,
+   useable_space);
+   DEBUG(0, (%s\n, msg));
+   exit_server_cleanly(msg);
}
 
while (params_to_send || data_to_send) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - c94f994dda494f78f0ffb018632abf75d99b45d6

2008-10-22 Thread Jelmer Vernooij
The branch, master has been updated
   via  c94f994dda494f78f0ffb018632abf75d99b45d6 (commit)
   via  12ad92165eba14a593e0d152fbeda1e8f7d90ef8 (commit)
   via  02fac426901ca0ac95d63c374f8480825f5cf6bc (commit)
  from  b8b0274e0351709266dc727d6ee4f857441e5d9e (commit)

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


- Log -
commit c94f994dda494f78f0ffb018632abf75d99b45d6
Merge: 12ad92165eba14a593e0d152fbeda1e8f7d90ef8 
b8b0274e0351709266dc727d6ee4f857441e5d9e
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 16:57:46 2008 +0200

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 12ad92165eba14a593e0d152fbeda1e8f7d90ef8
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 16:56:06 2008 +0200

masktest: Avoid creating new memory context, use dynamic allocation.

commit 02fac426901ca0ac95d63c374f8480825f5cf6bc
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 16:49:56 2008 +0200

Change some dynamic allocations back to static buffers to fix build.

---

Summary of changes:
 source4/torture/masktest.c |   30 ++
 1 files changed, 14 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 5eccf86..6e9ae89 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -74,6 +74,7 @@ return a connection to a server
 ***/
 static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx, 
struct event_context *ev,
+   TALLOC_CTX *mem_ctx,
char *share, const char **ports,
struct smbcli_options *options,
struct smbcli_session_options 
*session_options)
@@ -82,12 +83,9 @@ static struct smbcli_state *connect_one(struct 
resolve_context *resolve_ctx,
char *server;
NTSTATUS status;
 
-   server = smb_xstrdup(share+2);
+   server = talloc_strdup(mem_ctx, share+2);
share = strchr_m(server,'\\');
-   if (!share) {
-   SAFE_FREE(server);
-   return NULL;
-   }
+   if (!share) return NULL;
*share = 0;
share++;
 
@@ -100,8 +98,6 @@ static struct smbcli_state *connect_one(struct 
resolve_context *resolve_ctx,
cmdline_credentials, resolve_ctx, ev,
options, session_options);
 
-   SAFE_FREE(server);
-
if (!NT_STATUS_IS_OK(status)) {
return NULL;
}
@@ -170,7 +166,7 @@ static void testpair(TALLOC_CTX *mem_ctx, struct 
smbcli_state *cli, char *mask,
char *file)
 {
int fnum;
-   char *res1;
+   char res1[256];
char *res2;
static int count;
char *short_name = NULL;
@@ -179,7 +175,7 @@ static void testpair(TALLOC_CTX *mem_ctx, struct 
smbcli_state *cli, char *mask,
 
count++;
 
-   res1 = talloc_strdup(mem_ctx, ---);
+   safe_strcpy(res1, ---, sizeof(res1));
 
state.mem_ctx = mem_ctx;
 
@@ -191,8 +187,9 @@ static void testpair(TALLOC_CTX *mem_ctx, struct 
smbcli_state *cli, char *mask,
smbcli_close(cli-tree, fnum);
 
resultp = res1;
+   short_name = talloc_strdup(mem_ctx, );
get_real_name(mem_ctx, cli, long_name, short_name);
-   res1 = talloc_strdup(mem_ctx, ---);
+   safe_strcpy(res1, ---, sizeof(res1));
smbcli_list_new(cli-tree, mask,
FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY,
RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO,
@@ -214,16 +211,14 @@ static void testpair(TALLOC_CTX *mem_ctx, struct 
smbcli_state *cli, char *mask,
 }
 
 static void test_mask(int argc, char *argv[],
+ TALLOC_CTX *mem_ctx,
  struct smbcli_state *cli)
 {
-   TALLOC_CTX *mem_ctx;
char *mask, *file;
int l1, l2, i, l;
int mc_len = strlen(maskchars);
int fc_len = strlen(filechars);
 
-   mem_ctx = talloc_init(test_mask);
-
smbcli_mkdir(cli-tree, \\masktest);
 
smbcli_unlink(cli-tree, \\masktest\\*);
@@ -304,6 +299,7 @@ static void usage(poptContext pc)
poptContext pc;
int argc_new, i;
char **argv_new;
+   TALLOC_CTX *mem_ctx;
enum {OPT_UNCLIST=1000};
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -360,14 +356,16 @@ static void usage(poptContext pc)
 
lp_ctx = cmdline_lp_ctx;
 
-   ev = s4_event_context_init(talloc_autofree_context());
+   mem_ctx = talloc_autofree_context();
+
+   ev = 

[SCM] Samba Shared Repository - branch master updated - ca2d23e04822bb6389f744ff1885ad488c2671ff

2008-10-22 Thread Jelmer Vernooij
The branch, master has been updated
   via  ca2d23e04822bb6389f744ff1885ad488c2671ff (commit)
  from  c94f994dda494f78f0ffb018632abf75d99b45d6 (commit)

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


- Log -
commit ca2d23e04822bb6389f744ff1885ad488c2671ff
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Wed Oct 22 17:00:49 2008 +0200

Remove unused header file.

---

Summary of changes:
 source3/include/core.h |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
 delete mode 100644 source3/include/core.h


Changeset truncated at 500 lines:

diff --git a/source3/include/core.h b/source3/include/core.h
deleted file mode 100644
index 1f9ddb8..000
--- a/source3/include/core.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* dummy file to deal with pidl autogenerated ndr files */
-
-#include nterr.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 6c019b875515662f5c97d89d653e2708478581ad

2008-10-22 Thread Volker Lendecke
The branch, master has been updated
   via  6c019b875515662f5c97d89d653e2708478581ad (commit)
   via  84df0a68702dfd3ff687f199df4e479a892640d7 (commit)
  from  ca2d23e04822bb6389f744ff1885ad488c2671ff (commit)

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


- Log -
commit 6c019b875515662f5c97d89d653e2708478581ad
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 17:01:28 2008 +0200

Slightly simplify reply_sesssetup_blob(): Remove an else branch

commit 84df0a68702dfd3ff687f199df4e479a892640d7
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 16:59:08 2008 +0200

Don't push the data out to the client in reply_sesssetup_blob()

Sending the data at this level breaks the assumption at higher levels that
req-outbuf == NULL means this request is deferred. It also breaks potential
chaining (Kerberos session setup and tcon X in one request)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 9c9d0a9..845bf75 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -125,21 +125,18 @@ static void reply_sesssetup_blob(struct smb_request *req,
if (!NT_STATUS_IS_OK(nt_status) 
!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
reply_nterror(req, nt_status_squash(nt_status));
-   } else {
-   nt_status = nt_status_squash(nt_status);
-   SIVAL(req-outbuf, smb_rcls, NT_STATUS_V(nt_status));
-   SSVAL(req-outbuf, smb_vwv0, 0xFF); /* no chaining possible */
-   SSVAL(req-outbuf, smb_vwv3, blob.length);
-
-   if ((message_push_blob(req-outbuf, blob) == -1)
-   || (push_signature(req-outbuf) == -1)) {
-   reply_nterror(req, NT_STATUS_NO_MEMORY);
-   }
+   return;
}
 
-   show_msg((char *)req-outbuf);
-   srv_send_smb(smbd_server_fd(),(char *)req-outbuf,req-encrypted);
-   TALLOC_FREE(req-outbuf);
+   nt_status = nt_status_squash(nt_status);
+   SIVAL(req-outbuf, smb_rcls, NT_STATUS_V(nt_status));
+   SSVAL(req-outbuf, smb_vwv0, 0xFF); /* no chaining possible */
+   SSVAL(req-outbuf, smb_vwv3, blob.length);
+
+   if ((message_push_blob(req-outbuf, blob) == -1)
+   || (push_signature(req-outbuf) == -1)) {
+   reply_nterror(req, NT_STATUS_NO_MEMORY);
+   }
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - c0cf457c85a1fb89d72c2088c103a51af9341de4

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  c0cf457c85a1fb89d72c2088c103a51af9341de4 (commit)
   via  527d79747642cf83c89a8931e4fe86df1fec454b (commit)
   via  d9f1fff5b35a2c852e69c2c58e68824b5f381d01 (commit)
   via  cef97c245955d0f125928740cd89984100635d29 (commit)
   via  5d805425b9382e3aabda4218ffa68584a2a58c9f (commit)
   via  d81a9a9837870f0581269c27e41257133d24fbf6 (commit)
  from  6c019b875515662f5c97d89d653e2708478581ad (commit)

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


- Log -
commit c0cf457c85a1fb89d72c2088c103a51af9341de4
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 19:23:49 2008 +0200

s3-asn1: make all of s3 asn1 code do a proper asn1_init() first.

Guenther

commit 527d79747642cf83c89a8931e4fe86df1fec454b
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 18:57:59 2008 +0200

s3-asn1/spnego: use OIDs including dots.

Guenther

commit d9f1fff5b35a2c852e69c2c58e68824b5f381d01
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 14:06:08 2008 +0200

s3: use shared asn1 code.

Guenther

commit cef97c245955d0f125928740cd89984100635d29
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 14:01:53 2008 +0200

s3-spnego: move spnego defines to spnego.h

Guenther

commit 5d805425b9382e3aabda4218ffa68584a2a58c9f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 14:03:43 2008 +0200

lib-util: merge from s3 asn1.

Guenther

commit d81a9a9837870f0581269c27e41257133d24fbf6
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 14:02:31 2008 +0200

lib-util: fix c++ compile warning.

Guenther

---

Summary of changes:
 lib/util/asn1.c   |2 +-
 lib/util/asn1.h   |3 +
 source3/Makefile.in   |8 +-
 source3/include/asn_1.h   |   71 -
 source3/include/includes.h|3 +-
 source3/include/proto.h   |   33 +---
 source3/include/spnego.h  |   17 ++
 source3/libads/cldap.c|  147 ++-
 source3/libads/krb5_setpw.c   |   59 ++--
 source3/libads/sasl.c |6 +-
 source3/libsmb/asn1.c |  603 -
 source3/libsmb/cliconnect.c   |   15 +-
 source3/libsmb/clikrb5.c  |   62 +++--
 source3/libsmb/clispnego.c|  543 -
 source3/libsmb/spnego.c   |   82 +++---
 source3/rpc_server/srv_pipe.c |2 +-
 source3/smbd/sesssetup.c  |   31 ++-
 source3/torture/t_asn1.c  |   22 +-
 18 files changed, 556 insertions(+), 1153 deletions(-)
 delete mode 100644 source3/include/asn_1.h
 delete mode 100644 source3/libsmb/asn1.c


Changeset truncated at 500 lines:

diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index ef34654..a2665ed 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -355,7 +355,7 @@ bool asn1_check_BOOLEAN(struct asn1_data *data, bool v)
 bool asn1_load(struct asn1_data *data, DATA_BLOB blob)
 {
ZERO_STRUCTP(data);
-   data-data = talloc_memdup(data, blob.data, blob.length);
+   data-data = (uint8_t *)talloc_memdup(data, blob.data, blob.length);
if (!data-data) {
data-has_error = true;
return false;
diff --git a/lib/util/asn1.h b/lib/util/asn1.h
index c8e83b9..5041938 100644
--- a/lib/util/asn1.h
+++ b/lib/util/asn1.h
@@ -34,6 +34,8 @@ struct asn1_data {
bool has_error;
 };
 
+typedef struct asn1_data ASN1_DATA;
+
 #define ASN1_APPLICATION(x) ((x)+0x60)
 #define ASN1_APPLICATION_SIMPLE(x) ((x)+0x40)
 #define ASN1_SEQUENCE(x) ((x)+0x30)
@@ -44,6 +46,7 @@ struct asn1_data {
 #define ASN1_OID 0x6
 #define ASN1_BOOLEAN 0x1
 #define ASN1_INTEGER 0x2
+#define ASN1_BITFIELD 0x3
 #define ASN1_ENUMERATED 0xa
 #define ASN1_SET 0x31
 
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 25c3a59..eee03db 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -425,7 +425,7 @@ LIBSAMBA_OBJ = $(LIBSMB_OBJ0) \
 CLDAP_OBJ = libads/cldap.o
 
 LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
-libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
+libsmb/clikrb5.o libsmb/clispnego.o ../lib/util/asn1.o \
 libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
 libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
 libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
@@ -772,7 +772,7 @@ SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) 
$(PASSCHANGE_OBJ) \
 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) 
@LIBWBCLIENT_STATIC@ \
$(LIBSAMBA_OBJ) \
$(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
-   $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) libsmb/asn1.o \
+   $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) ../lib/util/asn1.o \
   

[SCM] Samba Shared Repository - branch master updated - 9994cbffa70464331dd7248c3a7e93e24acb0b62

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  9994cbffa70464331dd7248c3a7e93e24acb0b62 (commit)
  from  c0cf457c85a1fb89d72c2088c103a51af9341de4 (commit)

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


- Log -
commit 9994cbffa70464331dd7248c3a7e93e24acb0b62
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 21:57:26 2008 +0200

s3-build: temporarily add asn1_proto file.

Jelmer, how can we get this autogenerated from samba3 in the non 
merged-build
case ?

Guenther

---

Summary of changes:
 lib/util/asn1_proto.h |   59 +
 1 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100644 lib/util/asn1_proto.h


Changeset truncated at 500 lines:

diff --git a/lib/util/asn1_proto.h b/lib/util/asn1_proto.h
new file mode 100644
index 000..bcaf2c2
--- /dev/null
+++ b/lib/util/asn1_proto.h
@@ -0,0 +1,59 @@
+#ifndef ___LIB_UTIL_ASN1_PROTO_H__
+#define ___LIB_UTIL_ASN1_PROTO_H__
+
+#undef _PRINTF_ATTRIBUTE
+#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
+/* This file was automatically generated by mkproto.pl. DO NOT EDIT */
+
+/* this file contains prototypes for functions that are private 
+ * to this subsystem or library. These functions should not be 
+ * used outside this particular subsystem! */
+
+
+/* The following definitions come from lib/util/asn1.c  */
+
+struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx);
+void asn1_free(struct asn1_data *data);
+bool asn1_write(struct asn1_data *data, const void *p, int len);
+bool asn1_write_uint8(struct asn1_data *data, uint8_t v);
+bool asn1_push_tag(struct asn1_data *data, uint8_t tag);
+bool asn1_pop_tag(struct asn1_data *data);
+bool asn1_write_implicit_Integer(struct asn1_data *data, int i);
+bool asn1_write_Integer(struct asn1_data *data, int i);
+bool ber_write_OID_String(DATA_BLOB *blob, const char *OID);
+bool asn1_write_OID(struct asn1_data *data, const char *OID);
+bool asn1_write_OctetString(struct asn1_data *data, const void *p, size_t 
length);
+bool asn1_write_LDAPString(struct asn1_data *data, const char *s);
+bool asn1_write_DATA_BLOB_LDAPString(struct asn1_data *data, const DATA_BLOB 
*s);
+bool asn1_write_GeneralString(struct asn1_data *data, const char *s);
+bool asn1_write_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB 
*blob);
+bool asn1_write_BOOLEAN(struct asn1_data *data, bool v);
+bool asn1_read_BOOLEAN(struct asn1_data *data, bool *v);
+bool asn1_check_BOOLEAN(struct asn1_data *data, bool v);
+bool asn1_load(struct asn1_data *data, DATA_BLOB blob);
+bool asn1_peek(struct asn1_data *data, void *p, int len);
+bool asn1_read(struct asn1_data *data, void *p, int len);
+bool asn1_read_uint8(struct asn1_data *data, uint8_t *v);
+bool asn1_peek_uint8(struct asn1_data *data, uint8_t *v);
+bool asn1_peek_tag(struct asn1_data *data, uint8_t tag);
+bool asn1_start_tag(struct asn1_data *data, uint8_t tag);
+bool asn1_end_tag(struct asn1_data *data);
+int asn1_tag_remaining(struct asn1_data *data);
+bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char 
**OID);
+bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, const char 
**OID);
+bool asn1_check_OID(struct asn1_data *data, const char *OID);
+bool asn1_read_LDAPString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char 
**s);
+bool asn1_read_GeneralString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char 
**s);
+bool asn1_read_OctetString(struct asn1_data *data, TALLOC_CTX *mem_ctx, 
DATA_BLOB *blob);
+bool asn1_read_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB 
*blob);
+bool asn1_read_implicit_Integer(struct asn1_data *data, int *i);
+bool asn1_read_Integer(struct asn1_data *data, int *i);
+bool asn1_read_enumerated(struct asn1_data *data, int *v);
+bool asn1_check_enumerated(struct asn1_data *data, int v);
+bool asn1_write_enumerated(struct asn1_data *data, uint8_t v);
+NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size);
+#undef _PRINTF_ATTRIBUTE
+#define _PRINTF_ATTRIBUTE(a1, a2)
+
+#endif /* ___LIB_UTIL_ASN1_PROTO_H__ */
+


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3106-ge38436f

2008-10-22 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  e38436f731ff09333588cc0751c79029a569f390 (commit)
  from  79222e476edbccf81e70cf1c0d1f40db0b88e20b (commit)

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


- Log -
commit e38436f731ff09333588cc0751c79029a569f390
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Oct 22 13:18:58 2008 -0700

Fix net rpc vampire, based on an *amazing* piece of debugging work by 
Cooper S. Blake [EMAIL PROTECTED].

I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208 if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
 209 sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211 }
 212
 213 if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
 214 sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields.

Fix this by removing the rid_crypt parameter.
Jeremy.

---

Summary of changes:
 source/libnet/libnet_samsync.c |   48 +---
 source/utils/net_rpc_samsync.c |   39 +---
 2 files changed, 46 insertions(+), 41 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libnet/libnet_samsync.c b/source/libnet/libnet_samsync.c
index 61d53c3..8a14338 100644
--- a/source/libnet/libnet_samsync.c
+++ b/source/libnet/libnet_samsync.c
@@ -32,7 +32,6 @@
 
 static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
 DATA_BLOB *session_key,
-bool rid_crypt,
 enum netr_SamDatabaseID database_id,
 struct netr_DELTA_ENUM *delta)
 {
@@ -41,17 +40,29 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
struct netr_DELTA_USER *user = delta-delta_union.user;
struct samr_Password lm_hash;
struct samr_Password nt_hash;
+   unsigned char zero_buf[16];
 
-   if (rid_crypt) {
-   if (user-lm_password_present) {
+   memset(zero_buf, '\0', sizeof(zero_buf));
+
+   /* Note that win2000 may send us all zeros
+* for the hashes if it doesn't
+* think this channel is secure enough. */
+   if (user-lm_password_present) {
+   if (memcmp(user-lmpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-lmpassword.hash, lm_hash.hash, 
0);
-   user-lmpassword = lm_hash;
+   } else {
+   memset(lm_hash.hash, '\0', sizeof(lm_hash.hash));
}
+   user-lmpassword = lm_hash;
+   }
 
-   if (user-nt_password_present) {
+   if (user-nt_password_present) {
+   if (memcmp(user-ntpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-ntpassword.hash, nt_hash.hash, 
0);
-   user-ntpassword = nt_hash;
+   } else {
+   memset(nt_hash.hash, '\0', sizeof(nt_hash.hash));
}
+   user-ntpassword = nt_hash;
}
 
if (user-user_private_info.SensitiveData) {
@@ -71,26 +82,31 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
return ndr_map_error2ntstatus(ndr_err);
}
 
+   /* 

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4279-g3690f2d

2008-10-22 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  3690f2d87549840b5408771d2596069ff1732fc5 (commit)
  from  da21102b557d809009d59aa7dff3c55e72a3afea (commit)

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


- Log -
commit 3690f2d87549840b5408771d2596069ff1732fc5
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Oct 22 13:21:13 2008 -0700

Fix net rpc vampire, based on an *amazing* piece of debugging work by 
Cooper S. Blake [EMAIL PROTECTED].

I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208 if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
 209 sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211 }
 212
 213 if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
 214 sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields.

Fix this by removing the rid_crypt parameter.
Jeremy.

---

Summary of changes:
 source/libnet/libnet_samsync.c |   53 +++
 source/libnet/libnet_samsync_display.c |   11 +++---
 source/libnet/libnet_samsync_keytab.c  |5 +--
 source/libnet/libnet_samsync_ldif.c|   11 +++---
 source/libnet/libnet_samsync_passdb.c  |   15 -
 5 files changed, 50 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libnet/libnet_samsync.c b/source/libnet/libnet_samsync.c
index daf27ff..ad1b20a 100644
--- a/source/libnet/libnet_samsync.c
+++ b/source/libnet/libnet_samsync.c
@@ -33,7 +33,6 @@
 
 static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
 DATA_BLOB *session_key,
-bool rid_crypt,
 enum netr_SamDatabaseID database_id,
 struct netr_DELTA_ENUM *delta)
 {
@@ -42,17 +41,29 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
struct netr_DELTA_USER *user = delta-delta_union.user;
struct samr_Password lm_hash;
struct samr_Password nt_hash;
+   unsigned char zero_buf[16];
 
-   if (rid_crypt) {
-   if (user-lm_password_present) {
+   memset(zero_buf, '\0', sizeof(zero_buf));
+
+   /* Note that win2000 may send us all zeros
+* for the hashes if it doesn't
+* think this channel is secure enough. */
+   if (user-lm_password_present) {
+   if (memcmp(user-lmpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-lmpassword.hash, lm_hash.hash, 
0);
-   user-lmpassword = lm_hash;
+   } else {
+   memset(lm_hash.hash, '\0', sizeof(lm_hash.hash));
}
+   user-lmpassword = lm_hash;
+   }
 
-   if (user-nt_password_present) {
+   if (user-nt_password_present) {
+   if (memcmp(user-ntpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-ntpassword.hash, nt_hash.hash, 
0);
-   user-ntpassword = nt_hash;
+   } else {
+   memset(nt_hash.hash, '\0', sizeof(nt_hash.hash));
}
+   user-ntpassword = nt_hash;
}
 
if (user-user_private_info.SensitiveData) {
@@ -72,26 +83,31 @@ static 

[SCM] Samba Shared Repository - branch master updated - f53578daf4f5591f47fbe0e3effc50c5bdaffd3b

2008-10-22 Thread Jeremy Allison
The branch, master has been updated
   via  f53578daf4f5591f47fbe0e3effc50c5bdaffd3b (commit)
  from  9994cbffa70464331dd7248c3a7e93e24acb0b62 (commit)

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


- Log -
commit f53578daf4f5591f47fbe0e3effc50c5bdaffd3b
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Oct 22 13:21:23 2008 -0700

Fix net rpc vampire, based on an *amazing* piece of debugging work by 
Cooper S. Blake [EMAIL PROTECTED].

I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208 if (memcmp(r-ntpassword.hash, zero_buf, 16) != 0) {
 209 sam_pwd_hash(r-rid, r-ntpassword.hash, lm_passwd, 0);
 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211 }
 212
 213 if (memcmp(r-lmpassword.hash, zero_buf, 16) != 0) {
 214 sam_pwd_hash(r-rid, r-lmpassword.hash, nt_passwd, 0);
 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields.

Fix this by removing the rid_crypt parameter.
Jeremy.

---

Summary of changes:
 source3/libnet/libnet_samsync.c |   53 ++
 source3/libnet/libnet_samsync_display.c |   11 +++---
 source3/libnet/libnet_samsync_keytab.c  |5 +--
 source3/libnet/libnet_samsync_ldif.c|   11 +++---
 source3/libnet/libnet_samsync_passdb.c  |   15 -
 5 files changed, 50 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c
index 64dcf6d..00caf2b 100644
--- a/source3/libnet/libnet_samsync.c
+++ b/source3/libnet/libnet_samsync.c
@@ -33,7 +33,6 @@
 
 static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
 DATA_BLOB *session_key,
-bool rid_crypt,
 enum netr_SamDatabaseID database_id,
 struct netr_DELTA_ENUM *delta)
 {
@@ -42,17 +41,29 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
struct netr_DELTA_USER *user = delta-delta_union.user;
struct samr_Password lm_hash;
struct samr_Password nt_hash;
+   unsigned char zero_buf[16];
 
-   if (rid_crypt) {
-   if (user-lm_password_present) {
+   memset(zero_buf, '\0', sizeof(zero_buf));
+
+   /* Note that win2000 may send us all zeros
+* for the hashes if it doesn't
+* think this channel is secure enough. */
+   if (user-lm_password_present) {
+   if (memcmp(user-lmpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-lmpassword.hash, lm_hash.hash, 
0);
-   user-lmpassword = lm_hash;
+   } else {
+   memset(lm_hash.hash, '\0', sizeof(lm_hash.hash));
}
+   user-lmpassword = lm_hash;
+   }
 
-   if (user-nt_password_present) {
+   if (user-nt_password_present) {
+   if (memcmp(user-ntpassword.hash, zero_buf, 16) != 0) {
sam_pwd_hash(rid, user-ntpassword.hash, nt_hash.hash, 
0);
-   user-ntpassword = nt_hash;
+   } else {
+   memset(nt_hash.hash, '\0', sizeof(nt_hash.hash));
}
+   user-ntpassword = nt_hash;
}
 
if (user-user_private_info.SensitiveData) {
@@ -72,26 +83,31 @@ static 

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4280-g5ee3d6c

2008-10-22 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  5ee3d6c3b1394e705691247b471c4511244a97af (commit)
  from  3690f2d87549840b5408771d2596069ff1732fc5 (commit)

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


- Log -
commit 5ee3d6c3b1394e705691247b471c4511244a97af
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Oct 22 13:29:21 2008 -0700

Janitor for Guenther, fix _lsa_GetUserName.
Jeremy.

---

Summary of changes:
 source/rpc_server/srv_lsa_nt.c |   27 ---
 source/rpcclient/cmd_lsarpc.c  |3 ++-
 2 files changed, 22 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c
index 910b302..77eecaf 100644
--- a/source/rpc_server/srv_lsa_nt.c
+++ b/source/rpc_server/srv_lsa_nt.c
@@ -1462,6 +1462,16 @@ NTSTATUS _lsa_GetUserName(pipes_struct *p,
struct lsa_String *account_name = NULL;
struct lsa_String *authority_name = NULL;
 
+   if (r-in.account_name 
+  *r-in.account_name) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
+   if (r-in.authority_name 
+  *r-in.authority_name) {
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
if (p-server_info-guest) {
/*
 * I'm 99% sure this is not the right place to do this,
@@ -1481,17 +1491,20 @@ NTSTATUS _lsa_GetUserName(pipes_struct *p,
if (!account_name) {
return NT_STATUS_NO_MEMORY;
}
+   init_lsa_String(account_name, username);
 
-   authority_name = TALLOC_ZERO_P(p-mem_ctx, struct lsa_String);
-   if (!authority_name) {
-   return NT_STATUS_NO_MEMORY;
+   if (r-out.authority_name) {
+   authority_name = TALLOC_ZERO_P(p-mem_ctx, struct lsa_String);
+   if (!authority_name) {
+   return NT_STATUS_NO_MEMORY;
+   }
+   init_lsa_String(authority_name, domname);
}
 
-   init_lsa_String(account_name, username);
-   init_lsa_String(authority_name, domname);
-
*r-out.account_name = account_name;
-   *r-out.authority_name = authority_name;
+   if (r-out.authority_name) {
+   *r-out.authority_name = authority_name;
+   }
 
return NT_STATUS_OK;
 }
diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index 110b34c..e02fbee 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -1184,7 +1184,8 @@ static NTSTATUS cmd_lsa_get_username(struct 
rpc_pipe_client *cli,
/* Print results */
 
printf(Account Name: %s, Authority Name: %s\n,
-   account_name-string, authority_name-string);
+   account_name-string, authority_name ? authority_name-string :
+   );
 
rpccli_lsa_Close(cli, mem_ctx, pol);
  done:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 0f898718372d2a6c4d650c40562ac8fd117f1fab

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  0f898718372d2a6c4d650c40562ac8fd117f1fab (commit)
  from  f53578daf4f5591f47fbe0e3effc50c5bdaffd3b (commit)

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


- Log -
commit 0f898718372d2a6c4d650c40562ac8fd117f1fab
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 22:44:04 2008 +0200

s3-build: fix the build.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index b2197eb..72559cd 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -46,7 +46,7 @@ static bool read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t 
*token)
 0  asn1_tag_remaining(asn1); i++) {
const char *p_oid = NULL;
token-mechTypes = 
-   TALLOC_REALLOC_ARRAY(token-mechTypes, 
const char *, i + 2);
+   TALLOC_REALLOC_ARRAY(NULL, 
token-mechTypes, const char *, i + 2);
if (!token-mechTypes) {
asn1-has_error = True;
return False;
@@ -90,7 +90,7 @@ static bool read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t 
*token)
 
token-mechListMIC =
data_blob(mechListMIC, 
strlen(mechListMIC));
-   TALLO_FREE(mechListMIC);
+   TALLOC_FREE(mechListMIC);
}
asn1_end_tag(asn1);
break;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - f9c6313e660e7a6dc78c124ffb88c1258c5a5025

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  f9c6313e660e7a6dc78c124ffb88c1258c5a5025 (commit)
  from  0f898718372d2a6c4d650c40562ac8fd117f1fab (commit)

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


- Log -
commit f9c6313e660e7a6dc78c124ffb88c1258c5a5025
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 23:16:19 2008 +0200

s3-samr-server: fix access check in _samr_QuerySecurity().

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 221ad29..d08bb50 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -871,7 +871,7 @@ NTSTATUS _samr_QuerySecurity(pipes_struct *p,
status = access_check_samr_function(acc_granted,
STD_RIGHT_READ_CONTROL_ACCESS,
_samr_QuerySecurity);
-   if (NT_STATUS_IS_OK(status)) {
+   if (!NT_STATUS_IS_OK(status)) {
return status;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4281-g7693d85

2008-10-22 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  7693d853933e1d7ece9261847bab53e2b73dfa50 (commit)
  from  5ee3d6c3b1394e705691247b471c4511244a97af (commit)

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


- Log -
commit 7693d853933e1d7ece9261847bab53e2b73dfa50
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 23:16:19 2008 +0200

s3-samr-server: fix access check in _samr_QuerySecurity().

Guenther

---

Summary of changes:
 source/rpc_server/srv_samr_nt.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 03dd7db..5312b0a 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -871,7 +871,7 @@ NTSTATUS _samr_QuerySecurity(pipes_struct *p,
status = access_check_samr_function(acc_granted,
STD_RIGHT_READ_CONTROL_ACCESS,
_samr_QuerySecurity);
-   if (NT_STATUS_IS_OK(status)) {
+   if (!NT_STATUS_IS_OK(status)) {
return status;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3107-g25cb282

2008-10-22 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  25cb282f7042e8192c0bc6d720df0646b74e9a47 (commit)
  from  e38436f731ff09333588cc0751c79029a569f390 (commit)

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


- Log -
commit 25cb282f7042e8192c0bc6d720df0646b74e9a47
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Oct 22 23:16:19 2008 +0200

s3-samr-server: fix access check in _samr_QuerySecurity().

Guenther

---

Summary of changes:
 source/rpc_server/srv_samr_nt.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index a085aa7..985dd58 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -872,7 +872,7 @@ NTSTATUS _samr_QuerySecurity(pipes_struct *p,
status = access_check_samr_function(acc_granted,
STD_RIGHT_READ_CONTROL_ACCESS,
_samr_QuerySecurity);
-   if (NT_STATUS_IS_OK(status)) {
+   if (!NT_STATUS_IS_OK(status)) {
return status;
}
 


-- 
Samba Shared Repository


Build status as of Thu Oct 23 00:00:02 2008

2008-10-22 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2008-10-22 
00:00:47.0 +
+++ /home/build/master/cache/broken_results.txt 2008-10-23 00:00:25.0 
+
@@ -1,4 +1,4 @@
-Build status as of Wed Oct 22 00:00:02 2008
+Build status as of Thu Oct 23 00:00:02 2008
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,17 +7,17 @@
 ctdb 0  0  0 
 distcc   1  0  0 
 ldb  33 32 0 
-libreplace   32 12 0 
+libreplace   31 12 0 
 lorikeet-heimdal 29 20 0 
 pidl 19 3  0 
 ppp  13 13 0 
 rsync33 10 0 
 samba-docs   0  0  0 
 samba-gtk8  8  0 
-samba_3_X_devel 30 20 0 
-samba_3_X_test 29 18 0 
-samba_4_0_test 32 25 1 
+samba_3_X_devel 30 22 0 
+samba_3_X_test 29 17 0 
+samba_4_0_test 32 27 1 
 smb-build30 6  0 
-talloc   33 32 0 
+talloc   31 32 0 
 tdb  33 12 0 
 


[SCM] Samba Shared Repository - branch master updated - d115c4587f0d157fcb7f716524d92fbe1899f44c

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  d115c4587f0d157fcb7f716524d92fbe1899f44c (commit)
   via  c017909e2e2f971c68303b98b4a8a5b9019b0f6d (commit)
   via  74a9a391aa98dda542ef413d46d2080b450be127 (commit)
  from  f9c6313e660e7a6dc78c124ffb88c1258c5a5025 (commit)

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


- Log -
commit d115c4587f0d157fcb7f716524d92fbe1899f44c
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:43:41 2008 +0200

s3-build: fix some const build warnings.

Guenther

commit c017909e2e2f971c68303b98b4a8a5b9019b0f6d
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:43:06 2008 +0200

netapi: NetGroupEnum_r needs to handle servers with no groups.

Guenther

commit 74a9a391aa98dda542ef413d46d2080b450be127
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:42:27 2008 +0200

s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on 
success.

Guenther

---

Summary of changes:
 source3/lib/netapi/group.c   |2 +-
 source3/libsmb/clispnego.c   |4 ++--
 source3/rpc_server/srv_samr_nt.c |2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 8dba4b8..95c012a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1243,7 +1243,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
goto done;
}
 
-   if (r-out.resume_handle) {
+   if (r-out.resume_handle  info.info3.count  0) {
*r-out.resume_handle =
info.info3.entries[info.info3.count-1].idx;
}
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index fd312a4..fb95d71 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -152,7 +152,7 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob,
for (i=0; asn1_tag_remaining(data)  0  i  ASN1_MAX_OIDS-1; i++) {
const char *oid_str = NULL;
asn1_read_OID(data,NULL,oid_str);
-   OIDs[i] = oid_str;
+   OIDs[i] = CONST_DISCARD(char *, oid_str);
}
OIDs[i] = NULL;
asn1_end_tag(data);
@@ -257,7 +257,7 @@ bool parse_negTokenTarg(DATA_BLOB blob, char 
*OIDs[ASN1_MAX_OIDS], DATA_BLOB *se
for (i=0; asn1_tag_remaining(data)  0  i  ASN1_MAX_OIDS-1; i++) {
const char *oid_str = NULL;
asn1_read_OID(data,NULL,oid_str);
-   OIDs[i] = oid_str;
+   OIDs[i] = CONST_DISCARD(char *, oid_str);
}
OIDs[i] = NULL;
asn1_end_tag(data);
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index d08bb50..36be832 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -4908,6 +4908,8 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p,
if (!close_policy_hnd(p, r-in.user_handle))
return NT_STATUS_OBJECT_NAME_INVALID;
 
+   ZERO_STRUCTP(r-out.user_handle);
+
force_flush_samr_cache(disp_info);
 
return NT_STATUS_OK;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4283-g9d325ae

2008-10-22 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  9d325aef4ba694c6adfc0b951baafdee9057ed43 (commit)
   via  8a0054c6d273049bea235803db25912f6cf03610 (commit)
  from  7693d853933e1d7ece9261847bab53e2b73dfa50 (commit)

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


- Log -
commit 9d325aef4ba694c6adfc0b951baafdee9057ed43
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:43:06 2008 +0200

netapi: NetGroupEnum_r needs to handle servers with no groups.

Guenther

commit 8a0054c6d273049bea235803db25912f6cf03610
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:42:27 2008 +0200

s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on 
success.

Guenther

---

Summary of changes:
 source/lib/netapi/group.c   |2 +-
 source/rpc_server/srv_samr_nt.c |2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/group.c b/source/lib/netapi/group.c
index c3fccb4..a78c784 100644
--- a/source/lib/netapi/group.c
+++ b/source/lib/netapi/group.c
@@ -1243,7 +1243,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
goto done;
}
 
-   if (r-out.resume_handle) {
+   if (r-out.resume_handle  info.info3.count  0) {
*r-out.resume_handle =
info.info3.entries[info.info3.count-1].idx;
}
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 5312b0a..86e5d83 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -4908,6 +4908,8 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p,
if (!close_policy_hnd(p, r-in.user_handle))
return NT_STATUS_OBJECT_NAME_INVALID;
 
+   ZERO_STRUCTP(r-out.user_handle);
+
force_flush_samr_cache(disp_info);
 
return NT_STATUS_OK;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3108-g40a904e

2008-10-22 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  40a904ee021e4c9390235f1d476bc37b87ac9b70 (commit)
  from  25cb282f7042e8192c0bc6d720df0646b74e9a47 (commit)

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


- Log -
commit 40a904ee021e4c9390235f1d476bc37b87ac9b70
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 01:42:27 2008 +0200

s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on 
success.

Guenther
(cherry picked from commit 8a0054c6d273049bea235803db25912f6cf03610)

---

Summary of changes:
 source/rpc_server/srv_samr_nt.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 985dd58..ac3cdfa 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -4907,6 +4907,8 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p,
if (!close_policy_hnd(p, r-in.user_handle))
return NT_STATUS_OBJECT_NAME_INVALID;
 
+   ZERO_STRUCTP(r-out.user_handle);
+
force_flush_samr_cache(disp_info);
 
return NT_STATUS_OK;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9

2008-10-22 Thread Günther Deschner
The branch, master has been updated
   via  2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9 (commit)
  from  d115c4587f0d157fcb7f716524d92fbe1899f44c (commit)

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


- Log -
commit 2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 02:18:09 2008 +0200

s4-smbtorture: fix build warning.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index bee2658..847b328 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -825,7 +825,7 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
struct drsuapi_DsGetNT4ChangeLog r;
union drsuapi_DsGetNT4ChangeLogRequest req;
union drsuapi_DsGetNT4ChangeLogInfo info;
-   int32_t level_out = 0;
+   uint32_t level_out = 0;
struct GUID null_guid;
struct dom_sid null_sid;
DATA_BLOB cookie;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954

2008-10-22 Thread Andrew Bartlett
The branch, master has been updated
   via  596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954 (commit)
   via  e79835b096c716124ac5d6e78610e5a76172e649 (commit)
  from  2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9 (commit)

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


- Log -
commit 596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954
Merge: e79835b096c716124ac5d6e78610e5a76172e649 
2f1dbddc3f5433b5b5c542cd3c8fa3050499d8e9
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Thu Oct 23 12:56:30 2008 +1100

Merge branch 'master' of ssh://git.samba.org/data/git/samba into 
master-devel

commit e79835b096c716124ac5d6e78610e5a76172e649
Author: Andrew Bartlett [EMAIL PROTECTED]
Date:   Thu Oct 23 12:50:22 2008 +1100

Clarify the linked attribute module behaviour with comments

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c 
b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 14fd107..190a66c 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -466,6 +466,9 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques
}
}
} else {
+   /* Flag that there was a DELETE
+* without a value specified, so we
+* need to look for the old value */
store_el = true;
}
 
@@ -475,6 +478,7 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques
if (store_el) {
struct ldb_message_element *search_el;
 
+   /* Fill out ac-rc only if we have to find the old 
values */
if (!ac-rc) {
ac-rc = talloc_zero(ac, struct 
replace_context);
if (!ac-rc) {
@@ -499,6 +503,9 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques
 
/* both replace and delete without values are handled in the callback
 * after the search on the entry to be modified is performed */
+
+   /* Only bother doing a search of this entry (to find old
+* values) if replace or delete operations are attempted */
if (ac-rc) {
const char **attrs;
 
@@ -527,9 +534,10 @@ static int linked_attributes_modify(struct ldb_module 
*module, struct ldb_reques
ret = ldb_next_request(module, search_req);
}
 
+   
} else {
if (ac-ops) {
-   /* start the mod requests chain */
+   /* Jump directly to handling the modifies */
ret = la_do_mod_request(ac);
} else {
/* nothing to do for this module, proceed */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 60164e9002c28911dbfd7115cb9bff05be5aff25

2008-10-22 Thread Jelmer Vernooij
The branch, master has been updated
   via  60164e9002c28911dbfd7115cb9bff05be5aff25 (commit)
   via  391ce30d497503ce998d0c5dbab9ea7d4fe3ed3b (commit)
   via  94c522b1ab2e969f8697f386ba6a933d0984a1dc (commit)
   via  e56dff3f7b0d7535ea208081dbbc4e67dcc1709a (commit)
   via  90bfd9d9e12840be0fc2ebe431ec44ee92e8b585 (commit)
   via  3be0f6ea56ed8e43cd287ed020e942efb675b87b (commit)
   via  52923c4ff4406110b82117243552beb0b5d9e1c0 (commit)
   via  ad50d78496537c3a902231c58e51f5c0a12ca536 (commit)
  from  596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954 (commit)

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


- Log -
commit 60164e9002c28911dbfd7115cb9bff05be5aff25
Merge: 391ce30d497503ce998d0c5dbab9ea7d4fe3ed3b 
596089ec06b0a2b2ec3e0e5bd6d46c2e767bd954
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 04:58:08 2008 +0200

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 391ce30d497503ce998d0c5dbab9ea7d4fe3ed3b
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 04:57:44 2008 +0200

Fix header file installation.

commit 94c522b1ab2e969f8697f386ba6a933d0984a1dc
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:29:20 2008 +0200

Import NTSTATUS defines from Samba 3.

commit e56dff3f7b0d7535ea208081dbbc4e67dcc1709a
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:25:00 2008 +0200

Import WERROR defines from Samba 3.

commit 90bfd9d9e12840be0fc2ebe431ec44ee92e8b585
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:13:08 2008 +0200

Import new DOS error codes from Samba 3.

commit 3be0f6ea56ed8e43cd287ed020e942efb675b87b
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:11:19 2008 +0200

Move libcli-util error code to top-level.

commit 52923c4ff4406110b82117243552beb0b5d9e1c0
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:07:27 2008 +0200

Remove unused copy of tables.pl

commit ad50d78496537c3a902231c58e51f5c0a12ca536
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 03:04:48 2008 +0200

Remove unused copy of ndrdump.c.

---

Summary of changes:
 lib/util/asn1_proto.h  |8 +-
 libcli/util/doserr.c   |  163 +
 libcli/util/doserr.h   |  176 +
 libcli/util/error.h|   56 ++
 libcli/util/errormap.c | 1403 
 libcli/util/nterr.c|  897 +
 libcli/util/ntstatus.h |  682 +++
 libcli/util/werror.h   |  263 
 source3/librpc/tables.pl   |   89 ---
 source3/librpc/tools/ndrdump.c |  445 -
 source4/headermap.txt  |8 +-
 source4/libcli/config.mk   |4 +-
 source4/libcli/util/doserr.c   |  163 -
 source4/libcli/util/doserr.h   |  172 -
 source4/libcli/util/error.h|   56 --
 source4/libcli/util/errormap.c | 1403 
 source4/libcli/util/nterr.c|  897 -
 source4/libcli/util/ntstatus.h |  678 ---
 source4/libcli/util/werror.h   |  215 --
 source4/torture/rpc/epmapper.c |2 -
 20 files changed, 3650 insertions(+), 4130 deletions(-)
 create mode 100644 libcli/util/doserr.c
 create mode 100644 libcli/util/doserr.h
 create mode 100644 libcli/util/error.h
 create mode 100644 libcli/util/errormap.c
 create mode 100644 libcli/util/nterr.c
 create mode 100644 libcli/util/ntstatus.h
 create mode 100644 libcli/util/werror.h
 delete mode 100755 source3/librpc/tables.pl
 delete mode 100644 source3/librpc/tools/ndrdump.c
 delete mode 100644 source4/libcli/util/doserr.c
 delete mode 100644 source4/libcli/util/doserr.h
 delete mode 100644 source4/libcli/util/error.h
 delete mode 100644 source4/libcli/util/errormap.c
 delete mode 100644 source4/libcli/util/nterr.c
 delete mode 100644 source4/libcli/util/ntstatus.h
 delete mode 100644 source4/libcli/util/werror.h


Changeset truncated at 500 lines:

diff --git a/lib/util/asn1_proto.h b/lib/util/asn1_proto.h
index bcaf2c2..9b7b4d2 100644
--- a/lib/util/asn1_proto.h
+++ b/lib/util/asn1_proto.h
@@ -1,5 +1,5 @@
-#ifndef ___LIB_UTIL_ASN1_PROTO_H__
-#define ___LIB_UTIL_ASN1_PROTO_H__
+#ifndef _LIB_UTIL_ASN1_PROTO_H__
+#define _LIB_UTIL_ASN1_PROTO_H__
 
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
@@ -10,7 +10,7 @@
  * used outside this particular subsystem! */
 
 
-/* The following definitions come from lib/util/asn1.c  */
+/* The following definitions come from ../lib/util/asn1.c  */
 
 struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx);
 void asn1_free(struct asn1_data *data);
@@ -55,5 +55,5 @@ NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t 
*packet_size);
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)