Re: [Samba] samba+ldap windows problem

2007-01-01 Thread Tim Boneko
Hello Sermodi  happy new year to all!

sermodi schrieb:

 The logon is working the only trouble is that I
 can't get the option for changing the password, when I press the ctrl-alt-del,
 the change password button is unclickable. 

I`m looking for the declaration of a password change command in smb.conf
(global). passwd program looks like what you need; a line like

passwd program = /usr/bin/smbldap-passwd %u


in smb.conf might help.
WARNING: unchecked! I'm at home, no windows system available :-]

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


[Samba] Windows Share Issue

2007-01-01 Thread Keith Lynn

Hello all,
 I have a Samba server running version 2.2.8 that works fine for most 
of the needs that I have. However, I plan to use the Samba server to host 
shares that my users running Windows will use to run backup programs using 
Robocopy. The problem is that when the destination is a Windows drive, 
Robocopy is very fast because it only backs up what hasn't changed. With a 
Linux share, the backup takes a great deal longer I believe because of a 
bit that Windows uses and Linux doesn't. My question is, do the later 
versions of Samba have a way to deal with this problem or is it something 
that can't happen with Linux? Thanks.


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


[Samba] Samba version 3.0.23d-1 and joining a Windows Domain

2007-01-01 Thread Bryan Jones
All,

I installed the new version of samba on my Redhat 9.0 server.  I have samba 
running on another Redhat 9.0 server and the version of samba on that box is 
3.0.21c-1 and this server has successfully joined a W2K Domain.  I am trying to 
migrate the data from the host that works to the new host.  

Here are the steps that I have taken to try and join to the domain.

1. rpm -i -vv samba-3.0.23d-1.i386.rpm
2. vi /etc/samba/smb.conf

[global]
netbios name = snow
workgroup = STORM
server string = Samba Server
realm = STORM.THEBUC.COM
security = DOMAIN
winbind separator = +
idmap uid = 10-20
idmap gid = 10-20
winbind enum users = yes
winbind enum groups = yes
load printers = no
encrypt passwords = yes
dns proxy = no
log level = 10
syslog = 0
log file = /var/log/samba/%m
max log size = 500
smb ports = 139 445
name resolve order = hosts wins bcast
wins server = 192.168.110.3
[software]
comment = Software
path = /d0/shares/software
read only = No
browseable = No
guest ok = No
[spreadsheets]
comment = Spreadsheets
path = /d0/shares/spreadsheets
read only = No
browseable = No
guest ok = No
[work]
comment = Data from Work
path = /d0/shares/work
read only = No
browseable = No
guest ok = No

3. vi /etc/hosts
192.168.110.50  snow
192.168.110.3   cyclone

4. testparm
SNOW# testparm
Load smb config files from /etc/samba/smb.conf
Processing section [software]
Processing section [spreadsheets]
Processing section [work]
Loaded services file OK.
'winbind separator = +' might cause problems with group membership.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

5. /etc/init.d/smb start
6. net rpc join -U Administrator -S cyclone
Password:  
Joined domain STORM.

7. vi /etc/nsswitch.conf
passwd:  compat winbind  
group:  compat winbind  
hosts:  files dns wins  

8. service smb stop
9. nmbd ; smbd ; winbindd

10. wbinfo -u
Error looking up domain users

11. wbinfo -t
checking the trust secret via RPC calls succeeded

12. wbinfo --own-domain
STORM

13.  net rpc info -U Administrator   
Password:
Domain Name: STORM
Domain SID: S-1-5-21-2982344105-4110734383-1059044574
Sequence number: 719
Num users: 34
Num domain groups: 0
Num local groups: 10

14. nmbd; smbd -i -d 3
Maximum core file size limits now 16777216(soft) -1(hard)
get_current_groups: user is in 1 groups: 0
smbd version 3.0.23d started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
uid=0 gid=0 euid=0 egid=0
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file /etc/samba/smb.conf
Processing section [global]
Processing section [software]
Processing section [spreadsheets]
Processing section [work]
adding IPC service
reloading printcap cache
reload status: ok
reloading printcap cache
reload status: ok
added interface ip=192.168.110.50 bcast=192.168.110.255 nmask=255.255.255.0
loaded services
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
get_privileges: No privileges assigned to SID [S-1-22-1-0]
get_privileges: No privileges assigned to SID [S-1-5-2]
get_privileges: No privileges assigned to SID [S-1-5-11]
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11

[Samba] only ROOT user?

2007-01-01 Thread Jeff
Hi all.
I am a total newbie at Samba.

I am running Ubuntu 6.06 (Dapper) and have Samba 3.022 installed.  I am
trying to set it up as a Domain controller (to be a domain server that
Windows machines can log into).

So far, I can get it to do this, but only with the ROOT account.  Any
other account and it tells me that the user/password is incorrect or
invalid.

Below is my smb.conf file.

In the /etc/samba/smbusers... If I use that file and have a line such as

root = anyname

anyname being a valid logon with a password, it will allow the windows
machine to logon using anyname with the correct password, but it logs
the machine in as root.  The windows machine reads root and the
directory and profile on the Linux box is also root.

How do I expand the list of users?

Also, where does logon.bat need to be stored on the server?


Thanks in advance.
Jeff



   [global]
   workgroup = URBANA
   netbios name = SERVER1
   server string = %h server (Samba, Ubuntu)


   passdb backend = tdbsam
   security = user
   username map = /etc/samba/smbusers

   name resolve order = wins bcast hosts
   domain logons = yes
   preferred master = yes
   wins support = yes
   time server = yes

   # Set CUPS for printing
   printcap name = CUPS
   printing = CUPS

   # Default logon
   logon drive = H:
   logon script = scripts/logon.bat
   logon path = \\server1\profile\%U


   # Useradd scripts
   add user script = /usr/sbin/useradd -m %u
   delete user script = /usr/sbin/userdel -r %u
   add group script = /usr/sbin/groupadd %g
   delete group script = /usr/sbin/groupdel %g
   add user to group script = /usr/sbin/usermod -G %g %u
   add machine script = /usr/sbin/useradd -s /bin/false/ -d
/var/lib/nobody %u
   idmap uid = 15000-2
   idmap gid = 15000-2


   # sync smb passwords woth linux passwords
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
   passwd chat debug = yes
   unix password sync = yes

   # set the loglevel
   log level = 3

[homes]
   comment = Home
   valid users = %S
   read only = no
   browsable = no


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


[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   admin users = Administrator mcpike
   valid users = %U
   read only = no


[profile]
   comment = User profiles
   path = /home/samba/profiles
   valid users = %U
   create mode = 0600
   directory mode = 0700
   writable = yes
   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] only ROOT user?

2007-01-01 Thread Gary Dale

Two suggestions:
1) install SWAT and try using it to add users, etc.. (don't forget to 
enable the user after adding them)
2) check out the Samba Howto Collection and Samba by Example on the 
Samba.org web site to get some ideas on how to make things work.


Good luck.


Jeff wrote:

Hi all.
I am a total newbie at Samba.

I am running Ubuntu 6.06 (Dapper) and have Samba 3.022 installed.  I am
trying to set it up as a Domain controller (to be a domain server that
Windows machines can log into).

So far, I can get it to do this, but only with the ROOT account.  Any
other account and it tells me that the user/password is incorrect or
invalid.

Below is my smb.conf file.

In the /etc/samba/smbusers... If I use that file and have a line such as

root = anyname

anyname being a valid logon with a password, it will allow the windows
machine to logon using anyname with the correct password, but it logs
the machine in as root.  The windows machine reads root and the
directory and profile on the Linux box is also root.

How do I expand the list of users?

Also, where does logon.bat need to be stored on the server?


Thanks in advance.
Jeff



   [global]
   workgroup = URBANA
   netbios name = SERVER1
   server string = %h server (Samba, Ubuntu)


   passdb backend = tdbsam
   security = user
   username map = /etc/samba/smbusers

   name resolve order = wins bcast hosts
   domain logons = yes
   preferred master = yes
   wins support = yes
   time server = yes

   # Set CUPS for printing
   printcap name = CUPS
   printing = CUPS

   # Default logon
   logon drive = H:
   logon script = scripts/logon.bat
   logon path = \\server1\profile\%U


   # Useradd scripts
   add user script = /usr/sbin/useradd -m %u
   delete user script = /usr/sbin/userdel -r %u
   add group script = /usr/sbin/groupadd %g
   delete group script = /usr/sbin/groupdel %g
   add user to group script = /usr/sbin/usermod -G %g %u
   add machine script = /usr/sbin/useradd -s /bin/false/ -d
/var/lib/nobody %u
   idmap uid = 15000-2
   idmap gid = 15000-2


   # sync smb passwords woth linux passwords
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
   passwd chat debug = yes
   unix password sync = yes

   # set the loglevel
   log level = 3

[homes]
   comment = Home
   valid users = %S
   read only = no
   browsable = no


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


[netlogon]
   comment = Network Logon Service
   path = /home/samba/netlogon
   admin users = Administrator mcpike
   valid users = %U
   read only = no


[profile]
   comment = User profiles
   path = /home/samba/profiles
   valid users = %U
   create mode = 0600
   directory mode = 0700
   writable = yes
   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] samba+ldap windows problem

2007-01-01 Thread Tim Boneko
Hello Sermodi  happy new year to all!

sermodi schrieb:

 The logon is working the only trouble is that I
 can't get the option for changing the password, when I press the ctrl-alt-del,
 the change password button is unclickable. 

I`m looking for the declaration of a password change command in smb.conf
(global). passwd program looks like what you need; a line like

passwd program = /usr/bin/smbldap-passwd %u


in smb.conf might help.
WARNING: unchecked! I'm at home, no windows system available :-]

timbo

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


Re: [Samba] Migrate to Debian Etch - nogo

2007-01-01 Thread Tim Boneko
Hello André!

André Jee schrieb:

 sweetums:/# net groupmap list
 sweetums:/#

That's definitely an error. Did you try testparm? If not, please do so
and quote the output.

 So I can't do 'net groupmap modify ntgroup=Domain Admins
 unixgroup=admin' either because there are no such group.

That's obvious...
Was Samba running when you ran net groupmap list?

timbo

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


[Samba] Error: STATUS_OBJECT_NAME_NOT_FOUND

2007-01-01 Thread Kevin Layer
[I didn't see any replies to my 12/27 post... so reposting it]

One day samba was working fine, the next it wasn't.  I didn't change
anything on either the Fedora Core 6 machine (relay) nor the XP Pro
machine (oob2).

I'm running Samba 3.0.23c on a fully patched FC6 x86 box.

I followed all the steps in Procedure 38.1. Diagnosing Your Samba
Server, and until I got to step 8 everything worked fine.  From the
broken xp pro machine:

   oob2$ net view '\\relay'
   The Server service is not started.

   More help is available by typing NET HELPMSG 2114.

   oob2$ 

(`relay' is the `fc6' machine.  `oob2' is the broken xp pro box.)

The `server' service is running.  I stopped and started again
countless times, and rebooted the xppro machine.

I uninstalled samba from the fc6 machine (saving /etc/samba/smb.conf
and restoring it afterwards... see below).  Same problem after
reinstallation.

I can view other machines (an xppro machine) on the broken
xppro machine:

   oob2$ net view '\\dude'
   Shared resources at \\dude

   kevin's computer

   Share name  Type  Used as  Comment  

   
   c   Disk
   The command completed successfully.

   oob2$ 

I downloaded wireshark 0.99.4 and found the point at which the good
xppro (dude) and bad xppro (oob2) machines diverge:

   good:
   dude - relay: NT Trans Request, NT CREATE
   relay - dude: Nt Trans Response, NT CREATE, FID: 0x4000

   bad:
   oob2 - relay: NT Trans Request, NT CREATE
   relay - oob2: Nt Trans Response, NT CREATE,
  Error: STATUS_OBJECT_NAME_NOT_FOUND

So, I turned on debugging in smbd, and see this, which lines up
perfectly with the wireshark output:

[2006/12/27 14:01:05, 5] auth/auth_util.c:debug_unix_user_token(474)
  UNIX token of user 500
  Primary group is 100 and contains 1 supplementary groups
  Group[  0]: 100
[2006/12/27 14:01:05, 5] smbd/uid.c:change_to_user(260)
  change_to_user uid=(500,500) gid=(0,100)
[2006/12/27 14:01:05, 4] smbd/vfs.c:vfs_ChDir(741)
  vfs_ChDir to /tmp
[2006/12/27 14:01:05, 5] smbd/nttrans.c:call_nt_transact_create(1117)
  call_nt_transact_create
[2006/12/27 14:01:05, 4] smbd/nttrans.c:nt_open_pipe(325)
  nt_open_pipe: Opening pipe srvsvc.
[2006/12/27 14:01:05, 3] smbd/error.c:error_packet(146)
  error packet at smbd/nttrans.c(340) cmd=160 (SMBnttrans) 
NT_STATUS_OBJECT_NAME_NOT_FOUND


Thinking it might have to do with cruft in /tmp, I removed everything
that `lsof' said wasn't open by something (all but 2 files, unrelated
to samba). 

Here's my /etc/samba/smb.conf file:

[global]
   workgroup = FRANZ
   server string = Samba Server
   security = user
   log file = /var/log/samba/%m.log
   interfaces = 192.168.0.0/24
   allow hosts = 192.168.0.0/24
   bind interfaces only = yes
# disable printing completely:
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes

[homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mode = 0750

[tmp]
   comment = /tmp
   path = /tmp
   valid users = layer
   public = no
   writable = yes
   create mask = 0755

...

Ideas?  I'm fresh out.  I have no idea how to debug this further.

Thanks.

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


Re: [Samba] Samba version 3.0.23d-1 and joining a Windows Domain

2007-01-01 Thread Henrik Zagerholm

Shouldn't  security = DOMAIN be ADS instead?

1 jan 2007 kl. 20:29 skrev Bryan Jones:


All,

I installed the new version of samba on my Redhat 9.0 server.  I  
have samba running on another Redhat 9.0 server and the version of  
samba on that box is 3.0.21c-1 and this server has successfully  
joined a W2K Domain.  I am trying to migrate the data from the host  
that works to the new host.


Here are the steps that I have taken to try and join to the domain.

1. rpm -i -vv samba-3.0.23d-1.i386.rpm
2. vi /etc/samba/smb.conf

[global]
netbios name = snow
workgroup = STORM
server string = Samba Server
realm = STORM.THEBUC.COM
security = DOMAIN
winbind separator = +
idmap uid = 10-20
idmap gid = 10-20
winbind enum users = yes
winbind enum groups = yes
load printers = no
encrypt passwords = yes
dns proxy = no
log level = 10
syslog = 0
log file = /var/log/samba/%m
max log size = 500
smb ports = 139 445
name resolve order = hosts wins bcast
wins server = 192.168.110.3
[software]
comment = Software
path = /d0/shares/software
read only = No
browseable = No
guest ok = No
[spreadsheets]
comment = Spreadsheets
path = /d0/shares/spreadsheets
read only = No
browseable = No
guest ok = No
[work]
comment = Data from Work
path = /d0/shares/work
read only = No
browseable = No
guest ok = No

3. vi /etc/hosts
192.168.110.50  snow
192.168.110.3   cyclone

4. testparm
SNOW# testparm
Load smb config files from /etc/samba/smb.conf
Processing section [software]
Processing section [spreadsheets]
Processing section [work]
Loaded services file OK.
'winbind separator = +' might cause problems with group membership.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

5. /etc/init.d/smb start
6. net rpc join -U Administrator -S cyclone
Password:  
Joined domain STORM.

7. vi /etc/nsswitch.conf
passwd:  compat winbind
group:  compat winbind
hosts:  files dns wins

8. service smb stop
9. nmbd ; smbd ; winbindd

10. wbinfo -u
Error looking up domain users

11. wbinfo -t
checking the trust secret via RPC calls succeeded

12. wbinfo --own-domain
STORM

13.  net rpc info -U Administrator
Password:
Domain Name: STORM
Domain SID: S-1-5-21-2982344105-4110734383-1059044574
Sequence number: 719
Num users: 34
Num domain groups: 0
Num local groups: 10

14. nmbd; smbd -i -d 3
Maximum core file size limits now 16777216(soft) -1(hard)
get_current_groups: user is in 1 groups: 0
smbd version 3.0.23d started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
uid=0 gid=0 euid=0 egid=0
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file /etc/samba/ 
smb.conf

Processing section [global]
Processing section [software]
Processing section [spreadsheets]
Processing section [work]
adding IPC service
reloading printcap cache
reload status: ok
reloading printcap cache
reload status: ok
added interface ip=192.168.110.50 bcast=192.168.110.255  
nmask=255.255.255.0

loaded services
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
push_conn_ctx(0) : conn_ctx_stack_ndx = 0
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
get_privileges: No privileges assigned to SID [S-1-22-1-0]
get_privileges: No privileges assigned to SID [S-1-5-2]
get_privileges: No privileges assigned to SID [S-1-5-11]
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0
se_access_check: also S-1-5-2
se_access_check: also S-1-5-11
se_access_check: user sid is S-1-22-1-0
se_access_check: also S-1-5-32-544
se_access_check: also S-1-1-0

svn commit: samba r20447 - in branches/SAMBA_3_0_24/source/include: .

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 17:28:58 + (Mon, 01 Jan 2007)
New Revision: 20447

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

Log:
Happy New Year!

metze
Modified:
   branches/SAMBA_3_0_24/source/include/smb.h


Changeset:
Modified: branches/SAMBA_3_0_24/source/include/smb.h
===
--- branches/SAMBA_3_0_24/source/include/smb.h  2006-12-31 20:12:12 UTC (rev 
20446)
+++ branches/SAMBA_3_0_24/source/include/smb.h  2007-01-01 17:28:58 UTC (rev 
20447)
@@ -28,7 +28,7 @@
 #define _SMB_H
 
 /* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE  Copyright Andrew Tridgell and the 
Samba Team 1992-2006
+#define COPYRIGHT_STARTUP_MESSAGE  Copyright Andrew Tridgell and the 
Samba Team 1992-2007
 
 
 #if defined(LARGE_SMB_OFF_T)



svn commit: samba r20448 - in branches/SAMBA_3_0/source/include: .

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 17:29:20 + (Mon, 01 Jan 2007)
New Revision: 20448

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

Log:
Happy New Year!

metze
Modified:
   branches/SAMBA_3_0/source/include/smb.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2007-01-01 17:28:58 UTC (rev 
20447)
+++ branches/SAMBA_3_0/source/include/smb.h 2007-01-01 17:29:20 UTC (rev 
20448)
@@ -28,7 +28,7 @@
 #define _SMB_H
 
 /* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE  Copyright Andrew Tridgell and the 
Samba Team 1992-2006
+#define COPYRIGHT_STARTUP_MESSAGE  Copyright Andrew Tridgell and the 
Samba Team 1992-2007
 
 
 #if defined(LARGE_SMB_OFF_T)



svn commit: samba r20449 - in branches/SAMBA_4_0/source/smbd: .

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 17:29:50 + (Mon, 01 Jan 2007)
New Revision: 20449

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

Log:
Happy New Year!

metze
Modified:
   branches/SAMBA_4_0/source/smbd/server.c


Changeset:
Modified: branches/SAMBA_4_0/source/smbd/server.c
===
--- branches/SAMBA_4_0/source/smbd/server.c 2007-01-01 17:29:20 UTC (rev 
20448)
+++ branches/SAMBA_4_0/source/smbd/server.c 2007-01-01 17:29:50 UTC (rev 
20449)
@@ -229,7 +229,7 @@
umask(0);
 
DEBUG(0,(%s version %s started.\n, binary_name, 
SAMBA_VERSION_STRING));
-   DEBUGADD(0,(Copyright Andrew Tridgell and the Samba Team 
1992-2006\n));
+   DEBUGADD(0,(Copyright Andrew Tridgell and the Samba Team 
1992-2007\n));
 
if (sizeof(uint16_t)  2 || sizeof(uint32_t)  4 || sizeof(uint64_t)  
8) {
DEBUG(0,(ERROR: Samba is not configured correctly for the word 
size on your machine\n));



svn commit: samba r20450 - in branches/SAMBA_4_0/source/dsdb/schema: .

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 17:40:19 + (Mon, 01 Jan 2007)
New Revision: 20450

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

Log:
implement conversation of unicode strings

metze
Modified:
   branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
===
--- branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
17:29:50 UTC (rev 20449)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
17:40:19 UTC (rev 20450)
@@ -24,6 +24,7 @@
 #include librpc/gen_ndr/drsuapi.h
 #include lib/ldb/include/ldb.h
 #include system/time.h
+#include lib/charset/charset.h
 
 static WERROR dsdb_syntax_FOOBAR_drsuapi_to_ldb(const struct dsdb_schema 
*schema,
const struct dsdb_attribute 
*attr,
@@ -661,6 +662,100 @@
return WERR_OK;
 }
 
+static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(const struct dsdb_schema 
*schema,
+const struct dsdb_attribute 
*attr,
+const struct 
drsuapi_DsReplicaAttribute *in,
+TALLOC_CTX *mem_ctx,
+struct ldb_message_element 
*out)
+{
+   uint32_t i;
+
+switch (attr-attributeID_id) {
+case DRSUAPI_ATTRIBUTE_description:
+case DRSUAPI_ATTRIBUTE_adminDisplayName:
+case DRSUAPI_ATTRIBUTE_adminDescription:
+case DRSUAPI_ATTRIBUTE_lDAPDisplayName:
+case DRSUAPI_ATTRIBUTE_name:
+case DRSUAPI_ATTRIBUTE_sAMAccountName:
+case DRSUAPI_ATTRIBUTE_gPLink:
+   return dsdb_syntax_FOOBAR_drsuapi_to_ldb(schema,attr, in, mem_ctx, out);
+}
+
+   out-flags  = 0;
+   out-name   = talloc_strdup(mem_ctx, attr-lDAPDisplayName);
+   W_ERROR_HAVE_NO_MEMORY(out-name);
+
+   out-num_values = in-value_ctr.data_blob.num_values;
+   out-values = talloc_array(mem_ctx, struct ldb_val, 
out-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-values);
+
+   for (i=0; i  out-num_values; i++) {
+   ssize_t ret;
+   char *str;
+
+   if (in-value_ctr.data_blob.values[i].data == NULL) {
+   return WERR_FOOBAR;
+   }
+
+   if (in-value_ctr.data_blob.values[i].data-length == 0) {
+   return WERR_FOOBAR;
+   }
+
+   ret = convert_string_talloc(out-values, CH_UTF16, CH_UNIX,
+   
in-value_ctr.data_blob.values[i].data-data,
+   
in-value_ctr.data_blob.values[i].data-length,
+   (void **)str);
+   if (ret == -1) {
+   return WERR_FOOBAR;
+   }
+
+   out-values[i] = data_blob_string_const(str);
+   }
+
+   return WERR_OK;
+}
+
+static WERROR dsdb_syntax_UNICODE_ldb_to_drsuapi(const struct dsdb_schema 
*schema,
+const struct dsdb_attribute 
*attr,
+const struct 
ldb_message_element *in,
+TALLOC_CTX *mem_ctx,
+struct 
drsuapi_DsReplicaAttribute *out)
+{
+   uint32_t i;
+   DATA_BLOB *blobs;
+
+   if (attr-attributeID_id == 0x) {
+   return WERR_FOOBAR;
+   }
+
+   out-attid  = attr-attributeID_id;
+   out-value_ctr.data_blob.num_values = in-num_values;
+   out-value_ctr.data_blob.values = talloc_array(mem_ctx,
+  struct 
drsuapi_DsAttributeValueDataBlob,
+  in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-value_ctr.data_blob.values);
+
+   blobs = talloc_array(mem_ctx, DATA_BLOB, in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(blobs);
+
+   for (i=0; i  in-num_values; i++) {
+   ssize_t ret;
+
+   out-value_ctr.data_blob.values[i].data = blobs[i];
+
+   ret = convert_string_talloc(blobs, CH_UNIX, CH_UTF16,
+   in-values[i].data,
+   in-values[i].length,
+   (void **)blobs[i].data);
+   if (ret == -1) {
+   return WERR_FOOBAR;
+   }
+   blobs[i].length = ret;
+   }
+
+   return WERR_OK;
+}
+
 #define OMOBJECTCLASS(val) { .length = sizeof(val) - 1, .data = 
discard_const_p(uint8_t, val) }
 
 static const struct dsdb_syntax dsdb_syntaxes[] = {
@@ -766,8 +861,8 @@
.ldap_oid   = 1.3.6.1.4.1.1466.115.121.1.15,
   

svn commit: samba r20451 - in branches/SAMBA_3_0/source: include smbd

2007-01-01 Thread vlendec
Author: vlendec
Date: 2007-01-01 18:11:32 + (Mon, 01 Jan 2007)
New Revision: 20451

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

Log:
Survive the first of the filter-tests (mkdir).

Add lots of TODOs :-)

Volker

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/smbd/notify.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/open.c
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2007-01-01 17:40:19 UTC (rev 
20450)
+++ branches/SAMBA_3_0/source/include/smb.h 2007-01-01 18:11:32 UTC (rev 
20451)
@@ -440,6 +440,7 @@
struct notify_change_request *prev, *next;
struct files_struct *fsp;   /* backpointer for cancel by mid */
char request_buf[smb_size];
+   uint32 filter;
uint32 max_param_count;
struct notify_mid_map *mid_map;
 };

Modified: branches/SAMBA_3_0/source/smbd/notify.c
===
--- branches/SAMBA_3_0/source/smbd/notify.c 2007-01-01 17:40:19 UTC (rev 
20450)
+++ branches/SAMBA_3_0/source/smbd/notify.c 2007-01-01 18:11:32 UTC (rev 
20451)
@@ -171,7 +171,7 @@
 }
 
 NTSTATUS change_notify_add_request(const char *inbuf, uint32 max_param_count,
-  struct files_struct *fsp)
+  uint32 filter, struct files_struct *fsp)
 {
struct notify_change_request *request = NULL;
struct notify_mid_map *map = NULL;
@@ -187,6 +187,7 @@
 
memcpy(request-request_buf, inbuf, sizeof(request-request_buf));
request-max_param_count = max_param_count;
+   request-filter = filter;
request-fsp = fsp;
DLIST_ADD_END(fsp-notify-requests, request,
  struct notify_change_request *);
@@ -406,16 +407,18 @@
 Offset  Data   length.
 0  SMB_DEV_T dev   8
 8  SMB_INO_T inode 8
-16 uint32 action   4
-20..   name
+16 uint32 filter   4
+20 uint32 action   4
+24..   name
 */
 
-#define MSG_NOTIFY_MESSAGE_SIZE 21 /* Includes at least the '\0' terminator */
+#define MSG_NOTIFY_MESSAGE_SIZE 25 /* Includes at least the '\0' terminator */
 
 struct notify_message {
SMB_DEV_T dev;
SMB_INO_T inode;
-   uint32_t action;
+   uint32 filter;
+   uint32 action;
char *name;
 };
 
@@ -433,8 +436,9 @@
 
SDEV_T_VAL(result.data, 0, msg-dev);
SINO_T_VAL(result.data, 8, msg-inode);
-   SIVAL(result.data, 16, msg-action);
-   memcpy(result.data+20, msg-name, len+1);
+   SIVAL(result.data, 16, msg-filter);
+   SIVAL(result.data, 20, msg-action);
+   memcpy(result.data+24, msg-name, len+1);
 
return result;
 }
@@ -450,13 +454,14 @@
 
msg-dev = DEV_T_VAL(buf, 0);
msg-inode   = INO_T_VAL(buf, 8);
-   msg-action  = IVAL(buf, 16);
-   msg-name= ((char *)buf)+20;
+   msg-filter  = IVAL(buf, 16);
+   msg-action  = IVAL(buf, 20);
+   msg-name= ((char *)buf)+24;
return True;
 }
 
 void notify_action(connection_struct *conn, const char *parent,
-  const char *name, uint32_t action)
+  const char *name, uint32 filter, uint32_t action)
 {
struct share_mode_lock *lck;
SMB_STRUCT_STAT sbuf;
@@ -484,6 +489,7 @@
 
msg.dev = sbuf.st_dev;
msg.inode = sbuf.st_ino;
+   msg.filter = filter;
msg.action = action;
msg.name = CONST_DISCARD(char *, name);
 
@@ -546,10 +552,13 @@
return;
}
 
-   if (fsp-notify-requests != NULL) {
+   if ((fsp-notify-requests != NULL)
+(fsp-notify-requests-filter  msg-filter)) {
/*
 * Someone is waiting for the change, trigger the reply
-* immediately
+* immediately.
+*
+* TODO: do we have to walk the lists of requests pending?
 */
 
struct notify_change_request *req = fsp-notify-requests;
@@ -560,15 +569,14 @@
 
change_notify_reply(req-request_buf, req-max_param_count,
1, onechange);
-
-   DLIST_REMOVE(fsp-notify-requests, req);
-   SAFE_FREE(req);
+   change_notify_remove_request(req);
return;
}
 
/*
 * Someone has triggered a notify previously, queue the change for
-* later. TODO: Limit the number of changes queued.
+* later. TODO: Limit the number of changes queued, test how filters
+* apply here. Do we have to store them?
 */
 
if (!(changes = TALLOC_REALLOC_ARRAY(

Modified: branches/SAMBA_3_0/source/smbd/nttrans.c

svn commit: samba r20452 - in branches/SAMBA_4_0/source/dsdb/schema: .

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 18:33:20 + (Mon, 01 Jan 2007)
New Revision: 20452

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

Log:
add conversation for DN strings.

TODO: we need to implement linked attributes here,
  and keep the guid and sid

metze
Modified:
   branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
===
--- branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
18:11:32 UTC (rev 20451)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
18:33:20 UTC (rev 20452)
@@ -21,10 +21,11 @@
 */
 #include includes.h
 #include dsdb/samdb/samdb.h
-#include librpc/gen_ndr/drsuapi.h
+#include librpc/gen_ndr/ndr_drsuapi.h
 #include lib/ldb/include/ldb.h
 #include system/time.h
 #include lib/charset/charset.h
+#include librpc/ndr/libndr.h
 
 static WERROR dsdb_syntax_FOOBAR_drsuapi_to_ldb(const struct dsdb_schema 
*schema,
const struct dsdb_attribute 
*attr,
@@ -756,6 +757,105 @@
return WERR_OK;
 }
 
+static WERROR dsdb_syntax_DN_drsuapi_to_ldb(const struct dsdb_schema *schema,
+   const struct dsdb_attribute *attr,
+   const struct 
drsuapi_DsReplicaAttribute *in,
+   TALLOC_CTX *mem_ctx,
+   struct ldb_message_element *out)
+{
+   uint32_t i;
+
+switch (attr-attributeID_id) {
+case DRSUAPI_ATTRIBUTE_member:
+case DRSUAPI_ATTRIBUTE_objectCategory:
+case DRSUAPI_ATTRIBUTE_hasMasterNCs:
+case DRSUAPI_ATTRIBUTE_dMDLocation:
+case DRSUAPI_ATTRIBUTE_fSMORoleOwner:
+case DRSUAPI_ATTRIBUTE_wellKnownObjects:
+case DRSUAPI_ATTRIBUTE_serverReference:
+case DRSUAPI_ATTRIBUTE_serverReferenceBL:
+case DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs:
+case DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs:
+   return dsdb_syntax_FOOBAR_drsuapi_to_ldb(schema,attr, in, mem_ctx, out);
+}
+
+   out-flags  = 0;
+   out-name   = talloc_strdup(mem_ctx, attr-lDAPDisplayName);
+   W_ERROR_HAVE_NO_MEMORY(out-name);
+
+   out-num_values = in-value_ctr.data_blob.num_values;
+   out-values = talloc_array(mem_ctx, struct ldb_val, 
out-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-values);
+
+   for (i=0; i  out-num_values; i++) {
+   struct drsuapi_DsReplicaObjectIdentifier3 id3;
+   NTSTATUS status;
+
+   if (in-value_ctr.data_blob.values[i].data == NULL) {
+   return WERR_FOOBAR;
+   }
+
+   if (in-value_ctr.data_blob.values[i].data-length == 0) {
+   return WERR_FOOBAR;
+   }
+
+   status = 
ndr_pull_struct_blob_all(in-value_ctr.data_blob.values[i].data,
+ out-values, id3,
+ 
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
+   if (!NT_STATUS_IS_OK(status)) {
+   return ntstatus_to_werror(status);
+   }
+
+   /* TODO: handle id3.guid and id3.sid */
+   out-values[i] = data_blob_string_const(id3.dn);
+   }
+
+   return WERR_OK;
+}
+
+static WERROR dsdb_syntax_DN_ldb_to_drsuapi(const struct dsdb_schema *schema,
+   const struct dsdb_attribute *attr,
+   const struct ldb_message_element 
*in,
+   TALLOC_CTX *mem_ctx,
+   struct drsuapi_DsReplicaAttribute 
*out)
+{
+   uint32_t i;
+   DATA_BLOB *blobs;
+
+   if (attr-attributeID_id == 0x) {
+   return WERR_FOOBAR;
+   }
+
+   out-attid  = attr-attributeID_id;
+   out-value_ctr.data_blob.num_values = in-num_values;
+   out-value_ctr.data_blob.values = talloc_array(mem_ctx,
+  struct 
drsuapi_DsAttributeValueDataBlob,
+  in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-value_ctr.data_blob.values);
+
+   blobs = talloc_array(mem_ctx, DATA_BLOB, in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(blobs);
+
+   for (i=0; i  in-num_values; i++) {
+   NTSTATUS status;
+   struct drsuapi_DsReplicaObjectIdentifier3 id3;
+
+   out-value_ctr.data_blob.values[i].data = blobs[i];
+
+   /* TODO: handle id3.guid and id3.sid */
+   ZERO_STRUCT(id3);
+   id3.dn = (const char *)in-values[i].data;
+
+   status = ndr_push_struct_blob(blobs[i], blobs, id3,
+

svn commit: samba r20453 - in branches/SAMBA_4_0/source: dsdb/schema librpc/idl

2007-01-01 Thread metze
Author: metze
Date: 2007-01-01 19:35:03 + (Mon, 01 Jan 2007)
New Revision: 20453

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

Log:
add conversation for the DN_BINARY attribute syntax

the ldb_to_drsuapi version need to be completed, but it's
currently not used...

metze
Modified:
   branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
   branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
===
--- branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
18:33:20 UTC (rev 20452)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c   2007-01-01 
19:35:03 UTC (rev 20453)
@@ -856,6 +856,104 @@
return WERR_OK;
 }
 
+static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(const struct dsdb_schema 
*schema,
+  const struct dsdb_attribute 
*attr,
+  const struct 
drsuapi_DsReplicaAttribute *in,
+  TALLOC_CTX *mem_ctx,
+  struct ldb_message_element 
*out)
+{
+   uint32_t i;
+
+   out-flags  = 0;
+   out-name   = talloc_strdup(mem_ctx, attr-lDAPDisplayName);
+   W_ERROR_HAVE_NO_MEMORY(out-name);
+
+   out-num_values = in-value_ctr.data_blob.num_values;
+   out-values = talloc_array(mem_ctx, struct ldb_val, 
out-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-values);
+
+   for (i=0; i  out-num_values; i++) {
+   struct drsuapi_DsReplicaObjectIdentifier3Binary id3b;
+   char *binary;
+   char *str;
+   NTSTATUS status;
+
+   if (in-value_ctr.data_blob.values[i].data == NULL) {
+   return WERR_FOOBAR;
+   }
+
+   if (in-value_ctr.data_blob.values[i].data-length == 0) {
+   return WERR_FOOBAR;
+   }
+
+   status = 
ndr_pull_struct_blob(in-value_ctr.data_blob.values[i].data,
+ out-values, id3b,
+ 
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
+   if (!NT_STATUS_IS_OK(status)) {
+   return ntstatus_to_werror(status);
+   }
+
+   /* TODO: handle id3.guid and id3.sid */
+   binary = data_blob_hex_string(out-values, id3b.binary);
+   W_ERROR_HAVE_NO_MEMORY(binary);
+
+   str = talloc_asprintf(out-values, B:%u:%s:%s,
+ id3b.binary.length * 2, /* because of 2 
hex chars per byte */
+ binary,
+ id3b.dn);
+   W_ERROR_HAVE_NO_MEMORY(str);
+
+   /* TODO: handle id3.guid and id3.sid */
+   out-values[i] = data_blob_string_const(str);
+   }
+
+   return WERR_OK;
+}
+
+static WERROR dsdb_syntax_DN_BINARY_ldb_to_drsuapi(const struct dsdb_schema 
*schema,
+  const struct dsdb_attribute 
*attr,
+  const struct 
ldb_message_element *in,
+  TALLOC_CTX *mem_ctx,
+  struct 
drsuapi_DsReplicaAttribute *out)
+{
+   uint32_t i;
+   DATA_BLOB *blobs;
+
+   if (attr-attributeID_id == 0x) {
+   return WERR_FOOBAR;
+   }
+
+   out-attid  = attr-attributeID_id;
+   out-value_ctr.data_blob.num_values = in-num_values;
+   out-value_ctr.data_blob.values = talloc_array(mem_ctx,
+  struct 
drsuapi_DsAttributeValueDataBlob,
+  in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(out-value_ctr.data_blob.values);
+
+   blobs = talloc_array(mem_ctx, DATA_BLOB, in-num_values);
+   W_ERROR_HAVE_NO_MEMORY(blobs);
+
+   for (i=0; i  in-num_values; i++) {
+   NTSTATUS status;
+   struct drsuapi_DsReplicaObjectIdentifier3Binary id3b;
+
+   out-value_ctr.data_blob.values[i].data = blobs[i];
+
+   /* TODO: handle id3b.guid and id3b.sid, id3.binary */
+   ZERO_STRUCT(id3b);
+   id3b.dn = (const char *)in-values[i].data;
+   id3b.binary = data_blob(NULL, 0);
+
+   status = ndr_push_struct_blob(blobs[i], blobs, id3b,
+ 
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
+   if (!NT_STATUS_IS_OK(status)) {
+   return 

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

2007-01-01 Thread vlendec
Author: vlendec
Date: 2007-01-01 21:37:02 + (Mon, 01 Jan 2007)
New Revision: 20454

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

Log:
Get rid of a bogus variable that was only assigned but never read.

Jeremy, please check this.

Thanks,

Volker

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2007-01-01 19:35:03 UTC (rev 
20453)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2007-01-01 21:37:02 UTC (rev 
20454)
@@ -3316,11 +3316,7 @@
 * Close ordinary file.
 */
int close_err;
-   pstring file_name;
 
-   /* Save the name for time set in close. */
-   pstrcpy( file_name, fsp-fsp_name);
-
DEBUG(3,(close fd=%d fnum=%d (numopen=%d)\n,
 fsp-fh-fd, fsp-fnum,
 conn-num_files_open));



Build status as of Tue Jan 2 00:00:02 2007

2007-01-01 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-01-01 
00:00:24.0 +
+++ /home/build/master/cache/broken_results.txt 2007-01-02 00:00:32.0 
+
@@ -1,4 +1,4 @@
-Build status as of Mon Jan  1 00:00:02 2007
+Build status as of Tue Jan  2 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -7,16 +7,16 @@
 ccache   36 7  0 
 ctdb 0  0  0 
 distcc   2  0  0 
-ldb  36 4  0 
+ldb  35 4  0 
 libreplace   34 2  0 
-lorikeet-heimdal 33 18 0 
-ppp  17 0  0 
-rsync37 5  0 
+lorikeet-heimdal 32 17 0 
+ppp  16 0  0 
+rsync35 5  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   35 21 0 
-samba_3_037 10 0 
-smb-build34 2  0 
-talloc   37 2  0 
-tdb  36 4  0 
+samba4   34 20 0 
+samba_3_036 10 0 
+smb-build33 2  0 
+talloc   36 2  0 
+tdb  35 4  0 
 


svn commit: samba r20455 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/samba3

2007-01-01 Thread abartlet
Author: abartlet
Date: 2007-01-02 01:07:44 + (Tue, 02 Jan 2007)
New Revision: 20455

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

Log:
Apply some of the patches from Martin Kuehl [EMAIL PROTECTED] to
better handle the Samba3 backend.

I've refactored the password format patch to use the routines in
lib/samba3/smbpasswd.c, which has required me to move this into a
seperate subsystem, due to recursive dependencies.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
   branches/SAMBA_4_0/source/lib/samba3/config.mk
   branches/SAMBA_4_0/source/lib/samba3/samba3.h


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2007-01-01 
21:37:02 UTC (rev 20454)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2007-01-02 
01:07:44 UTC (rev 20455)
@@ -28,7 +28,7 @@
 [MODULE::ldb_samba3sam]
 SUBSYSTEM = ldb
 INIT_FUNCTION = ldb_samba3sam_module_init
-PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map
+PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD
 OBJ_FILES = \
samba3sam.o
 #

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
2007-01-01 21:37:02 UTC (rev 20454)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
2007-01-02 01:07:44 UTC (rev 20455)
@@ -1,7 +1,8 @@
-/* 
+/*
ldb database library - Samba3 SAM compatibility backend
 
Copyright (C) Jelmer Vernooij 2005
+   Copyright (C) Martin Kuehl [EMAIL PROTECTED] 2006
 */
 
 #include includes.h
@@ -12,32 +13,34 @@
 #include system/passwd.h
 
 #include librpc/gen_ndr/ndr_security.h
+#include librpc/gen_ndr/ndr_samr.h
 #include librpc/ndr/libndr.h
 #include libcli/security/security.h
 #include libcli/security/proto.h
+#include lib/samba3/samba3.h
 
-/* 
+/*
  * sambaSID - member  (dn!)
- * sambaSIDList - member (dn!) 
- * sambaDomainName - name 
- * sambaTrustPassword 
- * sambaUnixIdPool 
- * sambaIdmapEntry 
- * sambaAccountPolicy 
- * sambaSidEntry 
+ * sambaSIDList - member (dn!)
+ * sambaDomainName - name
+ * sambaTrustPassword
+ * sambaUnixIdPool
+ * sambaIdmapEntry
+ * sambaAccountPolicy
+ * sambaSidEntry
  * sambaAcctFlags - systemFlags ?
  * sambaPasswordHistory  - ntPwdHistory*/
 
 /* Not necessary:
  * sambaConfig
  * sambaShare
- * sambaConfigOption 
+ * sambaConfigOption
  * sambaNextGroupRid
  * sambaNextUserRid
  * sambaAlgorithmicRidBase
  */
 
-/* Not in Samba4: 
+/* Not in Samba4:
  * sambaKickoffTime
  * sambaPwdCanChange
  * sambaPwdMustChange
@@ -86,7 +89,7 @@
/* We need the domain, so we get it from the objectSid that we hope is 
here... */
sidval = ldb_msg_find_ldb_val(local, objectSid);
 
-   if (!sidval) 
+   if (!sidval)
return; /* Sorry, no SID today.. */
 
sid = talloc(remote_mp, struct dom_sid);
@@ -110,9 +113,13 @@
talloc_free(sidstring);
 }
 
+/* Just copy the old value. */
 static struct ldb_val convert_uid_samaccount(struct ldb_module *module, 
TALLOC_CTX *ctx, const struct ldb_val *val)
 {
-   return ldb_val_dup(ctx, val);
+   struct ldb_val out = data_blob(NULL, 0);
+   ldb_handler_copy(module-ldb, ctx, val, out);
+
+   return out;
 }
 
 static struct ldb_val lookup_homedir(struct ldb_module *module, TALLOC_CTX 
*ctx, const struct ldb_val *val)
@@ -167,49 +174,88 @@
return retval;
 }
 
+/* Encode a sambaSID to an objectSid. */
 static struct ldb_val encode_sid(struct ldb_module *module, TALLOC_CTX *ctx, 
const struct ldb_val *val)
 {
-   struct dom_sid *sid = dom_sid_parse_talloc(ctx, (char *)val-data);
-   struct ldb_val *out = talloc_zero(ctx, struct ldb_val);
+   struct ldb_val out = data_blob(NULL, 0);
+   struct dom_sid *sid;
NTSTATUS status;
 
+   sid = dom_sid_parse_talloc(ctx, (char *)val-data);
if (sid == NULL) {
-   return *out;
+   return out;
}
-   status = ndr_push_struct_blob(out, ctx, sid, 
+
+   status = ndr_push_struct_blob(out, ctx, sid,
  (ndr_push_flags_fn_t)ndr_push_dom_sid);
talloc_free(sid);
if (!NT_STATUS_IS_OK(status)) {
-   return *out;
+   return out;
}
 
-   return *out;
+   return out;
 }
 
+/* Decode an objectSid to a sambaSID. */
 static struct ldb_val decode_sid(struct ldb_module *module, TALLOC_CTX *ctx, 
const struct ldb_val *val)
 {
+   struct ldb_val out = data_blob(NULL, 0);
struct dom_sid *sid;
NTSTATUS status;
-   struct ldb_val *out = talloc_zero(ctx, struct ldb_val);
-   
+
sid = talloc(ctx, struct dom_sid);
  

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

2007-01-01 Thread abartlet
Author: abartlet
Date: 2007-01-02 01:39:53 + (Tue, 02 Jan 2007)
New Revision: 20456

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

Log:
Rename variables to avoid shadowing global function names.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_domain.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_domain.c2007-01-02 
01:07:44 UTC (rev 20455)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_domain.c2007-01-02 
01:39:53 UTC (rev 20456)
@@ -128,7 +128,7 @@
BOOL ret = True;
struct libnet_context *ctx;
struct libnet_DomainOpen r;
-   struct lsa_Close close;
+   struct lsa_Close lsa_close;
struct dcerpc_binding *binding;
struct policy_handle h;
const char *bindstr;
@@ -160,11 +160,11 @@
goto done;
}
 
-   ZERO_STRUCT(close);
-   close.in.handle  = ctx-lsa.handle;
-   close.out.handle = h;
+   ZERO_STRUCT(lsa_close);
+   lsa_close.in.handle  = ctx-lsa.handle;
+   lsa_close.out.handle = h;

-   status = dcerpc_lsa_Close(ctx-lsa.pipe, ctx, close);
+   status = dcerpc_lsa_Close(ctx-lsa.pipe, ctx, lsa_close);
if (!NT_STATUS_IS_OK(status)) {
d_printf(failed to close domain on lsa service: %s\n, 
nt_errstr(status));
ret = False;

Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_share.c
===
--- branches/SAMBA_4_0/source/torture/libnet/libnet_share.c 2007-01-02 
01:07:44 UTC (rev 20455)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_share.c 2007-01-02 
01:39:53 UTC (rev 20456)
@@ -169,7 +169,7 @@
 }
 
 
-static BOOL test_addshare(struct dcerpc_pipe *pipe, TALLOC_CTX *mem_ctx, const 
char *host,
+static BOOL test_addshare(struct dcerpc_pipe *svc_pipe, TALLOC_CTX *mem_ctx, 
const char *host,
  const char* share)
 {
NTSTATUS status;
@@ -188,7 +188,7 @@
add.in.level  = 2;
add.in.info.info2 = i;
 
-   status = dcerpc_srvsvc_NetShareAdd(pipe, mem_ctx, add);
+   status = dcerpc_srvsvc_NetShareAdd(svc_pipe, mem_ctx, add);
if (!NT_STATUS_IS_OK(status)) {
printf(Failed to add a new share\n);
return False;



svn commit: samba r20458 - in branches/SAMBA_4_0/testdata/samba3: .

2007-01-01 Thread abartlet
Author: abartlet
Date: 2007-01-02 03:37:07 + (Tue, 02 Jan 2007)
New Revision: 20458

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

Log:
This data is invalid, and causes the samba3sam test to fail, because
we now convert these values.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/testdata/samba3/samba3.ldif


Changeset:
Modified: branches/SAMBA_4_0/testdata/samba3/samba3.ldif
===
--- branches/SAMBA_4_0/testdata/samba3/samba3.ldif  2007-01-02 03:36:02 UTC 
(rev 20457)
+++ branches/SAMBA_4_0/testdata/samba3/samba3.ldif  2007-01-02 03:37:07 UTC 
(rev 20458)
@@ -197,8 +197,8 @@
 sambaHomeDrive: H:
 sambaProfilePath: \\PDC-SMB3\profiles\%U\Administrator
 sambaPrimaryGroupSID: S-1-5-21-4231626423-2410014848-2360679739-512
-sambaLMPassword: XXX
-sambaNTPassword: XXX
+sambaLMPassword: 193130B61A7F81C0AAD3B435B51404EE
+sambaNTPassword: C2AE1FE6E648846352453E816F2AEB93
 sambaAcctFlags: [U  ]
 sambaSID: S-1-5-21-4231626423-2410014848-2360679739-2996
 loginShell: /bin/false



svn commit: samba r20459 - in branches/SAMBA_4_0/source/lib/ldb/modules: .

2007-01-01 Thread abartlet
Author: abartlet
Date: 2007-01-02 03:39:01 + (Tue, 02 Jan 2007)
New Revision: 20459

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

Log:
LDB map cleanup:

- Replace 'return 0' with return LDB_SUCCESS in more places.

- Do not return NULL attribute values, these are not permitted.
  Instead, fail the whole conversion.

- Cleanup old comments.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
2007-01-02 03:37:07 UTC (rev 20458)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
2007-01-02 03:39:01 UTC (rev 20459)
@@ -229,8 +229,7 @@
return NULL;
}
 
-   el-num_values = old-num_values;
-   el-values = talloc_array(el, struct ldb_val, el-num_values);
+   el-values = talloc_array(el, struct ldb_val, old-num_values);
if (el-values == NULL) {
talloc_free(el);
map_oom(module);
@@ -244,8 +243,14 @@
return NULL;
}
 
-   for (i = 0; i  el-num_values; i++) {
+   for (i = 0; i  old-num_values; i++) {
el-values[i] = ldb_val_map_remote(module, el-values, map, 
old-values[i]);
+   /* Conversions might fail, in which case bail */
+   if (!el-values[i].data) {
+   talloc_free(el);
+   return NULL;
+   }
+   el-num_values++;
}
 
return el;
@@ -262,7 +267,7 @@
 
/* We handle wildcards in ldb_msg_el_merge_wildcard */
if (ldb_attr_cmp(attr_name, *) == 0) {
-   return 0;
+   return LDB_SUCCESS;
}
 
map = map_attr_find_local(data, attr_name);
@@ -270,7 +275,7 @@
/* Unknown attribute in remote message:
 * skip, attribute was probably auto-generated */
if (map == NULL) {
-   return 0;
+   return LDB_SUCCESS;
}
 
switch (map-type) {
@@ -291,7 +296,7 @@
 
switch (map-type) {
case MAP_IGNORE:
-   return 0;
+   return LDB_SUCCESS;
 
case MAP_CONVERT:
if (map-u.convert.convert_remote == NULL) {
@@ -299,7 +304,7 @@
  Skipping attribute '%s': 
  'convert_remote' not set\n,
  attr_name);
-   return 0;
+   return LDB_SUCCESS;
}
/* fall through */
case MAP_KEEP:
@@ -318,7 +323,7 @@
  Skipping attribute '%s': 
  'generate_local' not set\n,
  attr_name);
-   return 0;
+   return LDB_SUCCESS;
}
 
el = map-u.generate.generate_local(module, local, attr_name, 
remote);
@@ -330,7 +335,7 @@
}
 
if (el == NULL) {
-   return LDB_ERR_OPERATIONS_ERROR;
+   return LDB_ERR_NO_SUCH_ATTRIBUTE;
}
 
return ldb_msg_replace(local, el);
@@ -376,7 +381,7 @@
}
}
 
-   return 0;
+   return LDB_SUCCESS;
 }
 
 /* Mapping messages
@@ -394,7 +399,7 @@
}
}
 
-   return 0;
+   return LDB_SUCCESS;
 }
 
 /* Merge a local and a remote message into a single local one. */
@@ -432,7 +437,7 @@
}
}
 
-   return 0;
+   return LDB_SUCCESS;
 }
 
 /* Mapping search results
@@ -942,10 +947,6 @@
const char **local_attrs;
int ret;
 
-   /* Clear initial lists of partitioned attributes */
-
-   /* Clear initial lists of partitioned attributes */
-
/* There is no tree, just partition the searched attributes */
if (tree == NULL) {
ret = map_attrs_partition(module, ac, 



svn commit: samba r20460 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2007-01-01 Thread abartlet
Author: abartlet
Date: 2007-01-02 03:40:29 + (Tue, 02 Jan 2007)
New Revision: 20460

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

Log:
Simplfy the handling of password hashes in the samba3sam module.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
2007-01-02 03:39:01 UTC (rev 20459)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samba3sam.c
2007-01-02 03:40:29 UTC (rev 20460)
@@ -246,15 +246,11 @@
 {
struct ldb_val out;
struct samr_Password *pwd;
-   pwd = smbpasswd_gethexpwd(ctx, talloc_strndup(ctx, (const char 
*)val-data, val-length));
+   pwd = smbpasswd_gethexpwd(ctx, (const char *)val-data);
if (!pwd) {
return data_blob(NULL, 0);
}
-   out.data = talloc_memdup(ctx, pwd-hash, sizeof(pwd-hash));
-   if (!out.data) {
-   return data_blob(NULL, 0);
-   }
-   out.length = sizeof(pwd-hash);
+   out = data_blob_talloc(ctx, pwd-hash, sizeof(pwd-hash));
return out;
 }
 
@@ -331,7 +327,7 @@
 
/* sambaLMPassword - lmPwdHash*/
{
-   .local_name = lmpwdhash,
+   .local_name = lmPwdHash,
.type = MAP_CONVERT,
.u = {
.convert = {