[Samba] samba to execute useradd by itself

2007-11-27 Thread Dimitris Theoharis
Hello

I have a samba server working fine . 50 people will need to have
access to the samba server ONLY  and not on the Linux host .
They way i add users manually now is like this :
useradd -d /home/test -s /bin/false -n test  then smbpasswd  -a test
and the user test can log on to Samba server ,

Now , people tell me that samba can do that by itself so there is no
need for a unix account for a user even if it is set to /bin/false ,
Is there a way that Samba can execute
useradd and smbpasswds commands  by itself for itself for samba use
only? I think not . What do you think?
the samba server is a standalone server  , not part of a domain
thanks
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Marco De Vitis

Hi,
I'm using Samba as a PDC with roaming profiles on a Debian Etch machine, 
the clients are Windows XP/2000 machines.


I just installed security upgrades with aptitude, and this upgraded all 
samba 3.0.24-6etch4 packages to 3.0.24-6etch6 (except for samba-doc 
which was upgraded to 3.0.24-6etch7).
Immediately after the upgrade, my users could not load their profiles at 
login anymore. Errors popped out regarding problems loading 
insignificant files from their profiles, such as cookies, links to 
recently opened files, Java cache files, etc.
This caused Windows to open up a new temporary profile, making everyone 
lose their settings. PANIC!!


I now downgraded back to all 3.0.24-6etch4 packages, and things seem to 
be working fine again.


What's happening with Samba packages for Debian Etch?
I saw a security announce yesterday by Steve Kemp, but it's a bit 
confusing, for Etch it lists some 6etch6 packages and some 6etch7 others.

Are the current packages broken?

And... is there anyone officially working on more up-to-date Samba 
packages for Debian Etch? Or will we have to live with 3.0.24 until the 
next Debian stable upgrade?


Thanks.

--
Ciao,
  Marco.

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


Re: [Samba] Strange file permissions

2007-11-27 Thread Mark Adams
In my opinion even your no access folder should use a group. Make your  
lowest permissions group nogroup then add all users to the group. Then  
change smb conf user security entry to valid users = @nogroup


Mark.


On 26 Nov 2007, at 22:59, DNL [EMAIL PROTECTED] wrote:




Mark Adams wrote:

Is sgid on the top level dir?
Set for subdirectory cp, but not for projects as different  
directories at that level require no access control

/projects/cp# ls -al
total 164
drwxrws--- 26 dnl cp 4096 2007-11-23 15:37 .
drwxr-xr-x 17 rootroot   4096 2007-11-16 22:35 ..
drwxrws---  2 daniel  cp 4096 2007-06-18 11:52 4 Spencer Close
drwxrws---  2 daniel  cp 4096 2007-09-01 19:20 Addresses


Also have you tried force group samba option?
My understanding is that this would force the same group for all the  
PROJECT share, but I only want it for a subdirectory. Am I forced  
into making projects/cp a separate share and using this samba option?

Mark.

Thanks for your response.
Dave.

On 24 Nov 2007, at 13:13, DNL [EMAIL PROTECTED] wrote:

Hi
I have a samba server with tdbsam passwords, and a share, PROJECTS,
which is accessed by various XP home clients, the usenames and  
passwords
being manually synced to the samba ones (less than 10 users, and  
only 4
workstations). There is one win2K machine, which is a domain  
member. Subdirectories on PROJECTS have g+s set, so only users,
who are members of specific Linux groups, have access to the files  
in them.
Recently, a laptop with XP professional has been connected, and  
the user
on it can access the correct directories, but when he edits or  
creates a

file, the group owner and file permissions are wrong:

/home/projects/cp/CP 2007# ls -alt
total 2932
drwxrwsrw-  4 daniel  cp  4096 2007-11-24 12:35 .
-r  1 haffers BUILTIN\users 197120 2007-11-24 12:34 CP 11  
Nova.xls
-rw-rw-rw-  1 haffers BUILTIN\users 199168 2007-11-23 19:47 CP 10  
Octa.xls
drwxrwsrwx  2 daniel  cp  4096 2007-11-23 19:34 FORMS  
2007
-rw-rw-rw-  1 haffers BUILTIN\users 299520 2007-11-23 19:20 2007  
ANALYSIS.xls

drwxrws--- 26 dnl cp  4096 2007-11-23 15:37 ..
-r  1 haffers BUILTIN\users 197120 2007-11-23 14:40 CP 10  
Oct.xls
-rwxrwx---  1 haffers cp196608 2007-11-18 18:51 CP 11  
Nov.xls
-rwxrwx---  1 haffers cp192512 2007-11-18 17:47 CP 09  
Sep.xls


The files he creates are therefore unusable until permissions are  
changed.
Various searches on the internet and reading of the Samba  
documentation
have failed give me any idea on why this is happening, or how to  
put it
right. How is Samba managing to not respecting the Linux g+s bit?  
How do I make this system work correctly? Can you assist?


Background information:
The log-on of the user on the XP professional machine:

# tail -14 andylap.old
[2007/11/24 01:32:01, 1] smbd/service.c:close_cnum(1150)
andylap (192.168.0.168) closed connection to service projects
[2007/11/24 11:13:20, 2] smbd/sesssetup.c:setup_new_vc_session(799)
setup_new_vc_session: New VC == 0, if NT4.x compatible we would  
close

all old resources.
[2007/11/24 11:13:20, 2] smbd/sesssetup.c:setup_new_vc_session(799)
setup_new_vc_session: New VC == 0, if NT4.x compatible we would  
close

all old resources.
[2007/11/24 11:13:20, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.0.168)
[2007/11/24 11:13:20, 2] smbd/reply.c:reply_tcon_and_X(711)
Serving IPC$ as a Dfs root
[2007/11/24 11:13:20, 2] auth/auth.c:check_ntlm_password(309)
check_ntlm_password: authentication for user [haffers] - [haffers]
- [haffers] succeeded
[2007/11/24 11:13:20, 2] smbd/utmp.c:sys_utmp_update(419)
utmp_update: uname:/var/run/utmp wname:/var/log/wtmp

# head -24 andylap
[2007/11/24 11:13:20, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.0.168)
[2007/11/24 11:13:20, 1] smbd/service.c:make_connection_snum(950)
andylap (192.168.0.168) connect to service projects initially as  
user

haffers (uid=529, gid=502) (pid 17358)
[2007/11/24 11:13:20, 2] smbd/reply.c:reply_tcon_and_X(711)
Serving projects as a Dfs root
[2007/11/24 11:13:20, 2] smbd/utmp.c:sys_utmp_update(419)
utmp_update: uname:/var/run/utmp wname:/var/log/wtmp
[2007/11/24 11:13:20, 1] smbd/service.c:close_cnum(1150)
andylap (192.168.0.168) closed connection to service projects
[2007/11/24 11:13:20, 2] auth/auth.c:check_ntlm_password(309)
check_ntlm_password: authentication for user [haffers] - [haffers]
- [haffers] succeeded
[2007/11/24 11:13:20, 2] smbd/utmp.c:sys_utmp_update(419)
utmp_update: uname:/var/run/utmp wname:/var/log/wtmp
[2007/11/24 11:13:20, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.0.168)
[2007/11/24 11:13:20, 1] smbd/service.c:make_connection_snum(950)
andylap (192.168.0.168) connect to service projects initially as  
user

haffers (uid=529, gid=502) (pid 17358)
[2007/11/24 11:13:20, 2] smbd/reply.c:reply_tcon_and_X(711)
Serving projects as a Dfs root

[Samba]Samba clients disconnect periodically

2007-11-27 Thread PIOTR Walczak

Hello,
I have a problem with samba. Clients  (Mac OSX 10.3.9, 10.4.10 and 
Windows XP) disconnect periodically.

Samba (v3)  runs on RedHat 3 enterprise.
Mac OSX workstations communicate with RedHat server via samba protocol 
only ( Netatalk is not installed).
OSX workstations are disconnected sometimes after 10 minutes, sometimes 
after 60 minutes.

Windows XP workstation disconnects after few days.
Samba logs for MAC OSX client says:
walczak (192.168.8.4) connect to service heineken_acc initially as user 
pietrucha (uid=555, gid=10) (pid 25147)

[2007/11/15 09:55:01, 0] lib/util_sock.c:read_socket_data(384)
  read_socket_data: recv failure for 4. Error = Connection reset by peer
[2007/11/15 09:55:01, 1] smbd/service.c:close_cnum(841)
  walczak (192.168.8.4) closed connection to service heineken_acc
smb .conf is attached.
Thank you in advance.


Piotr Walczak



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

[Samba] Unable to change password in windows - SAMBA_LDAP_PDC

2007-11-27 Thread jayendren anand maduray

Hi All.

I have a SAMBA PDC that uses LDAP as its back end.
The OS, is UBUNTU 6.10 Server.
SAMBA Version is 3.022

The problem is, when a client logs onto the Domain, he presses 
Control+Alt+Del, and chooses Change Password.

He types in the old password, then the new one, and confirms this.
When he clicks on OK, it thinks for a bit (about 30 seconds) and then says:
The system cannot change your password now because the domain 
RIVONINGO.HIVSA is not available


This used to work before, and works fine on another server, with the 
identical settings.


The log file for the computer says:
[2007/11/27 16:00:11, 0] passdb/pdb_ldap.c:ldapsam_search_one_group(2171)
ldapsam_search_one_group: Problem during the LDAP search: LDAP error:  
(No such object)


or sometimes
Unable to open new log file /var/log/samba/log.computername: Permission 
denied


My smb.conf looks like this:

[global]
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = RIVONINGO.HIVSA
netbios name = SOUL-CALIBUR

# server string is the equivalent of the NT Description field
	server string = PHRU Domain Control 


# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the loopback interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
;printcap name = /etc/printcap
load printers = no
;utmp = yes

#Jay Added (disable printing)
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
;   printing = cups

# This option tells cups that the data has already been rasterized
;   cups options = raw

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user nobody is used
;   guest account = pcguest

# Put a capping on the size of the log files (in Kb).
max log size = 10

# Security mode. Most people will want user level security. See
# security_level.txt for details.
# Use password server option only with security = server
;   password server = NT-Server-Name
security = user


# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
;   smb passwd file = /etc/samba/smbpasswd
encrypt passwords = true

#PAM,LDAP, TIME_Server settings 
#Jay added:

obey pam restrictions = no
ldap passwd sync = yes
time server = yes
enable privileges = yes

# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# noTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# noTE2: You do noT need these to allow workstations to change only
#the encrypted SMB passwords. They allow the Unix password
#to be kept in sync with the SMB password.
;  passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n 
*passwd:*all*authentication*tokens*updated*successfully*
;passwd chat = *Enter*password* %n\n *Retype*password* %n\n *success*
passwd program = /usr/sbin/smbldap-passwd -s %u
;   /usr/sbin//smbldap-passwd %u
unix password sync = no

#Logging

# This tells Samba to use a separate log file for each machine
# that connects all log information in one file
#Jay added:
log level = 0
syslog = 0
;   log file = /var/log/samba/smbd.log
log file = /var/log/samba/log.%m
mangling method = hash2
dos charset = 850
unix charset = ISO8859-1

# Unix users can map to different SMB User names
username map = /etc/samba/smbusers


# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 
SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;	interfaces = 192.168.12.2/24 192.168.13.2/24 
	interfaces = eth0




# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
local master = yes
preferred master = yes

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33
os level = 100

# Domain Master specifies Samba to be the Domain 

RE: [Samba] Solaris 9 Winbind ls -l hangs - group mapping

2007-11-27 Thread Gibbings, Kevan
Found the answer to the problem, I think!

When listing the groups from the Solaris server getent group I believe
there is a maximum length of string that getent can handle.

I have proved this by configuring a new test domain with its netbios
name only 2 charters long (old name one was 5). I then recreated all the
users (scripted!!) and getent group can now return a full list of
groups.

This means that it is not the number of users it is the length of string
returned.

I have taken this one step further and created an extra 500 users and
again getent group fails to list the Domain Users group.

We have a contract with Sun so I will report as a bug, I have checked
the latest patches but no joy.

Regards
Kevan Gibbings



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
.org] On Behalf Of Gibbings, Kevan
Sent: 23 November 2007 09:36
To: herman
Cc: samba@lists.samba.org
Subject: RE: [Samba] Solaris 9 Winbind ls -l hangs - group mapping

Thanks for your reply, I have got a stage further with this problem and
discovered it is a time out issue.

getent group only returns the first group Domain Admins the next
group in the list is Domain Users this group has over 573 members (all
users).

As this is a test domain, I proved this by deleting the majority of
users and getent groups then returns all the group names. I can
further prove this by listing some of the other groups by name i.e.

getent group Domain\design

This works fine and returns all the users.

I recreated the users (scripted!!) and getent groups fails again. But I
have found that by deleting just 40 members all groups are listed.

Not sure where to go from here. I think this must be a Solaris issue, a
timeout somewhere? A limitation of the number of users in a group?

I think I can get round this issue by forcing the files to be created on
the samba share as one particular group. But I would rather solve the
problem!

I have found similar reference on other sites, but no solution.

This could be a problem with ldap client, but the client is not
configured or running on my Solaris install.

If it could be how do I configure ldap client on Solaris?

Regards
Kevan Gibbings



-Original Message-
From: herman [mailto:[EMAIL PROTECTED] 
Sent: 23 November 2007 06:20
To: Gibbings, Kevan
Subject: Re: [Samba] Solaris 9 Winbind ls -l hangs - group mapping

Solaris...

Review your hostname definition carefully.  Ensure that the FQDN is 
defined and that it maps to the correct ipaddress.  Test it with 
nslookup.  Solaris can get very cranky if there is something wrong with 
this.

Also review the ldap configuration.  It can be the ldap configuration 
that causes the delay.  Test an ldap query against ADS manually.

Cheers,

H.


Gibbings, Kevan wrote:
 OS Solaris 5.9 (9) Generic_122300-13 (clean build)

 nscd daemon has been disabled and is not running

 No NIS or NISPLUS

  

 Samba Version 3.0.26a

 Complied using the following options --with-acl-support -with-winbind
 -with-pam

  

 smbd, nmbd  winbind daemons are all started

  

 [global]

   workgroup = MTCB2

   security = domain

  

   log level = 3

   log file = /usr/local/samba/var/samba.log.%U

   max log size = 2

   ldap ssl = no

  

   wins server = 172.26.175.1

   dns proxy = yes

   name resolve order = wins bcast host

  

   idmap uid = 1-2

   idmap gid = 1000-2000

  

   winbind enum users = yes

   winbind enum groups = yes

   template homedir = /usr/people/winnt/%D/%U

   template shell = /bin/csh

  

 [data]

   comment = Data

   path = /data

   valid users = @MTCB2\domain users

   browseable = yes

   available = yes

   read only = No

  

 Requirement: Use winbind to authenticate XP clients.

  

 Domain Windows 2003 (Domain functional level 2000 native)

  

 nsswitch.conf

 passwd: files winbind

 group: files winbind

  

 I have complied configured and installed Samba on a test network. I
have
 joined the samba server as a domain member on to the Windows 2003
domain
 and I can list all the users and groups in the domain using  wbinfo -u
 and groups using wbinfo -g. I can also list all the users using
getent
 passwd but when I run the command getent group I only get one of
the
 domain groups returned.

  

 I can logon to an XP client access the shares on the Samba server and
 create files, folders etc. I can list these file on the UNIX server
 using ls but if I try and use ls -l the command just hangs. Also
 smbstatus hands if there are any files open.

  

 If I remove the winbind from the group entry in the nsswitch.conf file
 then I can list the contents of the folders, obviously the group names
 do not appear but the domain usernames do. I can then also get a from
 smbstatus again all group name a shown as there mapped ID

  

 Authentication is very quick, there just seems to be a problem with
 group mapping.

  

  

 I followed the 

Re: [Samba]Samba clients disconnect periodically

2007-11-27 Thread John Drescher
Other than the error message in the log is this causing a problem?

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


Re: [Samba]Samba clients disconnect periodically

2007-11-27 Thread John Drescher
 Hello John,
 thanks for reply.
 No other errors causing the problem.
 Piotr Walczak
 IT Engineer

I am not sure that was what I was looking for. Is this disconnection
causing a real problem?

I ask this because in normal operation CIFS/SMB servers/clients are
allowed to disconnect (usually after a period of inactivity) and the
client will reconnect when it needs to.

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


Re: [Samba] Re: Different printer drivers ...

2007-11-27 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sorry.  Am a bit behond on email lately, and haven't entirely
following this thread.

I've spent a fair amount in printing and I really don't think
that your analysis in entirely logical based on the comments
below.  You really need to look at the SPOOLSS MS-RPC traffic.
I don't know if this is your case, but the MS drivers are
extremely thin while vendor drivers (particularly PCL tend to
be very chatty).




cheers, jerry

[EMAIL PROTECTED] wrote:
 Greetings,
 
 (Brief synopsis):
 
 | This is an extenuation of Non-registry problem:  Slow printing
 |
 | See:
 |   http://www.brightsands.com/~chris/quick.9.bz2 fast printer drivers 
 loglvl=9
 |   http://www.brightsands.com/~chris/slow.9.bz2  slow printer drivers 
 loglvl=9
 |   http://www.brightsands.com/~chris/smb.confthe smb.conf in use
 |
 | I have a sample Windows XP/SP2 client trying to print through a
 | samba-3.0.24 server as configured in the smb.conf above.  When I configure
 | with a Microsoft driver (AGFA-Accuset v52.3), I can add and select the
 | printer quickly (see quick.9.bz2).
 |
 | When I configure with a non Microsoft Driver (HP LaserJet 2420 PCL5e), 
 adding
 | and selecting the printer take up to 30 seconds longer than the other 
 driver.
 |
 | (after taking acount of different pids and pnums), when I diff quick.9 and
 | and slow.9, I notice things start to get funky at around line 322511:
 
 With the fast driver, smb gets a size=102 packet and has this reaction:
 
 smbd/process.c:switch_message(914)
   switch message SMBntcreateX (PID) conn 0x80a11498
 smbd/uid.c:change_to_user(170)
   change_to_user: Skipping user change - already user
 smbd/nttrans.c:nt_open_pipe(325)
   nt_open_pipe: Opening pipe \spoolss.
 smbd/error.c:error_packet(146)
   error packet at smbd/nttrans.c(330) cmd=162 (SMBntcreateX) \
   NT_STATUS_OBJECT_NAME_NOT_FOUND
 
 Where as with the slow driver, smb gets a size=274 packet and says:
 
 smbd/process.c:switch_message(914)
   switch message SMBsesssetupX (PID) conn 0x0
 smbd/sec_ctx.c:set_sec_ctx(241)
   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
 auth/auth_util.c:debug_nt_user_token(448)
   NT user token: (NULL)
 auth/auth_util.c:debug_unix_user_token(474)
   UNIX token of user 0
   Primary group is 0 and contains 0 supplementary groups
 smbd/uid.c:change_to_root_user(275)
   change_to_root_user: now uid=(0,0) gid=(0,0)
 smbd/sesssetup.c:reply_sesssetup_and_X(849)
   wct=13 flg2=0xc807
 smbd/sesssetup.c:reply_sesssetup_and_X(995)
   Domain=[CLIENT]  NativeOS=[Windows 2002 Service Pack 2 2600] \
   NativeLanMan=[Windows 2002 5.1] PrimaryDomain=[]
 smbd/sesssetup.c:reply_sesssetup_and_X(1010)
   sesssetupX:[EMAIL PROTECTED]
 param/loadparm.c:lp_file_list_changed(3048)
   lp_file_list_changed()
   file /etc/samba/smb.conf - /etc/samba/smb.conf  last mod_time: \
   Tue Nov 20 12:46:55 2007
 
 That's right:  The FAST one (from Microsoft) is getting the error while
 the slow one is trying to authenticate me as a user rather than as guest.
 Eventually it comes to the conclusion that that won't work and tries guest
 and that works.
 
 The next packet from the fast one is 100 bytes and gets this:
 smbd/process.c:switch_message(914)
   switch message SMBntcreateX (PID) conn 0x80a11498
 smbd/uid.c:change_to_user(170)
   change_to_user: Skipping user change - already user
 smbd/nttrans.c:nt_open_pipe(325)
   nt_open_pipe: Opening pipe \srvsvc.
 smbd/nttrans.c:nt_open_pipe(346)
   nt_open_pipe: Known pipe srvsvc opening.
 rpc_server/srv_pipe_hnd.c:open_rpc_pipe_p(187)
   Open pipe requested srvsvc (pipes_open=0)
 rpc_server/srv_pipe_hnd.c:make_internal_rpc_pipe_p(305)
   Create pipe requested srvsvc
 rpc_server/srv_pipe_hnd.c:make_internal_rpc_pipe_p(386)
   Created internal pipe srvsvc (pipes_open=0)
 rpc_server/srv_pipe_hnd.c:open_rpc_pipe_p(283)
   Opened pipe srvsvc with handle HANDLE (pipes_open=1)
 rpc_server/srv_pipe_hnd.c:open_rpc_pipe_p(289)
   open pipes: name srvsvc PNUM
 smbd/nttrans.c:do_ntcreate_pipe_open(395)
   do_ntcreate_pipe_open: open pipe = \srvsvc
 
 So ... I guess I'm wondering whose I idea it was to ignore the
 auth methods = guest line in smb.conf?  Samba or the client?  Does
 the client even ask which methods of authentication are possible?
 
 --Chris


- --
=
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
What man is a man who does not make the world better?  --Balian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTCtaIR7qMdg1EfYRAmwZAKCwlqsF2cEuToBEWT5aSpfrmNfkGACgjgKN
Gn8FD+r5NPcNqMSh5XbXvwA=

Re: [Samba] Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Marcus Sobchak [EMAIL PROTECTED]
Am Dienstag, den 27.11.2007, 09:58 +0100 schrieb Marco De Vitis:
 Hi,
 I'm using Samba as a PDC with roaming profiles on a Debian Etch machine, 
 the clients are Windows XP/2000 machines.
 
 I just installed security upgrades with aptitude, and this upgraded all 
 samba 3.0.24-6etch4 packages to 3.0.24-6etch6 (except for samba-doc 
 which was upgraded to 3.0.24-6etch7).
 Immediately after the upgrade, my users could not load their profiles at 
 login anymore. Errors popped out regarding problems loading 
 insignificant files from their profiles, such as cookies, links to 
 recently opened files, Java cache files, etc.
 This caused Windows to open up a new temporary profile, making everyone 
 lose their settings. PANIC!!
 
 I now downgraded back to all 3.0.24-6etch4 packages, and things seem to 
 be working fine again.
 
 What's happening with Samba packages for Debian Etch?
 I saw a security announce yesterday by Steve Kemp, but it's a bit 
 confusing, for Etch it lists some 6etch6 packages and some 6etch7 others.
 Are the current packages broken?
 
 And... is there anyone officially working on more up-to-date Samba 
 packages for Debian Etch? Or will we have to live with 3.0.24 until the 
 next Debian stable upgrade?

We have exactly the same problem here.

Greets from hell,
Marcus

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


Re: [Samba] map to guest in share definition?

2007-11-27 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yes, you can.

Tim Bates wrote:
 Is it possible to use map to guest in a single share?
 We have 2 or 3 shares where I want this behavior, but for most I would
 like to not use it due to issues with home directories with bad users.
 
 I would simply try moving that line to a share definition to see what
 happens, but I don't want to break a live server to test (and have no
 spare Samba boxes right now).
 
 Tim B
 
 **
 This message is intended for the addressee named and may contain
 privileged information or confidential information or both. If you
 are not the intended recipient please delete it and notify the sender.
 **

- --
  _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$| |__| |  | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTDsPmb+gadEcsb4RArbzAKCpgpRK2MoxmV/qlJKGhPpPUoVUpgCfS//i
wUc4C5QoVTxGsc8eopRXwp8=
=3FLa
-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 clients disconnect periodically

2007-11-27 Thread John Drescher
On Nov 27, 2007 10:39 AM, PIOTR Walczak [EMAIL PROTECTED] wrote:
 John,
 yes it causing problem. This can happen even if you copy file on the
 server.
 Suddenly the workstation (especially MacOSX) is disconnected from
 server and you have to connect again.
 But I have  Samba server on MacOSX and this problem does not exist

That is not normal. Have you checked you network switches / NIC to see
if they are experiencing dropouts under a load? You can do this by
flooding a lot of packets from client to server using a program like
netperf (needs to run on client and server) and setting it to run for
several minutes. While it is doing that you can look at the networking
tab in the Windows Task Manager. If the connection has a drop out you
will see that on the graph.

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


[Samba] Transistive problem with AD logins via winbind

2007-11-27 Thread Peter Rosenthal
Hello,

I am getting transitive problems with logins to CentOS 5 boxes via
AD/Kerberos. The winbind log is:

[2007/11/26 07:51:07, 1]
nsswitch/winbindd_pam.c:winbindd_raw_kerberos_login(571)
winbindd_raw_kerberos_login: kinit failed for '[EMAIL PROTECTED]' with:
Cannot contact any KDC for requested realm (-1765328228)
[2007/11/26 07:52:14, 1]
rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(625)
cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_ACCESS_DENIED
received from remote machine dc1.testdomain.com pipe \lsarpc fnum 0xc000!
[2007/11/26 07:52:14, 0]
rpc_client/cli_pipe.c:cli_rpc_pipe_open_ntlmssp_internal(2362)
cli_rpc_pipe_open_ntlmssp_internal: cli_rpc_pipe_bind failed with error NT
code 0x0005
[2007/11/26 07:52:14, 1]
nsswitch/winbindd_pam.c:winbindd_raw_kerberos_login(571)
winbindd_raw_kerberos_login: kinit failed for '[EMAIL PROTECTED]' with:
Cannot contact any KDC for requested realm (-1765328228)
[2007/11/26 08:55:51, 1]
rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(625)
cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_ACCESS_DENIED
received from remote machine dc2.testdomain.com pipe \lsarpc fnum 0x4005!
[2007/11/26 08:55:51, 0]
rpc_client/cli_pipe.c:cli_rpc_pipe_open_ntlmssp_internal(2362)
cli_rpc_pipe_open_ntlmssp_internal: cli_rpc_pipe_bind failed with error NT
code 0x0005
[2007/11/26 08:55:51, 1]
rpc_client/cli_pipe.c:cli_pipe_validate_current_pdu(625)
cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_ACCESS_DENIED
received from remote machine dc2.testdomain.com pipe \samr fnum 0x4008!
[2007/11/26 08:55:51, 0]
rpc_client/cli_pipe.c:cli_rpc_pipe_open_ntlmssp_internal(2362)
cli_rpc_pipe_open_ntlmssp_internal: cli_rpc_pipe_bind failed with error NT
code 0x0005

Can anyone help me understand what this could be caused by? Restarting
winbind a couple of times normally resolves the problem.

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


[Samba] Default POSIX ACLs masking later permission edits

2007-11-27 Thread Timothy Pearson
Hello,

I have recently set up a Samba based file server running 3.0.27a.  This file 
server is part of a Windows 2003 domain, with ACL and extended attribute 
support enabled, and appears to be functioning properly except for one critical 
issue with the ACLs.

When I try to edit the permissions of a file through Windows, the default POSIX 
ACL that I set up on the filesystem seems to be masking off any future 
permission edits.  My default ACL (set with setfacl) is to allow full control 
to the domain group domain users.  If I then try to remove the full control 
permission from a Windows XP workstation, leaving only the read permission set, 
as soon as I click Apply the full control permission comes back!

Using setfacl I am able to remove the offending entries, but as soon as I try 
to edit a different permission through a Windows client, they come back.

Is this the correct behavior?  I have been unable to find any information on 
this type of issue.  If this is correct, could someone please suggest a means 
to apply a default ACL only when files or directories are created, and then 
allow full permissions editing at a later date?  I would not have set a default 
ACL at all, except for the fact that newly created files are inaccessable 
without first setting permissions.

Thank you,

Timothy Pearson

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


Re: [Samba] Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Christian Perrier
Quoting Marco De Vitis ([EMAIL PROTECTED]):


 What's happening with Samba packages for Debian Etch?

We're trying to keep up with upstream's security announcements and
regressions they induce.


 I saw a security announce yesterday by Steve Kemp, but it's a bit 
 confusing, for Etch it lists some 6etch6 packages and some 6etch7 others.
 Are the current packages broken?

3.0.24-etch5 is the first roll-up of packages fixing CVE-2007-5398 and
CVE-2007-4572

3.0.24-etch6 fixes a regression introduced in -etch5 (indeed introduced in
upstream's initial published fixes). That regression affects those
people who use smbfs only.

Apparently, however, another regression which seems to affect long
directory listings is present in -etch6 and might lead to -etch7 packages.

And, given the recent updates we're receiving (#453050, #453102,
#453145: I love when people don't even read the BTS when reporting
issues), it's not finished.

And, sorry for this, but the time given to these issues by the samba
package maintainers (these days mostly Steve Langasek and me) is
currently very short. Steve spent days of work on these recent updates
and can't currently work on them. So you're quite likely to need
waiting some time before this is fixed. In the meantim, you should
revert back to -etch5



 And... is there anyone officially working on more up-to-date Samba packages 
 for Debian Etch? Or will we have to live with 3.0.24 until the next Debian 
 stable upgrade?


This is not new in Debian. You will never get a new upstream version
update for the stable distribution. Updates only include security
fixes. 

You might want to get packages built by the Samba team if you want to
keep your samba server with the bleeding edge samba.




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


[Samba] Windows clients losing connection to Samba 3.0.27 PDC on FC7 i386

2007-11-27 Thread Rubin Bennett
Hello all...

I have a site of about 50 pcs connected to a Samba domain controller.
The domain has been running flawlessly for several years through several
upgrades, and the last one (From Fedora Core 4/ Samba 3.0.23a to FC7/
Samba 3.0.27) seems to have caused something to come unglued.

The Workstations are periodically booting up in the morning and being
unable to contact the domain controller.  The Samba server is giving
failed authentication errors for the workstation itself (not the
username/ password) in log.{workstation}.

The upgrade was done nearly a month ago, and roughly 1/2 of the
workstations in the network were unable to connect the following
morning.  It happened again last week and about 10 more workstations
were affected.  And it happened again today, where 1 workstation and a
member server (Win2003r2) lost their credentials.  This time it was a
really bad deal because the member server runs an application that is
mission critical and therefore no one was able to work until it was
fixed.

In all cases, the users are able to log in by disconnecting their
network cable and rebooting, then logging in with the cached credentials
on the workstations.  Reconnecting the NIC after login allowed the users
to connect to network resources on the Samba PDC, and work until a
reboot.  A 'permanent' fix is to unjoin the PC from the domain and
rejoin again.

I had assumed that the issue was caused by the upgrade somehow, and that
once every system had been re-joined it would go away.  However, the
workstation from this morning had been unjoined and rejoined once before
and now I fear that the issue will keep cropping up all over the place.

Ideas, suggestions, flames?  I've copied my smb.conf below for your
review as well.

Thanks very much in advance,
Rubin

/etc/samba/smb.conf
[global]
  workgroup = WORKGROUP
  netbios name = Server
  server string = Network File Server
  printcap name = cups
  enable privileges = yes
  load printers = yes
  printcap cache time = 60
  printing = cups
  keepalive = 1
  log file = /var/log/samba/log.%m
  max log size = 50

  log level = 3
  security = user
  encrypt passwords = Yes
  map to guest = bad user
  os level = 65
  domain master = yes
  preferred master = yes
  passdb backend = tdbsam

  pam password change = yes
  socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
  add machine script = /usr/sbin/useradd -d /dev/null -g 200
-s /bin/false -M  %u

  oplocks = no
  level2 oplocks = no
  domain logons = Yes
  logon script = login%G.bat
  logon drive = Z:
  logon home = \\server\%U
  logon path = \\server\profiles\%U
  wins support = Yes
  name resolve order = wins hosts bcast
  hide unreadable = Yes

# Added in an attempt to fix broken tdbsam backend...
  idmap uid = 1-2
  idmap gid = 1-2

  dns proxy = yes

# Share Definitions
==
[homes]
  comment = Home Directories
  create mask = 0700
  directory mask = 0700
  browseable = No
  writable = yes

 [netlogon]
   comment = Netlogon Scripts
   path = /var/lib/samba/netlogon
   comment = Network Logon Service
   path = /var/lib/samba/netlogon
   guest ok = yes
   writable = no

[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = no
  guest ok = yes
  writable = no
  printable = yes
  create mode = 0700
  ;print command = lpr-cups -P %p -o raw %s -r
   use client driver = yes

[print$]
  path = /var/lib/samba/printers
  read only = yes
  browseable = yes
  force group = noyle
  write list = @noyle root
  guest ok = yes
  inherit permissions = yes

[profiles]
  path = /var/lib/samba/profiles
  browseable = no
  read only = No
  guest ok = yes
  writable = yes
  create mask = 0600
  directory mask = 0700
  root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e
$PROFILE ]; \
then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi


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


[Samba] Re: Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Marco De Vitis

Il 27/11/2007 18:25, Christian Perrier ha scritto:


and can't currently work on them. So you're quite likely to need
waiting some time before this is fixed. In the meantim, you should
revert back to -etch5


Thanks, no problem, I can wait. Luckily I could fix it immediately by 
reverting to the previous packages I still had in cache.


And... is there anyone officially working on more up-to-date Samba packages 
for Debian Etch? Or will we have to live with 3.0.24 until the next Debian 
stable upgrade? 


This is not new in Debian. You will never get a new upstream version
update for the stable distribution. Updates only include security
fixes.


Well, I know, but it wasn't like this for Samba on Sarge, when Simo 
Sorce promptly built upstream packages... but when Etch arrived I 
remember someone else was to take his role, can't remember who now.



You might want to get packages built by the Samba team if you want to
keep your samba server with the bleeding edge samba.


Uhm... how?
I can only get here from samba.org:
http://us1.samba.org/samba/ftp/Binary_Packages/Debian/samba/3/
...but I don't even know which Debian version are these for.

--
Ciao,
  Marco.

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


Re: [Samba] Re: Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Christian Perrier
Quoting Marco De Vitis ([EMAIL PROTECTED]):

 Well, I know, but it wasn't like this for Samba on Sarge, when Simo Sorce 
 promptly built upstream packages... but when Etch arrived I remember 
 someone else was to take his role, can't remember who now.

If I'm correct, that should be Jerry Carter. He's however pretty busy
with release management as well.

We (both him and us official Debian maintainers) hope to have the
packaging converge so that Jerry and more generally the Samba Team can
more easily derive their Debian packages from ours.but there are
still some patches that need discussion.

We expect that Debian lenny (and Ubuntu Hardy) packages will be much
less different from upstream samba, already. All this will help
lowering the duplicate work.


 You might want to get packages built by the Samba team if you want to
 keep your samba server with the bleeding edge samba.

 Uhm... how?
 I can only get here from samba.org:
 http://us1.samba.org/samba/ftp/Binary_Packages/Debian/samba/3/
 ...but I don't even know which Debian version are these for.


Hmmm, I talked without checking and I was blindly assuming that these
packages were already built.

On the other hand, I think (but this should be checked as well) that
Debian packages from unstable may quite easily be rebuilt on an Etch
machine.

Add this to your /etc/apt/sources.list:

# Sources packages sid
deb-src http://ftp.fr.debian.org/debian sid main non-free contrib

Then apt-get update, then apt-get source samba in an empty directory

Go to samba-3.0.27a, run dpkg-checkbuilddeps, then debuild or a
similar command. That would pretty straight build 3.0.27a packages for
etch.

(all this is unchecked: we try to keep backportability but I haven't
personnally tried to rebuild samba on an etch machine for quite a while)



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


[Samba] How to move a PDC

2007-11-27 Thread B . Cook

Hello All,

I was asked to make a backup of a server that we have running as a PDC  
(FreeBSD based).


I tried just coping over the smb.conf but that does not seem to be all  
that I need.


How would I be able to copy a working samba server in order to make a  
backup in case of an emergency so that the PDC function that it is  
performing will still work.


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


[Samba] Read Write Permission

2007-11-27 Thread Dino Chopins
Hi Everyone,

I've setup file server for my client with these schemes :
1. Samba server is on CentOS box
2. Every user has their Unix accounts
3. Every Unix accounts have their mapped Samba users/accounts with same name
4. They can get access to some shares, eg :
[Accounting]
path = /public/accounting
valid users = alexander, bernard, charlie, david, eugene
admin users = alexander
read list = eugene,
write list = alexander, bernard, charlie, david
read only = No
5. I use Ubuntu clients to access to this share with a valid user listed above

My problem is, when one of this user let's say alexander created a
file with OpenOffice and save this file the user:group created is
alexander:alexander and permission is -rwxr--r-- (744). Thus, other
user such as bernard cannot open the file created by alexander. How
can I change / set a default permission to -rwxrw-rw- (766) ?

Regards,

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


[Samba] Samba problems with versions = 3.0.25b

2007-11-27 Thread Masopust, Christian
Hi all,
 
I had a samba-server as a member in an Active Directory (security = DOMAIN)
running 3.0.24 and everything was fine (system is RedHat Enterprise 4).
This server is in domain A and all my users accessing this server are in
another domain B (with trust relationship between A and B).
 
During the latest RedHat updates I got a newer Samba-version (3.0.25b) and 
the problems started.
 
From time to time no user from domain B can access shares on my server!
 
ok, so I decided to update Samba to the most recent version (3.0.27a, 
self-built
packages with makerpms.sh) and the problem is still the same!
 
So the only possibility I have is currently downgrading the Server back to 
Samba 3.0.24.
 
Any Idea what changes this problem could cause?
 
thanks a lot,
christian
 
P.S.: as this is a very busy life-server I currently have no possibility to 
make traces
 with version 3.0.25b or above... but if really neccessary I could stop 
it for some
 time to get the needed traces (please tell me which log level is 
needed...)
 
 
 
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: Big problems with 3.0.24-6etch6 Debian packages

2007-11-27 Thread Marco De Vitis

Il 27/11/2007 19:48, Christian Perrier ha scritto:


On the other hand, I think (but this should be checked as well) that
Debian packages from unstable may quite easily be rebuilt on an Etch
machine.


Thanks for your kind answer and your instructions. Anyway, I'll better 
not try this on a production server for the moment ;-). Maybe I will if 
a real need for getting upstream arises... I was asking because I recall 
that, long ago, I needed some new Samba features and could only get them 
on my Debian stable through Simo's packages. This is not the case now, 
but it might happen again, who knows.


--
Ciao,
  Marco.

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


[Samba] Re: Windows clients losing connection to Samba 3.0.27 PDC on FC7 i386

2007-11-27 Thread Patrick Rynhart

Hi Rubin,

Do you have any trusted domains and (if so) are users logging into a 
trusted domain ?  If this is the case, I would start smbd, nmbd normally 
(i.e. as daemons) but then run a single winbindd process in interactive 
mode, debug level 10.


i.e.

winbind -i -d 10

Check beforehand that no other winbindd processes are running (i.e. ps 
aux |grep winbindd).  Then I would attempt to logon from a member 
workstaion.  View the debug output to see if you can track any problems. 
 Ctrl-Z (i.e. background) may help here (fg to resume) as there could 
be a lot of output.


If you don't have any trusted domains (and therefore aren't running 
winbindd) then the approach I take is very similar. Start nmbd normally 
(i.e. as a background daemon) but then run smbd as an interactive 
process, again in debug level 10 mode.


i.e.

smbd -i -d 10

From what you're describing, there may be a problem with the machine 
account for the affected machines.  Look for something like 
NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE or some other NT STATUS code 
(these are defined in source/include/nterr.h if you happen to have the 
Samba source on your domain controller).


Regards,

Patrick

Rubin Bennett wrote:

Hello all...

I have a site of about 50 pcs connected to a Samba domain controller.
The domain has been running flawlessly for several years through several
upgrades, and the last one (From Fedora Core 4/ Samba 3.0.23a to FC7/
Samba 3.0.27) seems to have caused something to come unglued.

The Workstations are periodically booting up in the morning and being
unable to contact the domain controller.  The Samba server is giving
failed authentication errors for the workstation itself (not the
username/ password) in log.{workstation}.

The upgrade was done nearly a month ago, and roughly 1/2 of the
workstations in the network were unable to connect the following
morning.  It happened again last week and about 10 more workstations
were affected.  And it happened again today, where 1 workstation and a
member server (Win2003r2) lost their credentials.  This time it was a
really bad deal because the member server runs an application that is
mission critical and therefore no one was able to work until it was
fixed.

In all cases, the users are able to log in by disconnecting their
network cable and rebooting, then logging in with the cached credentials
on the workstations.  Reconnecting the NIC after login allowed the users
to connect to network resources on the Samba PDC, and work until a
reboot.  A 'permanent' fix is to unjoin the PC from the domain and
rejoin again.

I had assumed that the issue was caused by the upgrade somehow, and that
once every system had been re-joined it would go away.  However, the
workstation from this morning had been unjoined and rejoined once before
and now I fear that the issue will keep cropping up all over the place.

Ideas, suggestions, flames?  I've copied my smb.conf below for your
review as well.

Thanks very much in advance,
Rubin

/etc/samba/smb.conf
[global]
  workgroup = WORKGROUP
  netbios name = Server
  server string = Network File Server
  printcap name = cups
  enable privileges = yes
  load printers = yes
  printcap cache time = 60
  printing = cups
  keepalive = 1
  log file = /var/log/samba/log.%m
  max log size = 50

  log level = 3
  security = user
  encrypt passwords = Yes
  map to guest = bad user
  os level = 65
  domain master = yes
  preferred master = yes
  passdb backend = tdbsam

  pam password change = yes
  socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
  add machine script = /usr/sbin/useradd -d /dev/null -g 200
-s /bin/false -M  %u

  oplocks = no
  level2 oplocks = no
  domain logons = Yes
  logon script = login%G.bat
  logon drive = Z:
  logon home = \\server\%U
  logon path = \\server\profiles\%U
  wins support = Yes
  name resolve order = wins hosts bcast
  hide unreadable = Yes

# Added in an attempt to fix broken tdbsam backend...
  idmap uid = 1-2
  idmap gid = 1-2

  dns proxy = yes

# Share Definitions
==
[homes]
  comment = Home Directories
  create mask = 0700
  directory mask = 0700
  browseable = No
  writable = yes

 [netlogon]
   comment = Netlogon Scripts
   path = /var/lib/samba/netlogon
   comment = Network Logon Service
   path = /var/lib/samba/netlogon
   guest ok = yes
   writable = no

[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = no
  guest ok = yes
  writable = no
  printable = yes
  create mode = 0700
  ;print command = lpr-cups -P %p -o raw %s -r
   use client driver = yes

[print$]
  path = /var/lib/samba/printers
  read only = yes
  browseable = yes
  force group = noyle
  write list = @noyle root
  guest ok = yes
  inherit permissions = yes

[profiles]
  path = /var/lib/samba/profiles
  browseable = no
  read only = No
  guest ok = yes
  writable = yes
  create mask = 0600
  directory mask = 0700
  root preexec = 

Re: [Samba] How to move a PDC

2007-11-27 Thread Tom Brown
On Tue, 2007-11-27 at 14:11 -0500, B. Cook wrote:
 Hello All,
 
 I was asked to make a backup of a server that we have running as a PDC  
 (FreeBSD based).
 
 I tried just coping over the smb.conf but that does not seem to be all  
 that I need.
 
 How would I be able to copy a working samba server in order to make a  
 backup in case of an emergency so that the PDC function that it is  
 performing will still work.
 
 Thanks in advance,

Well, I used linux-ha (drbd and heartbeat) to create a fail over
cluster. It has worked well for me for over four years. It is not the
easiest solution to implement, but it is nice after it is in place.

HTH,
Tom

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


Re: [Samba] Unable to change password in windows - SAMBA_LDAP_PDC

2007-11-27 Thread Edmundo Valle Neto

jayendren anand maduray escreveu:

Hi All.

I have a SAMBA PDC that uses LDAP as its back end.
The OS, is UBUNTU 6.10 Server.
SAMBA Version is 3.022

The problem is, when a client logs onto the Domain, he presses 
Control+Alt+Del, and chooses Change Password.

He types in the old password, then the new one, and confirms this.
When he clicks on OK, it thinks for a bit (about 30 seconds) and then 
says:
The system cannot change your password now because the domain 
RIVONINGO.HIVSA is not available


This used to work before, and works fine on another server, with the 
identical settings.


The log file for the computer says:
[2007/11/27 16:00:11, 0] passdb/pdb_ldap.c:ldapsam_search_one_group(2171)
ldapsam_search_one_group: Problem during the LDAP search: LDAP error: 
(No such object)


This says that something wasn't found in LDAP, but doesn't say what or 
where it was looked for.


(...)


ldap suffix = dc=rivoningo,dc=hivsa
ldap group suffix = 
ou=smbGroups,ou=soul-calibur,ou=smbServers,dc=rivoningo,dc=hivsa
ldap user suffix = 
ou=smbUsers,ou=soul-calibur,ou=smbServers,dc=rivoningo,dc=hivsa
ldap machine suffix = 
ou=smbComputers,ou=soul-calibur,ou=smbServers,dc=rivoningo,dc=hivsa
ldap idmap suffix = 
ou=smbUsers,ou=soul-calibur,ou=smbServers,dc=rivoningo,dc=hivsa


I didn't understood why did you crated your DIT that way, but ...

From smb.conf man page:

ldap suffix (G)
Specifies the base for all ldap suffixes and for storing the sambaDomain 
object.


The ldap suffix will be appended to the values specified for the ldap 
user suffix, ldap group suffix, ldap
machine suffix, and the ldap idmap suffix. Each of these should be given 
only a DN relative to the ldap suf-

fix.

Default: ldap suffix =

Example: ldap suffix = dc=samba,dc=org

ldap user suffix (G)
This parameter specifies where users are added to the tree. If this 
parameter is unset, the value of ldap suf-
fix will be used instead. The suffix string is pre-pended to the ldap 
suffix string SO USE A PARTIAL DN.


Default: ldap user suffix =

Example: ldap user suffix = ou=people


(...)

So take a look at the SO USE A PARTIAL part, it worth for all 
organizational units suffixes.


Regards.

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


Re: [Samba] Re: Windows clients losing connection to Samba 3.0.27 PDC on FC7 i386

2007-11-27 Thread Rubin Bennett

On Wed, 2007-11-28 at 09:36 +1200, Patrick Rynhart wrote:
 Hi Rubin,
 
 Do you have any trusted domains and (if so) are users logging into a 
 trusted domain ?  If this is the case, I would start smbd, nmbd normally 
 (i.e. as daemons) but then run a single winbindd process in interactive 
 mode, debug level 10.
 
 i.e.
 
 winbind -i -d 10

No domain trusts - this is the only DC in a 3 site WAN connected (routed) 
domain. 

 Check beforehand that no other winbindd processes are running (i.e. ps 
 aux |grep winbindd).  Then I would attempt to logon from a member 
 workstaion.  View the debug output to see if you can track any problems. 
   Ctrl-Z (i.e. background) may help here (fg to resume) as there could 
 be a lot of output.
 
 If you don't have any trusted domains (and therefore aren't running 
 winbindd) then the approach I take is very similar. Start nmbd normally 
 (i.e. as a background daemon) but then run smbd as an interactive 
 process, again in debug level 10 mode.
 
 i.e.
 
 smbd -i -d 10
 
  From what you're describing, there may be a problem with the machine 
 account for the affected machines.  Look for something like 
 NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE or some other NT STATUS code 
 (these are defined in source/include/nterr.h if you happen to have the 
 Samba source on your domain controller).

The problem is that exactly this is happening, but to different machines, and 
totally sporadically.
When it happens, I get lines like the following in my /var/log/messages:

Nov 24 19:39:01 server smbd[10339]:   _net_auth2: failed to get machine
password for account SYSTEM$: NT_STATUS_ACCESS_DENIED
 
 Regards,
 
 Patrick


This, at least, is completely consistent - when a system gets 'locked
out' of the domain, it *always* shows lines like above in the logs.

I've Googled fairly extensively for errors as above, but turned up
nothing that seemed particularly applicable to my setup/ issue.

FWIW, I'm not running Winbind at all on the PDC or anywhere else on the network 
(AFAIK, anyway).

Thanks again,
Rubin

 
 Rubin Bennett wrote:
  Hello all...
  
  I have a site of about 50 pcs connected to a Samba domain controller.
  The domain has been running flawlessly for several years through several
  upgrades, and the last one (From Fedora Core 4/ Samba 3.0.23a to FC7/
  Samba 3.0.27) seems to have caused something to come unglued.
  
  The Workstations are periodically booting up in the morning and being
  unable to contact the domain controller.  The Samba server is giving
  failed authentication errors for the workstation itself (not the
  username/ password) in log.{workstation}.
  
  The upgrade was done nearly a month ago, and roughly 1/2 of the
  workstations in the network were unable to connect the following
  morning.  It happened again last week and about 10 more workstations
  were affected.  And it happened again today, where 1 workstation and a
  member server (Win2003r2) lost their credentials.  This time it was a
  really bad deal because the member server runs an application that is
  mission critical and therefore no one was able to work until it was
  fixed.
  
  In all cases, the users are able to log in by disconnecting their
  network cable and rebooting, then logging in with the cached credentials
  on the workstations.  Reconnecting the NIC after login allowed the users
  to connect to network resources on the Samba PDC, and work until a
  reboot.  A 'permanent' fix is to unjoin the PC from the domain and
  rejoin again.
  
  I had assumed that the issue was caused by the upgrade somehow, and that
  once every system had been re-joined it would go away.  However, the
  workstation from this morning had been unjoined and rejoined once before
  and now I fear that the issue will keep cropping up all over the place.
  
  Ideas, suggestions, flames?  I've copied my smb.conf below for your
  review as well.
  
  Thanks very much in advance,
  Rubin
  
  /etc/samba/smb.conf
  [global]
workgroup = WORKGROUP
netbios name = Server
server string = Network File Server
printcap name = cups
enable privileges = yes
load printers = yes
printcap cache time = 60
printing = cups
keepalive = 1
log file = /var/log/samba/log.%m
max log size = 50
  
log level = 3
security = user
encrypt passwords = Yes
map to guest = bad user
os level = 65
domain master = yes
preferred master = yes
passdb backend = tdbsam
  
pam password change = yes
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
add machine script = /usr/sbin/useradd -d /dev/null -g 200
  -s /bin/false -M  %u
  
oplocks = no
level2 oplocks = no
domain logons = Yes
logon script = login%G.bat
logon drive = Z:
logon home = \\server\%U
logon path = \\server\profiles\%U
wins support = Yes
name resolve order = wins hosts bcast
hide unreadable = Yes
  
  # Added in an attempt to fix broken tdbsam backend...
   

RE: [Samba] Read Write Permission

2007-11-27 Thread Dennis McLeod
Instead of giving users access to the share, make a group and give the group
access to the share. Add the needed users to the group. Later, when you add
a new user, you just add him to the group(s) he needs

(valid users = @accounting) 
Then add your users to the group.

Finally, force the group to accounting.
(force group = accounting)



Here's mine:

[accounts]
writeable = yes
path = /data/accounts 
force directory mode = 775
force group = acctsdep
force create mode = 775
comment = Accounting Files 
valid users = @acctsdep
veto files = /*.mp3/*.mpg/
create mode = 775
directory mode = 775
hide unreadable = yes



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dino Chopins
Sent: Tuesday, November 27, 2007 11:13 AM
To: samba@lists.samba.org
Subject: [Samba] Read Write Permission

Hi Everyone,

I've setup file server for my client with these schemes :
1. Samba server is on CentOS box
2. Every user has their Unix accounts
3. Every Unix accounts have their mapped Samba users/accounts with same name
4. They can get access to some shares, eg :
[Accounting]
path = /public/accounting
valid users = alexander, bernard, charlie, david, eugene
admin users = alexander
read list = eugene,
write list = alexander, bernard, charlie, david
read only = No
5. I use Ubuntu clients to access to this share with a valid user listed
above

My problem is, when one of this user let's say alexander created a file with
OpenOffice and save this file the user:group created is alexander:alexander
and permission is -rwxr--r-- (744). Thus, other user such as bernard cannot
open the file created by alexander. How can I change / set a default
permission to -rwxrw-rw- (766) ?

Regards,

Dino
--
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] Winbind runs great for a while then dies with read from socket failed!

2007-11-27 Thread c-ssugimoto
Hello all,

I experienced a same problem with 
http://lists.samba.org/archive/samba/2003-January/059073.html

I use following.

Hardware: Dell PowerEdge 2950
OS: Red Hat Enterprise Linux ES4 Update 4
Kernel: 2.6.9-55.0.2.ELsmp
RPM packages are:
samba-3.0.10-1.4E.12.2
samba-common-3.0.10-1.4E.12.2
samba-client-3.0.10-1.4E.12.2
pam_krb5-2.1.8-1
krb5-libs-1.3.4-49
krb5-workstation-1.3.4-49
krb5-devel-1.3.4-49


Samba server is a member server (Security=ADS) of Win2003 R2 Active Directory.
net ads join is OK.
'getent passwd' or 'wbinfo -u/g/t' are no problem.
winbind is used for user authentication for dovecot(POP3).

After a while (3months), winbind dies with following message, then 
authentication doesn't work.

pam_winbind[PID]: read from socket failed!
pam_winbind[PID]: internal module error (retval = 3, user = `username'
 |
pam_winbind[PID]: write to socket failed!
dovecot(pam_unix)[PID]: check pass; user unknown
dovecot(pam_unix)[PID]: authentication failure; logname= uid=0 euid=0 tty= 
ruser= rhost=
 |
out of memory [PID]
pam_winbind[PID]: request failed: No logon servers, PAM error was 4, NT error 
was NT_STATUS_NO_LOGON_SERVERS

After restarting the server, there is no trouble.

I want to know ...
Why this trouble occurred?
What is the cause?
How can I reproduce?

Any help is appreciated,
Satoshi
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] ldap_simple_bind: Can't connect to the LDAP server - Invalid argument

2007-11-27 Thread dane . shea
Hello I am trying to configure samba with Fedora Directory Server 1.0.4 on a 
Fedora 8 machine.  I am following this guide: 
http://directory.fedoraproject.org/wiki/Howto:Samba#PAM_Configuration.  
Everything has seemed to work out fine until I got to the part of Populating 
FDS with PDC Entry. My end result is hopefully that user can log in on Windows 
XP Pro with pGina and have their home drive automounted using a logon script 
with Samba using Fedora Directory Server as the backend.  By the way I don't 
know if I have configured everything up until this step correct but I haven't 
gotten any errors, is there any way to check if it is configured correctly?


Here is my terminal:

[EMAIL PROTECTED] ~]# net getlocalsid
SID for domain SHEA is: S-1-5-21-578281780-2648695933-2708965967
[EMAIL PROTECTED] ~]# gedit /tmp/sambaDomainName.ldif

my sambaDomainName.ldif:


dn: sambaDomainName=SHEA,dc=com
objectclass: sambaDomain
objectclass: sambaUnixIdPool
objectclass: top
sambaDomainName: SHEA
sambaSID: S-1-5-21-578281780-2648695933-2708965967
uidNumber: 550
gidNumber: 550


the end result:

[EMAIL PROTECTED] ~]# /opt/fedora-ds/slapd-daneshea/ldif2ldap cn=Directory 
manager password /tmp/sambaDomainName.ldif
ldap_simple_bind: Can't connect to the LDAP server - Invalid argument
[EMAIL PROTECTED] ~]# 



I think that my smb.conf is configured correctly but I wouldn't really know, as 
you can see I have 5 different users that I want to map network drives for 
automatically when they logon via a logon script in samba:


 Global parameters
[global]
   workgroup = WORKGROUP
   netbios name = SHEA
   server string = Shea Server
   map to guest = Bad User
   
log file = /var/log/samba/log.%m
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   
preferred master = yes
   local master = yes
domain master = yes
   dns proxy = No
   security = user

passdb backend = ldapsam:ldap://192.168.1.109
ldap admin dn = cn=Directory Manager
ldap suffix = dc=com
ldap user suffix = ou=People
ldap machine suffix = ou=Computers
ldap group suffix = ou=Groups

domain logons = yes
os level = 24
logon script = %U.bat



logon home = \\home\%u\
logon path = \\home\%u\
logon drive = P:

template shell = /bin/false
winbind use default domain = no


[netlogon]
comment = The domain logon service
path = /export/samba/logon
public = no
writeable = no
browsable = no


# Share
[Chance]
   path = /home/CShea
public = yes
   writeable = yes
[Dane]
   path = /home/DShea
public = yes
writeable = yes
[Berit]
   path = /home/BShea
public = yes
writeable = yes
[Dale]
   path = /home/DLShea
public = yes
writeable = yes
[Savanah]
   path = /home/SShea
public = yes
writeable = yes



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


[Samba] Browsing Samba shares thru Windows XP very slow

2007-11-27 Thread chen.lianlu
Hi,

I just set up Samba on my HP ML150 Mainframe. However browsing
directories thru a Windows xp Professional workstation is very slow.
Browsing thru Windows 95 is fast however. What could the problem be?

 Because the company change the IP address and then this problem happen? 

 

Best regards.

 

Chen Lianlu

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


svn commit: samba r26143 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 09:41:50 + (Tue, 27 Nov 2007)
New Revision: 26143

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

Log:
Add IDL and torture test for wkssvc_NetrWkstaUserGetInfo.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 09:35:10 UTC 
(rev 26142)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 09:41:50 UTC 
(rev 26143)
@@ -192,8 +192,23 @@
 
/*/
/* Function0x03  */
-   WERROR WKSSVC_NETRWKSTAUSERGETINFO ();
+   typedef struct {
+   [string,charset(UTF16)] uint16 *other_domains;
+   } wkssvc_NetrWkstaUserInfo1101;
 
+   typedef [switch_type(uint32)] union {
+   [case(0)] wkssvc_NetrWkstaUserInfo0 *info0;
+   [case(1)] wkssvc_NetrWkstaUserInfo1 *info1;
+   [case(1101)] wkssvc_NetrWkstaUserInfo1101 *info1101;
+   } wkssvc_NetrWkstaUserInfo;
+
+   WERROR wkssvc_NetrWkstaUserGetInfo(
+   [in] [string,charset(UTF16)] uint16 *unknown,
+   [in] uint32 level,
+   [out] [switch_is(level)] [ref] wkssvc_NetrWkstaUserInfo *info
+   );
+
+
/*/
/* Function0x04  */
WERROR WKSSVC_NETRWKSTAUSERSETINFO ();

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
09:35:10 UTC (rev 26142)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
09:41:50 UTC (rev 26143)
@@ -112,11 +112,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRWKSTAUSERGETINFO 
+/*
+  wkssvc_NetrWkstaUserGetInfo
 */
-static WERROR dcesrv_WKSSVC_NETRWKSTAUSERGETINFO(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRWKSTAUSERGETINFO *r)
+static WERROR dcesrv_wkssvc_NetrWkstaUserGetInfo(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrWkstaUserGetInfo *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 09:35:10 UTC 
(rev 26142)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 09:41:50 UTC 
(rev 26143)
@@ -22,6 +22,8 @@
 #include torture/torture.h
 #include librpc/gen_ndr/ndr_wkssvc_c.h
 #include torture/rpc/rpc.h
+#include lib/cmdline/popt_common.h
+#include param/param.h
 
 static bool test_NetWkstaGetInfo(struct torture_context *tctx,
 struct dcerpc_pipe *p)
@@ -129,6 +131,53 @@
 
return true;
 }
+
+static bool test_NetrWkstaUserGetInfo(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrWkstaUserGetInfo r;
+   union wkssvc_NetrWkstaUserInfo info;
+   const char *dom = lp_workgroup(global_loadparm);
+   struct cli_credentials *creds = cmdline_credentials;
+   const char *user = cli_credentials_get_username(creds);
+   int i;
+
+   const struct {
+   const char *unknown;
+   uint32_t level;
+   WERROR result;
+   } tests[] = {
+   { NULL, 0, WERR_NO_SUCH_LOGON_SESSION },
+   { NULL, 1, WERR_NO_SUCH_LOGON_SESSION },
+   { NULL, 1101, WERR_OK },
+   { dom, 0, WERR_INVALID_PARAM },
+   { dom, 1, WERR_INVALID_PARAM },
+   { dom, 1101, WERR_INVALID_PARAM },
+   { user, 0, WERR_INVALID_PARAM },
+   { user, 1, WERR_INVALID_PARAM },
+   { user, 1101, WERR_INVALID_PARAM },
+   };
+
+   for (i=0; iARRAY_SIZE(tests); i++) {
+   r.in.unknown = tests[i].unknown;
+   r.in.level = tests[i].level;
+   r.out.info = info;
+
+   torture_comment(tctx, testing NetrWkstaUserGetInfo level %u\n,
+   r.in.level);
+
+   status = dcerpc_wkssvc_NetrWkstaUserGetInfo(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrWkstaUserGetInfo failed);
+   torture_assert_werr_equal(tctx, r.out.result,
+ tests[i].result,
+ NetrWkstaUserGetInfo failed);
+   }
+
+   return true;
+}
+
 struct torture_suite 

svn commit: samba r26144 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 09:49:19 + (Tue, 27 Nov 2007)
New Revision: 26144

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

Log:
Add IDL and torture test for wkssvc_NetrWkstaTransportAdd and
wkssvc_NetrWkstaTransportDel.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 09:41:50 UTC 
(rev 26143)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 09:49:19 UTC 
(rev 26144)
@@ -232,26 +232,39 @@
 
typedef union {
[case(0)] wkssvc_NetWkstaTransportCtr0 *ctr0;
-   [default] ;
} wkssvc_NetWkstaTransportCtr;
 
+   typedef struct {
+   uint32 level;
+   [switch_is(level)] wkssvc_NetWkstaTransportCtr ctr;
+   } wkssvc_NetWkstaTransportInfo;
+
WERROR wkssvc_NetWkstaTransportEnum (
[in] [string,charset(UTF16)] uint16 *server_name,
-   [in,out] uint32 level,
-   [in,out,switch_is(level),ref] wkssvc_NetWkstaTransportCtr *ctr,
+   [in,out,ref] wkssvc_NetWkstaTransportInfo *info,
[in] uint32 max_buffer,
-   [out]uint32 totalentries,
+   [out,ref]uint32 *total_entries,
[in,out] uint32 *resume_handle
);
 
-
/*/
/* Function0x06  */
-   WERROR WKSSVC_NETRWKSTATRANSPORTADD ();
+   /* only supported on NT */
+   WERROR wkssvc_NetrWkstaTransportAdd(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] uint32 level, /* must be 0 */
+   [in] [ref] wkssvc_NetWkstaTransportInfo0 *info0,
+   [in,out] uint32 *parm_err
+);
 
/*/
/* Function0x07  */
-   WERROR WKSSVC_NETRWKSTATRANSPORTDEL ();
+   /* only supported on NT */
+   WERROR wkssvc_NetrWkstaTransportDel(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [string,charset(UTF16)] uint16 *transport_name,
+   [in] uint32 unknown3
+   );
 
/*/
/* Function0x08  */

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 09:41:50 UTC 
(rev 26143)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 09:49:19 UTC 
(rev 26144)
@@ -25,6 +25,8 @@
 #include lib/cmdline/popt_common.h
 #include param/param.h
 
+#define SMBTORTURE_TRANSPORT_NAME \\Device\\smbtrt_transport_name
+
 static bool test_NetWkstaGetInfo(struct torture_context *tctx,
 struct dcerpc_pipe *p)
 {
@@ -50,35 +52,97 @@
return true;
 }
 
-
 static bool test_NetWkstaTransportEnum(struct torture_context *tctx,
   struct dcerpc_pipe *p)
 {
NTSTATUS status;
struct wkssvc_NetWkstaTransportEnum r;
uint32_t resume_handle = 0;
+   struct wkssvc_NetWkstaTransportInfo info;
union wkssvc_NetWkstaTransportCtr ctr;
struct wkssvc_NetWkstaTransportCtr0 ctr0;
+   uint32_t total_entries = 0;
 
ZERO_STRUCT(ctr0);
ctr.ctr0 = ctr0;
 
+   info.level = 0;
+   info.ctr = ctr;
+
r.in.server_name = dcerpc_server_name(p);
-   r.in.level = 0;
-   r.in.ctr = ctr;
+   r.in.info = info;
r.in.max_buffer = (uint32_t)-1;
r.in.resume_handle = resume_handle;
-   r.out.ctr = ctr;
+   r.out.total_entries = total_entries;
+   r.out.info = info;
r.out.resume_handle = resume_handle;
 
+   torture_comment(tctx, testing NetWkstaTransportEnum level 0\n);
+
status = dcerpc_wkssvc_NetWkstaTransportEnum(p, tctx, r);
-   torture_assert_ntstatus_ok(tctx, status, NetWkstaTransportEnum 
failed);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetWkstaTransportEnum failed);
torture_assert_werr_ok(tctx, r.out.result, talloc_asprintf(tctx,
-   NetWkstaTransportEnum level %u failed, r.in.level));
+  NetWkstaTransportEnum level %u failed,
+  info.level));
 
return true;
 }
 
+static bool test_NetrWkstaTransportAdd(struct torture_context *tctx,
+  struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrWkstaTransportAdd r;
+   struct wkssvc_NetWkstaTransportInfo0 info0;
+   uint32_t parm_err = 0;
+
+   ZERO_STRUCT(info0);
+
+   

svn commit: samba r26145 - in branches/SAMBA_4_0/source: . rpc_server/wkssvc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 09:58:18 + (Tue, 27 Nov 2007)
New Revision: 26145

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

Log:
Fix server side of wkssvc_NetWkstaTransportEnum.

Guenther

Modified:
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/samba4-knownfail


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
09:49:19 UTC (rev 26144)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
09:58:18 UTC (rev 26145)
@@ -138,19 +138,19 @@
 static WERROR dcesrv_wkssvc_NetWkstaTransportEnum(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetWkstaTransportEnum *r)
 {
-   r-out.level = r-in.level;
-   r-out.totalentries = 0;
+   r-out.total_entries = 0;
r-out.resume_handle = NULL;
 
-   switch (r-in.level) {
+   switch (r-in.info-level) {
case 0:
-   r-out.ctr = talloc(mem_ctx, union wkssvc_NetWkstaTransportCtr);
-   W_ERROR_HAVE_NO_MEMORY(r-out.ctr);
-   r-out.ctr-ctr0 = talloc(mem_ctx, struct 
wkssvc_NetWkstaTransportCtr0);
-   W_ERROR_HAVE_NO_MEMORY(r-out.ctr-ctr0);
+   r-out.info = talloc(mem_ctx, struct 
wkssvc_NetWkstaTransportInfo);
+   W_ERROR_HAVE_NO_MEMORY(r-out.info);
+   r-out.info-level = r-in.info-level;
+   r-out.info-ctr.ctr0 = talloc(mem_ctx, struct 
wkssvc_NetWkstaTransportCtr0);
+   W_ERROR_HAVE_NO_MEMORY(r-out.info-ctr.ctr0);
 
-   r-out.ctr-ctr0-count = 0;
-   r-out.ctr-ctr0-array = NULL;
+   r-out.info-ctr.ctr0-count = 0;
+   r-out.info-ctr.ctr0-array = NULL;
 
return WERR_NOT_SUPPORTED;
 
@@ -162,21 +162,21 @@
 }
 
 
-/* 
-  WKSSVC_NETRWKSTATRANSPORTADD 
+/*
+  wkssvc_NetrWkstaTransportAdd
 */
-static WERROR dcesrv_WKSSVC_NETRWKSTATRANSPORTADD(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRWKSTATRANSPORTADD *r)
+static WERROR dcesrv_wkssvc_NetrWkstaTransportAdd(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrWkstaTransportAdd *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
 
 
-/* 
-  WKSSVC_NETRWKSTATRANSPORTDEL 
+/*
+  wkssvc_NetrWkstaTransportDel
 */
-static WERROR dcesrv_WKSSVC_NETRWKSTATRANSPORTDEL(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRWKSTATRANSPORTDEL *r)
+static WERROR dcesrv_wkssvc_NetrWkstaTransportDel(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrWkstaTransportDel *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/samba4-knownfail
===
--- branches/SAMBA_4_0/source/samba4-knownfail  2007-11-27 09:49:19 UTC (rev 
26144)
+++ branches/SAMBA_4_0/source/samba4-knownfail  2007-11-27 09:58:18 UTC (rev 
26145)
@@ -6,8 +6,6 @@
 RAW-OPLOCK.*/OPLOCK
 RPC-WINREG
 LOCAL-REGISTRY.*/security # Not implemented yet
-RPC-WKSSVC.*NetWkstaGetInfo
-RPC-WKSSVC.*NetWkstaTransportEnum
 RPC-HANDLES.*/lsarpc-shared
 RPC-HANDLES.*/mixed-shared
 RPC-EPMAPPER.*/Insert



svn commit: samba r26146 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 10:07:00 + (Tue, 27 Nov 2007)
New Revision: 26146

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

Log:
Add IDL and torture test for wkssvc_NetrUseEnum().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 09:58:18 UTC 
(rev 26145)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 10:07:00 UTC 
(rev 26146)
@@ -280,8 +280,67 @@
 
/*/
/* Function0x0b  */
-   WERROR WKSSVC_NETRUSEENUM ();
+   typedef struct {
+   [string,charset(UTF16)] uint16 *local;
+   [string,charset(UTF16)] uint16 *remote;
+   [string,charset(UTF16)] uint16 *password;
+   uint32 status;
+   uint32 asg_type;
+   uint32 ref_count;
+   uint32 use_count;
+   [string,charset(UTF16)] uint16 *user_name;
+   [string,charset(UTF16)] uint16 *domain_name;
+   } wkssvc_NetrUseInfo2;
 
+   typedef struct {
+   [string,charset(UTF16)] uint16 *local;
+   [string,charset(UTF16)] uint16 *remote;
+   [string,charset(UTF16)] uint16 *password;
+   uint32 status;
+   uint32 asg_type;
+   uint32 ref_count;
+   uint32 use_count;
+   } wkssvc_NetrUseInfo1;
+
+   typedef struct {
+   [string,charset(UTF16)] uint16 *local;
+   [string,charset(UTF16)] uint16 *remote;
+   } wkssvc_NetrUseInfo0;
+
+   typedef struct {
+   uint32 count;
+   [size_is(count)] wkssvc_NetrUseInfo2 *array;
+   } wkssvc_NetrUseEnumCtr2;
+
+   typedef struct {
+   uint32 count;
+   [size_is(count)] wkssvc_NetrUseInfo1 *array;
+   } wkssvc_NetrUseEnumCtr1;
+
+   typedef struct {
+   uint32 count;
+   [size_is(count)] wkssvc_NetrUseInfo0 *array;
+   } wkssvc_NetrUseEnumCtr0;
+
+   typedef [switch_type(uint32)] union {
+   [case(0)] wkssvc_NetrUseEnumCtr0 *ctr0;
+   [case(1)] wkssvc_NetrUseEnumCtr1 *ctr1;
+   [case(2)] wkssvc_NetrUseEnumCtr2 *ctr2;
+   } wkssvc_NetrUseEnumCtr;
+
+   typedef struct {
+   uint32 level;
+   [switch_is(level)] wkssvc_NetrUseEnumCtr ctr;
+   } wkssvc_NetrUseEnumInfo;
+
+   WERROR wkssvc_NetrUseEnum(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,out] [ref] wkssvc_NetrUseEnumInfo *info,
+   [in] uint32 prefmaxlen,
+   [out,ref] uint32 *entries_read,
+   [in,out] uint32 *resume_handle
+   );
+
/*/
/* Function0x0c  */
WERROR WKSSVC_NETRMESSAGEBUFFERSEND ();

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
09:58:18 UTC (rev 26145)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
10:07:00 UTC (rev 26146)
@@ -212,11 +212,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRUSEENUM 
+/*
+  wkssvc_NetrUseEnum
 */
-static WERROR dcesrv_WKSSVC_NETRUSEENUM(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRUSEENUM *r)
+static WERROR dcesrv_wkssvc_NetrUseEnum(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrUseEnum *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 09:58:18 UTC 
(rev 26145)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 10:07:00 UTC 
(rev 26146)
@@ -242,6 +242,62 @@
return true;
 }
 
+static bool test_NetrUseEnum(struct torture_context *tctx,
+struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrUseEnum r;
+   uint32_t handle = 0;
+   uint32_t entries_read = 0;
+   struct wkssvc_NetrUseEnumInfo info;
+   struct wkssvc_NetrUseEnumCtr0 *use0;
+   struct wkssvc_NetrUseEnumCtr1 *use1;
+   struct wkssvc_NetrUseEnumCtr2 *use2;
+   uint32_t levels[] = { 0, 1, 2 };
+   int i;
+
+   for (i=0; iARRAY_SIZE(levels); i++) {
+
+   ZERO_STRUCT(info);
+
+   info.level = levels[i];
+   switch (info.level) {
+   case 0:
+

svn commit: samba-docs r1210 - in trunk/manpages-3: .

2007-11-27 Thread kseeger
Author: kseeger
Date: 2007-11-27 10:11:21 + (Tue, 27 Nov 2007)
New Revision: 1210

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

Log:
Fix typo
Modified:
   trunk/manpages-3/idmap_ad.8.xml


Changeset:
Modified: trunk/manpages-3/idmap_ad.8.xml
===
--- trunk/manpages-3/idmap_ad.8.xml 2007-11-21 04:19:33 UTC (rev 1209)
+++ trunk/manpages-3/idmap_ad.8.xml 2007-11-27 10:11:21 UTC (rev 1210)
@@ -60,7 +60,7 @@
guarantee on the order conflicting mappings would be resolved at this 
point.
 
This example also shows how to leave a small non conflicting range for 
local
-   id allocation that may be used in internal backends like BULTIN.
+   id allocation that may be used in internal backends like BUILTIN.
/para
 
programlisting



svn commit: samba r26151 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 10:34:53 + (Tue, 27 Nov 2007)
New Revision: 26151

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

Log:
Add IDL and torture test for wkssvc_NetrValidateName() and
wkssvc_NetrValidateName2().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 10:29:19 UTC 
(rev 26150)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 10:34:53 UTC 
(rev 26151)
@@ -404,8 +404,23 @@
 
/*/
/* Function0x13  */
-   WERROR WKSSVC_NETRVALIDATENAME ();
+   typedef enum {
+   NetSetupUnknown = 0,
+   NetSetupMachine = 1,
+   NetSetupWorkgroup = 2,
+   NetSetupDomain = 3,
+   NetSetupNonExistentDomain = 4,
+   NetSetupDnsMachine = 5
+   } wkssvc_NetValidateNameType;
 
+   WERROR wkssvc_NetrValidateName(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [ref] [string,charset(UTF16)] uint16 *name,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] [string,charset(UTF16)] uint16 *Password,
+   [in] wkssvc_NetValidateNameType name_type
+   );
+
/*/
/* Function0x14  */
WERROR WKSSVC_NETRGETJOININFORMATION ();
@@ -482,7 +497,13 @@
 
/*/
/* Function0x19  */
-   WERROR WKSSVC_NETRVALIDATENAME2 ();
+   WERROR wkssvc_NetrValidateName2(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [ref] [string,charset(UTF16)] uint16 *name,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] wkssvc_PasswordBuffer *EncryptedPassword,
+   [in] wkssvc_NetValidateNameType name_type
+   );
 
/*/
/* Function0x1a  */

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
10:29:19 UTC (rev 26150)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
10:34:53 UTC (rev 26151)
@@ -292,11 +292,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRVALIDATENAME 
+/*
+  wkssvc_NetrValidateName
 */
-static WERROR dcesrv_WKSSVC_NETRVALIDATENAME(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRVALIDATENAME *r)
+static WERROR dcesrv_wkssvc_NetrValidateName(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrValidateName *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
@@ -352,11 +352,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRVALIDATENAME2 
+/*
+  wkssvc_NetrValidateName2
 */
-static WERROR dcesrv_WKSSVC_NETRVALIDATENAME2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRVALIDATENAME2 *r)
+static WERROR dcesrv_wkssvc_NetrValidateName2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrValidateName2 *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 10:29:19 UTC 
(rev 26150)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 10:34:53 UTC 
(rev 26151)
@@ -504,6 +504,66 @@
return true;
 }
 
+static bool test_NetrValidateName(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrValidateName r;
+   uint16_t levels[] = {0,1,2,3,4,5};
+   int i;
+
+   for (i=0; iARRAY_SIZE(levels); i++) {
+
+   r.in.server_name = talloc_asprintf(tctx, %s, 
dcerpc_server_name(p));
+   r.in.name = lp_workgroup(global_loadparm);
+   r.in.Account = NULL;
+   r.in.Password = NULL;
+   r.in.name_type = levels[i];
+
+   torture_comment(tctx, testing NetrValidateName level %u\n,
+   r.in.name_type);
+
+   status = dcerpc_wkssvc_NetrValidateName(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrValidateName failed);
+   torture_assert_werr_equal(tctx, r.out.result,
+ WERR_NOT_SUPPORTED,
+   

svn commit: samba r26154 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:14:51 + (Tue, 27 Nov 2007)
New Revision: 26154

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

Log:
Add IDL and torture test for wkssvc_NetrWorkstationStatistics(). A lot of
unknowns, I know...

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:04:51 UTC 
(rev 26153)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:14:51 UTC 
(rev 26154)
@@ -376,8 +376,57 @@
 
/*/
/* Function0x0d  */
-   WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET ();
+   typedef struct {
+   hyper unknown1;
+   hyper unknown2;
+   hyper unknown3;
+   hyper unknown4;
+   hyper unknown5;
+   hyper unknown6;
+   hyper unknown7;
+   hyper unknown8;
+   hyper unknown9;
+   hyper unknown10;
+   hyper unknown11;
+   hyper unknown12;
+   hyper unknown13;
+   uint32 unknown14;
+   uint32 unknown15;
+   uint32 unknown16;
+   uint32 unknown17;
+   uint32 unknown18;
+   uint32 unknown19;
+   uint32 unknown20;
+   uint32 unknown21;
+   uint32 unknown22;
+   uint32 unknown23;
+   uint32 unknown24;
+   uint32 unknown25;
+   uint32 unknown26;
+   uint32 unknown27;
+   uint32 unknown28;
+   uint32 unknown29;
+   uint32 unknown30;
+   uint32 unknown31;
+   uint32 unknown32;
+   uint32 unknown33;
+   uint32 unknown34;
+   uint32 unknown35;
+   uint32 unknown36;
+   uint32 unknown37;
+   uint32 unknown38;
+   uint32 unknown39;
+   uint32 unknown40;
+   } wkssvc_NetrWorkstationStatistics;
 
+   WERROR wkssvc_NetrWorkstationStatisticsGet(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [string,charset(UTF16)] uint16 *unknown2,
+   [in] uint32 unknown3,
+   [in] uint32 unknown4,
+   [out] [ref] wkssvc_NetrWorkstationStatistics **info
+   );
+
/*/
/* Function0x0e  */
WERROR wkssvc_NetrLogonDomainNameAdd(

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:04:51 UTC (rev 26153)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:14:51 UTC (rev 26154)
@@ -232,11 +232,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRWORKSTATIONSTATISTICSGET 
+/*
+  wkssvc_NetrWorkstationStatisticsGet
 */
-static WERROR dcesrv_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct 
dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRWORKSTATIONSTATISTICSGET *r)
+static WERROR dcesrv_wkssvc_NetrWorkstationStatisticsGet(struct 
dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrWorkstationStatisticsGet *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:04:51 UTC 
(rev 26153)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:14:51 UTC 
(rev 26154)
@@ -716,6 +716,30 @@
return true;
 }
 
+static bool test_NetrWorkstationStatisticsGet(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrWorkstationStatisticsGet r;
+   struct wkssvc_NetrWorkstationStatistics *info;
+
+   ZERO_STRUCT(r);
+
+   info = talloc_zero(tctx, struct wkssvc_NetrWorkstationStatistics);
+
+   r.in.server_name = dcerpc_server_name(p);
+   r.out.info = info;
+
+   torture_comment(tctx, testing NetrWorkstationStatisticsGet\n);
+
+   status = dcerpc_wkssvc_NetrWorkstationStatisticsGet(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrWorkstationStatisticsGet failed);
+   torture_assert_werr_ok(tctx, r.out.result,
+  NetrWorkstationStatisticsGet failed);
+   return true;
+}
+
 struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX 

svn commit: samba r26155 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:20:34 + (Tue, 27 Nov 2007)
New Revision: 26155

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

Log:
Add IDL and torture teset for wkssvc_NetrMessageBufferSend().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:14:51 UTC 
(rev 26154)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:20:34 UTC 
(rev 26155)
@@ -372,7 +372,13 @@
 
/*/
/* Function0x0c  */
-   WERROR WKSSVC_NETRMESSAGEBUFFERSEND ();
+   WERROR wkssvc_NetrMessageBufferSend(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,ref] [string,charset(UTF16)] uint16 *message_name,
+   [in] [string,charset(UTF16)] uint16 *message_sender_name,
+   [in] [size_is(message_size)] [ref] uint8 *message_buffer,
+   [in] uint32 message_size
+   );
 
/*/
/* Function0x0d  */

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:14:51 UTC (rev 26154)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:20:34 UTC (rev 26155)
@@ -222,11 +222,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRMESSAGEBUFFERSEND 
+/*
+  wkssvc_NetrMessageBufferSend
 */
-static WERROR dcesrv_WKSSVC_NETRMESSAGEBUFFERSEND(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRMESSAGEBUFFERSEND *r)
+static WERROR dcesrv_wkssvc_NetrMessageBufferSend(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrMessageBufferSend *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:14:51 UTC 
(rev 26154)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:20:34 UTC 
(rev 26155)
@@ -28,6 +28,7 @@
 #define SMBTORTURE_ALTERNATE_NAME smbtrt_altname
 #define SMBTORTURE_TRANSPORT_NAME \\Device\\smbtrt_transport_name
 #define SMBTORTURE_USE_NAME S:
+#define SMBTORTURE_MESSAGE smbtrt_message
 
 static bool test_NetWkstaGetInfo(struct torture_context *tctx,
 struct dcerpc_pipe *p)
@@ -740,6 +741,35 @@
return true;
 }
 
+/* only succeeds as long as the local messenger service is running - Guenther 
*/
+
+static bool test_NetrMessageBufferSend(struct torture_context *tctx,
+  struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrMessageBufferSend r;
+   const char *message = SMBTORTURE_MESSAGE;
+   size_t size;
+   uint8_t *msg;
+
+   size = push_ucs2_talloc(tctx, (void **)msg, message);
+
+   r.in.server_name = dcerpc_server_name(p);
+   r.in.message_name = dcerpc_server_name(p);
+   r.in.message_sender_name = dcerpc_server_name(p);
+   r.in.message_buffer = msg;
+   r.in.message_size = size;
+
+   torture_comment(tctx, testing NetrMessageBufferSend\n);
+
+   status = dcerpc_wkssvc_NetrMessageBufferSend(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrMessageBufferSend failed);
+   torture_assert_werr_ok(tctx, r.out.result,
+  NetrMessageBufferSend failed);
+   return true;
+}
+
 struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx)
 {
struct torture_suite *suite;
@@ -790,6 +820,8 @@
 
torture_rpc_tcase_add_test(tcase, NetrWorkstationStatisticsGet,
   test_NetrWorkstationStatisticsGet);
+   torture_rpc_tcase_add_test(tcase, NetrMessageBufferSend,
+  test_NetrMessageBufferSend);
 
return suite;
 }



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

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:21:26 + (Tue, 27 Nov 2007)
New Revision: 26156

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

Log:
Choose a more speaking message in test_NetrMessageBufferSend().

Guenther

Modified:
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:20:34 UTC 
(rev 26155)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:21:26 UTC 
(rev 26156)
@@ -28,7 +28,7 @@
 #define SMBTORTURE_ALTERNATE_NAME smbtrt_altname
 #define SMBTORTURE_TRANSPORT_NAME \\Device\\smbtrt_transport_name
 #define SMBTORTURE_USE_NAME S:
-#define SMBTORTURE_MESSAGE smbtrt_message
+#define SMBTORTURE_MESSAGE You are currently tortured by Samba
 
 static bool test_NetWkstaGetInfo(struct torture_context *tctx,
 struct dcerpc_pipe *p)



svn commit: samba r26158 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:49:51 + (Tue, 27 Nov 2007)
New Revision: 26158

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

Log:
Add IDL for wkssvc_NetrRenameMachineInDomain().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:31:09 UTC 
(rev 26157)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 11:49:51 UTC 
(rev 26158)
@@ -455,8 +455,19 @@
 
/*/
/* Function0x12  */
-   WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN ();
+   typedef [bitmap32bit] bitmap {
+   /* TRUE: create the account in the domain */
+   WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE= 0x0002
+   } wkssvc_renameflags;
 
+   WERROR wkssvc_NetrRenameMachineInDomain(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [string,charset(UTF16)] uint16 *NewMachineName,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] [string,charset(UTF16)] uint16 *password,
+   [in] wkssvc_renameflags RenameOptions
+   );
+
/*/
/* Function0x13  */
typedef enum {
@@ -535,11 +546,6 @@
[in] wkssvc_joinflags unjoin_flags
);
 
-   typedef [bitmap32bit] bitmap {
-   /* TRUE: create the account in the domain */
-   WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE= 0x0002
-   } wkssvc_renameflags;
-
/*/
/* Function0x18  */
WERROR wkssvc_NetrRenameMachineInDomain2(

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:31:09 UTC (rev 26157)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:49:51 UTC (rev 26158)
@@ -282,11 +282,11 @@
 }
 
 
-/* 
-  WKSSVC_NETRRENAMEMACHINEINDOMAIN 
+/*
+  wkssvc_NetrRenameMachineInDomain
 */
-static WERROR dcesrv_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRRENAMEMACHINEINDOMAIN *r)
+static WERROR dcesrv_wkssvc_NetrRenameMachineInDomain(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrRenameMachineInDomain *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
@@ -342,8 +342,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRRENAMEMACHINEINDOMAIN2 
+/*
+  wkssvc_NetrRenameMachineInDomain2
 */
 static WERROR dcesrv_wkssvc_NetrRenameMachineInDomain2(struct 
dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetrRenameMachineInDomain2 *r)



svn commit: samba r26159 - in branches/SAMBA_4_0/source/rpc_server/wkssvc: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:51:22 + (Tue, 27 Nov 2007)
New Revision: 26159

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

Log:
Align to coding conventions.

Guenther

Modified:
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:49:51 UTC (rev 26158)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
11:51:22 UTC (rev 26159)
@@ -1,20 +1,20 @@
-/* 
+/*
Unix SMB/CIFS implementation.
 
endpoint server for the wkssvc pipe
 
Copyright (C) Stefan (metze) Metzmacher 2004
-   
+
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/.
 */
@@ -24,8 +24,8 @@
 #include librpc/gen_ndr/ndr_wkssvc.h
 #include rpc_server/common/common.h
 
-/* 
-  wkssvc_NetWkstaGetInfo 
+/*
+  wkssvc_NetWkstaGetInfo
 */
 static WERROR dcesrv_wkssvc_NetWkstaGetInfo(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetWkstaGetInfo *r)
@@ -42,7 +42,7 @@
case 100:
{
struct wkssvc_NetWkstaInfo100 *info100;
-   
+
info100 = talloc(mem_ctx, struct wkssvc_NetWkstaInfo100);
W_ERROR_HAVE_NO_MEMORY(info100);
 
@@ -92,8 +92,8 @@
 }
 
 
-/* 
-  wkssvc_NetWkstaSetInfo 
+/*
+  wkssvc_NetWkstaSetInfo
 */
 static WERROR dcesrv_wkssvc_NetWkstaSetInfo(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetWkstaSetInfo *r)
@@ -102,7 +102,7 @@
 }
 
 
-/* 
+/*
   wkssvc_NetWkstaEnumUsers
 */
 static WERROR dcesrv_wkssvc_NetWkstaEnumUsers(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
@@ -132,8 +132,8 @@
 }
 
 
-/* 
-  wkssvc_NetWkstaTransportEnum 
+/*
+  wkssvc_NetWkstaTransportEnum
 */
 static WERROR dcesrv_wkssvc_NetWkstaTransportEnum(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetWkstaTransportEnum *r)
@@ -262,8 +262,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRJOINDOMAIN 
+/*
+  WKSSVC_NETRJOINDOMAIN
 */
 static WERROR dcesrv_WKSSVC_NETRJOINDOMAIN(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
   struct WKSSVC_NETRJOINDOMAIN *r)
@@ -272,8 +272,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRUNJOINDOMAIN 
+/*
+  WKSSVC_NETRUNJOINDOMAIN
 */
 static WERROR dcesrv_WKSSVC_NETRUNJOINDOMAIN(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct WKSSVC_NETRUNJOINDOMAIN *r)
@@ -302,8 +302,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRGETJOININFORMATION 
+/*
+  WKSSVC_NETRGETJOININFORMATION
 */
 static WERROR dcesrv_WKSSVC_NETRGETJOININFORMATION(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct WKSSVC_NETRGETJOININFORMATION *r)
@@ -312,8 +312,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRGETJOINABLEOUS 
+/*
+  WKSSVC_NETRGETJOINABLEOUS
 */
 static WERROR dcesrv_WKSSVC_NETRGETJOINABLEOUS(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct WKSSVC_NETRGETJOINABLEOUS *r)
@@ -322,8 +322,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRJOINDOMAIN2 
+/*
+  WKSSVC_NETRJOINDOMAIN2
 */
 static WERROR dcesrv_wkssvc_NetrJoinDomain2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetrJoinDomain2 *r)
@@ -332,8 +332,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRUNJOINDOMAIN2 
+/*
+  WKSSVC_NETRUNJOINDOMAIN2
 */
 static WERROR dcesrv_wkssvc_NetrUnjoinDomain2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct wkssvc_NetrUnjoinDomain2 *r)
@@ -362,8 +362,8 @@
 }
 
 
-/* 
-  WKSSVC_NETRGETJOINABLEOUS2 
+/*
+  WKSSVC_NETRGETJOINABLEOUS2
 */
 static WERROR dcesrv_WKSSVC_NETRGETJOINABLEOUS2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct WKSSVC_NETRGETJOINABLEOUS2 *r)



svn commit: samba r26160 - in branches/SAMBA_4_0/source/libcli/util: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 11:58:33 + (Tue, 27 Nov 2007)
New Revision: 26160

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

Log:
Add WERR_NAME_NOT_FOUND.

Guenther

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


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/doserr.c
===
--- branches/SAMBA_4_0/source/libcli/util/doserr.c  2007-11-27 11:51:22 UTC 
(rev 26159)
+++ branches/SAMBA_4_0/source/libcli/util/doserr.c  2007-11-27 11:58:33 UTC 
(rev 26160)
@@ -133,6 +133,7 @@
{ WERR_FRS_INSUFFICIENT_PRIV, WERR_FRS_INSUFFICIENT_PRIV },
{ WERR_RPC_E_REMOTE_DISABLED, WERR_RPC_E_REMOTE_DISABLED },
{ WERR_NOT_CONNECTED, WERR_NOT_CONNECTED },
+   { WERR_NAME_NOT_FOUND, WERR_NAME_NOT_FOUND},
{ NULL, W_ERROR(0) }
 };
 

Modified: branches/SAMBA_4_0/source/libcli/util/werror.h
===
--- branches/SAMBA_4_0/source/libcli/util/werror.h  2007-11-27 11:51:22 UTC 
(rev 26159)
+++ branches/SAMBA_4_0/source/libcli/util/werror.h  2007-11-27 11:58:33 UTC 
(rev 26160)
@@ -115,6 +115,7 @@
 #define WERR_JOB_NOT_FOUND W_ERROR(2151)
 #define WERR_DEST_NOT_FOUND W_ERROR(2152)
 #define WERR_NOT_CONNECTED W_ERROR(2250)
+#define WERR_NAME_NOT_FOUND W_ERROR(2273)
 #define WERR_SESSION_NOT_FOUND W_ERROR(2312)
 #define WERR_FID_NOT_FOUND W_ERROR(2314)
 #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320)



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

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:04:03 + (Tue, 27 Nov 2007)
New Revision: 26161

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

Log:
Add (dangerous) torture tests for wkssvc_NetrRenameMachineInDomain() and
wkssvc_NetrRenameMachineInDomain2().

Guenther

Modified:
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 11:58:33 UTC 
(rev 26160)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:04:03 UTC 
(rev 26161)
@@ -25,6 +25,7 @@
 #include lib/cmdline/popt_common.h
 #include param/param.h
 
+#define SMBTORTURE_MACHINE_NAME smbtrt_name
 #define SMBTORTURE_ALTERNATE_NAME smbtrt_altname
 #define SMBTORTURE_TRANSPORT_NAME \\Device\\smbtrt_transport_name
 #define SMBTORTURE_USE_NAME S:
@@ -812,7 +813,120 @@
return true;
 }
 
+static bool test_NetrRenameMachineInDomain(struct torture_context *tctx,
+  struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrRenameMachineInDomain r;
 
+   r.in.server_name = dcerpc_server_name(p);
+   r.in.NewMachineName = SMBTORTURE_MACHINE_NAME;
+   r.in.Account = NULL;
+   r.in.password = NULL;
+   r.in.RenameOptions = 0;
+
+   torture_comment(tctx, testing NetrRenameMachineInDomain\n);
+
+   status = dcerpc_wkssvc_NetrRenameMachineInDomain(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrRenameMachineInDomain failed);
+   torture_assert_werr_equal(tctx, r.out.result, WERR_NOT_SUPPORTED,
+ NetrRenameMachineInDomain failed);
+   return true;
+}
+
+static bool test_NetrRenameMachineInDomain2_name(struct torture_context *tctx,
+struct dcerpc_pipe *p,
+const char *new_name)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrRenameMachineInDomain2 r;
+
+   r.in.server_name = dcerpc_server_name(p);
+   r.in.NewMachineName = new_name;
+   r.in.Account = NULL;
+   r.in.EncryptedPassword = NULL;
+   r.in.RenameOptions = 0;
+
+   status = dcerpc_wkssvc_NetrRenameMachineInDomain2(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrRenameMachineInDomain2 failed);
+   torture_assert_werr_ok(tctx, r.out.result,
+  NetrRenameMachineInDomain2 failed);
+   return true;
+}
+
+static bool test_NetrRenameMachineInDomain2(struct torture_context *tctx,
+   struct dcerpc_pipe *p)
+{
+   const char **names_o = NULL, **names = NULL;
+   int num_names_o = 0, num_names = 0;
+
+   torture_comment(tctx, testing NetrRenameMachineInDomain2\n);
+
+   return test_NetrRenameMachineInDomain2_name(tctx, p, 
w2k3dc-rhber.ber.redhat.com);
+
+   if (!test_NetrEnumerateComputerNames_level(tctx, p,
+  NetPrimaryComputerName,
+  names_o, num_names_o))
+   {
+   return false;
+   }
+
+   if (num_names_o != 1) {
+   return false;
+   }
+
+   if (!test_NetrRenameMachineInDomain2_name(tctx, p,
+ SMBTORTURE_MACHINE_NAME))
+   {
+   return false;
+   }
+
+   if (!test_NetrEnumerateComputerNames_level(tctx, p,
+  NetPrimaryComputerName,
+  names, num_names))
+   {
+   return false;
+   }
+
+   if (num_names != 1) {
+   return false;
+   }
+
+   if (strequal(names[0], names_o[0])) {
+   test_NetrRenameMachineInDomain2_name(tctx, p, names_o[0]);
+   return false;
+   }
+
+   if (!strequal(names[0], SMBTORTURE_MACHINE_NAME)) {
+   test_NetrRenameMachineInDomain2_name(tctx, p, names_o[0]);
+   return false;
+   }
+
+   if (!test_NetrRenameMachineInDomain2_name(tctx, p, names_o[0]))
+   {
+   return false;
+   }
+
+   if (!test_NetrEnumerateComputerNames_level(tctx, p,
+  NetPrimaryComputerName,
+  names, num_names))
+   {
+   return false;
+   }
+
+   if (num_names != 1) {
+   return false;
+   }
+
+   if (!strequal(names[0], names_o[0])) {
+   return false;
+   }
+
+   return true;
+}
+
 static bool test_NetrWorkstationStatisticsGet(struct torture_context *tctx,
  struct dcerpc_pipe *p)
 {
@@ 

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

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:04:48 + (Tue, 27 Nov 2007)
New Revision: 26162

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

Log:
Remove accidental commit.

Guenther

Modified:
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:04:03 UTC 
(rev 26161)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:04:48 UTC 
(rev 26162)
@@ -864,8 +864,6 @@
 
torture_comment(tctx, testing NetrRenameMachineInDomain2\n);
 
-   return test_NetrRenameMachineInDomain2_name(tctx, p, 
w2k3dc-rhber.ber.redhat.com);
-
if (!test_NetrEnumerateComputerNames_level(tctx, p,
   NetPrimaryComputerName,
   names_o, num_names_o))



svn commit: samba r26163 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:08:01 + (Tue, 27 Nov 2007)
New Revision: 26163

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

Log:
Add IDL and torture test for wkssvc_NetrGetJoinInformation().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:04:48 UTC 
(rev 26162)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:08:01 UTC 
(rev 26163)
@@ -489,8 +489,19 @@
 
/*/
/* Function0x14  */
-   WERROR WKSSVC_NETRGETJOININFORMATION ();
+   typedef enum {
+   NetSetupUnknownStatus = 0,
+   NetSetupUnjoined = 1,
+   NetSetupWorkgroupName = 2,
+   NetSetupDomainName = 3
+   } wkssvc_NetJoinStatus;
 
+   WERROR wkssvc_NetrGetJoinInformation(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,out,ref] [string,charset(UTF16)] uint16 **name_buffer,
+   [out,ref] wkssvc_NetJoinStatus *name_type
+   );
+
/*/
/* Function0x15  */
WERROR WKSSVC_NETRGETJOINABLEOUS ();

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:04:48 UTC (rev 26162)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:08:01 UTC (rev 26163)
@@ -303,10 +303,10 @@
 
 
 /*
-  WKSSVC_NETRGETJOININFORMATION
+  wkssvc_NetrGetJoinInformation
 */
-static WERROR dcesrv_WKSSVC_NETRGETJOININFORMATION(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRGETJOININFORMATION *r)
+static WERROR dcesrv_wkssvc_NetrGetJoinInformation(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrGetJoinInformation *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:04:48 UTC 
(rev 26162)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:08:01 UTC 
(rev 26163)
@@ -978,6 +978,28 @@
return true;
 }
 
+static bool test_NetrGetJoinInformation(struct torture_context *tctx,
+   struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrGetJoinInformation r;
+   enum wkssvc_NetJoinStatus join_status;
+   const char *name_buffer = ;
+
+   r.in.server_name = dcerpc_server_name(p);
+   r.in.name_buffer = r.out.name_buffer = name_buffer;
+   r.out.name_type = join_status;
+
+   torture_comment(tctx, testing NetrGetJoinInformation\n);
+
+   status = dcerpc_wkssvc_NetrGetJoinInformation(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status,
+  NetrGetJoinInformation failed);
+   torture_assert_werr_ok(tctx, r.out.result,
+  NetrGetJoinInformation failed);
+   return true;
+}
+
 struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx)
 {
struct torture_suite *suite;
@@ -1036,6 +1058,9 @@
torture_rpc_tcase_add_test(tcase, NetrEnumerateComputerNames,
   test_NetrEnumerateComputerNames);
 
+   torture_rpc_tcase_add_test(tcase, NetrGetJoinInformation,
+  test_NetrGetJoinInformation);
+
torture_rpc_tcase_add_test(tcase, NetrWorkstationStatisticsGet,
   test_NetrWorkstationStatisticsGet);
torture_rpc_tcase_add_test(tcase, NetrMessageBufferSend,



svn commit: samba r26164 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:11:49 + (Tue, 27 Nov 2007)
New Revision: 26164

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

Log:
Add IDL for wkssvc_NetrJoinDomain() and wkssvc_NetrUnjoinDomain().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:08:01 UTC 
(rev 26163)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:11:49 UTC 
(rev 26164)
@@ -447,11 +447,23 @@
 
/*/
/* Function0x10  */
-   WERROR WKSSVC_NETRJOINDOMAIN ();
+   WERROR wkssvc_NetrJoinDomain(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,ref] [string,charset(UTF16)] uint16 *domain_name,
+   [in] [string,charset(UTF16)] uint16 *account_ou,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] [string,charset(UTF16)] uint16 *unknown,
+   [in] wkssvc_joinflags join_flags
+   );
 
/*/
/* Function0x11  */
-   WERROR WKSSVC_NETRUNJOINDOMAIN ();
+   WERROR wkssvc_NetrUnjoinDomain(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] [string,charset(UTF16)] uint16 *password,
+   [in] wkssvc_joinflags unjoin_flags
+   );
 
/*/
/* Function0x12  */

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:08:01 UTC (rev 26163)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:11:49 UTC (rev 26164)
@@ -263,20 +263,20 @@
 
 
 /*
-  WKSSVC_NETRJOINDOMAIN
+  wkssvc_NetrJoinDomain
 */
-static WERROR dcesrv_WKSSVC_NETRJOINDOMAIN(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRJOINDOMAIN *r)
+static WERROR dcesrv_wkssvc_NetrJoinDomain(struct dcesrv_call_state *dce_call, 
TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrJoinDomain *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
 
 
 /*
-  WKSSVC_NETRUNJOINDOMAIN
+  wkssvc_NetrUnjoinDomain
 */
-static WERROR dcesrv_WKSSVC_NETRUNJOINDOMAIN(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRUNJOINDOMAIN *r)
+static WERROR dcesrv_wkssvc_NetrUnjoinDomain(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrUnjoinDomain *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }



svn commit: samba r26165 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/wkssvc torture/rpc

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:18:23 + (Tue, 27 Nov 2007)
New Revision: 26165

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

Log:
Add IDL and torture test for wkssvc_NetrGetJoinableOus() and
wkssvc_NetrGetJoinableOus2() (both unavailable remotely).

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
   branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:11:49 UTC 
(rev 26164)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:18:23 UTC 
(rev 26165)
@@ -516,7 +516,14 @@
 
/*/
/* Function0x15  */
-   WERROR WKSSVC_NETRGETJOINABLEOUS ();
+   WERROR wkssvc_NetrGetJoinableOus(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,ref] [string,charset(UTF16)] uint16 *domain_name,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] [string,charset(UTF16)] uint16 *unknown,
+   [in,out,ref] uint32 *num_ous,
+   [out,ref] [size_is(*num_ous)] [string,charset(UTF16)] uint16 
***ous
+   );
 
typedef struct {
uint8 data[524];
@@ -591,7 +598,14 @@
 
/*/
/* Function0x1a  */
-   WERROR WKSSVC_NETRGETJOINABLEOUS2 ();
+   WERROR wkssvc_NetrGetJoinableOus2(
+   [in] [string,charset(UTF16)] uint16 *server_name,
+   [in,ref] [string,charset(UTF16)] uint16 *domain_name,
+   [in] [string,charset(UTF16)] uint16 *Account,
+   [in] wkssvc_PasswordBuffer *EncryptedPassword,
+   [in,out,ref] uint32 *num_ous,
+   [out,ref] [size_is(*num_ous)] [string,charset(UTF16)] uint16 
***ous
+   );
 
/*/
/* Function0x1b  */

Modified: branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c
===
--- branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:11:49 UTC (rev 26164)
+++ branches/SAMBA_4_0/source/rpc_server/wkssvc/dcesrv_wkssvc.c 2007-11-27 
12:18:23 UTC (rev 26165)
@@ -313,10 +313,10 @@
 
 
 /*
-  WKSSVC_NETRGETJOINABLEOUS
+  wkssvc_NetrGetJoinableOus
 */
-static WERROR dcesrv_WKSSVC_NETRGETJOINABLEOUS(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRGETJOINABLEOUS *r)
+static WERROR dcesrv_wkssvc_NetrGetJoinableOus(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrGetJoinableOus *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }
@@ -363,10 +363,10 @@
 
 
 /*
-  WKSSVC_NETRGETJOINABLEOUS2
+  wkssvc_NetrGetJoinableOus2
 */
-static WERROR dcesrv_WKSSVC_NETRGETJOINABLEOUS2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
-  struct WKSSVC_NETRGETJOINABLEOUS2 *r)
+static WERROR dcesrv_wkssvc_NetrGetJoinableOus2(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
+  struct wkssvc_NetrGetJoinableOus2 *r)
 {
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:11:49 UTC 
(rev 26164)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:18:23 UTC 
(rev 26165)
@@ -1000,6 +1000,57 @@
return true;
 }
 
+static bool test_NetrGetJoinableOus(struct torture_context *tctx,
+   struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrGetJoinableOus r;
+   uint32_t num_ous = 0;
+   const char **ous = NULL;
+
+   r.in.server_name = dcerpc_server_name(p);
+   r.in.domain_name = lp_workgroup(global_loadparm);
+   r.in.Account = NULL;
+   r.in.unknown = NULL;
+   r.in.num_ous = r.out.num_ous = num_ous;
+   r.out.ous = ous;
+
+   torture_comment(tctx, testing NetrGetJoinableOus\n);
+
+   status = dcerpc_wkssvc_NetrGetJoinableOus(p, tctx, r);
+   torture_assert_ntstatus_ok(tctx, status, NetrGetJoinableOus failed);
+   torture_assert_werr_equal(tctx, r.out.result,
+ WERR_NOT_SUPPORTED,
+ NetrGetJoinableOus failed);
+
+   return true;
+}
+
+static bool test_NetrGetJoinableOus2(struct torture_context *tctx,
+struct dcerpc_pipe *p)
+{
+   NTSTATUS status;
+   struct wkssvc_NetrGetJoinableOus2 r;
+   uint32_t num_ous = 0;
+   const char **ous = NULL;
+
+   

svn commit: samba r26167 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:26:20 + (Tue, 27 Nov 2007)
New Revision: 26167

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

Log:
Just for completeness, add some more documented wkssvc_NetWkstaInfo info level
uint32s.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:23:34 UTC 
(rev 26166)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:26:20 UTC 
(rev 26167)
@@ -46,6 +46,8 @@
uint32 logged_on_users;
} wkssvc_NetWkstaInfo102;
 
+   /* FIXME: 302, 402 */
+
typedef struct {
uint32 char_wait;
uint32 collection_time;
@@ -112,10 +114,108 @@
uint32 errorlog_sz;
} wkssvc_NetWkstaInfo1027;
 
+   /* downlevel */
typedef struct {
+   uint32 print_buf_time;
+   } wkssvc_NetWkstaInfo1028;
+
+   /* downlevel */
+   typedef struct {
+   uint32 wrk_heuristics;
+   } wkssvc_NetWkstaInfo1032;
+
+   typedef struct {
uint32 max_threads;
} wkssvc_NetWkstaInfo1033;
 
+   typedef struct {
+   uint32 lock_quota;
+   } wkssvc_NetWkstaInfo1041;
+
+   typedef struct {
+   uint32 lock_increment;
+   } wkssvc_NetWkstaInfo1042;
+
+   typedef struct {
+   uint32 lock_maximum;
+   } wkssvc_NetWkstaInfo1043;
+
+   typedef struct {
+   uint32 pipe_increment;
+   } wkssvc_NetWkstaInfo1044;
+
+   typedef struct {
+   uint32 pipe_maximum;
+   } wkssvc_NetWkstaInfo1045;
+
+   typedef struct {
+   uint32 dormant_file_limit;
+   } wkssvc_NetWkstaInfo1046;
+
+   typedef struct {
+   uint32 cache_file_timeout;
+   } wkssvc_NetWkstaInfo1047;
+
+   typedef struct {
+   uint32 use_opportunistic_locking;
+   } wkssvc_NetWkstaInfo1048;
+
+   typedef struct {
+   uint32 use_unlock_behind;
+   } wkssvc_NetWkstaInfo1049;
+
+   typedef struct {
+   uint32 use_close_behind;
+   } wkssvc_NetWkstaInfo1050;
+
+   typedef struct {
+   uint32 buf_named_pipes;
+   } wkssvc_NetWkstaInfo1051;
+
+   typedef struct {
+   uint32 use_lock_read_unlock;
+   } wkssvc_NetWkstaInfo1052;
+
+   typedef struct {
+   uint32 utilize_nt_caching;
+   } wkssvc_NetWkstaInfo1053;
+
+   typedef struct {
+   uint32 use_raw_read;
+   } wkssvc_NetWkstaInfo1054;
+
+   typedef struct {
+   uint32 use_raw_write;
+   } wkssvc_NetWkstaInfo1055;
+
+   typedef struct {
+   uint32 use_write_raw_data;
+   } wkssvc_NetWkstaInfo1056;
+
+   typedef struct {
+   uint32 use_encryption;
+   } wkssvc_NetWkstaInfo1057;
+
+   typedef struct {
+   uint32 buf_files_deny_write;
+   } wkssvc_NetWkstaInfo1058;
+
+   typedef struct {
+   uint32 buf_read_only_files;
+   } wkssvc_NetWkstaInfo1059;
+
+   typedef struct {
+   uint32 force_core_create_mode;
+   } wkssvc_NetWkstaInfo1060;
+
+   typedef struct {
+   uint32 use_512_byte_max_transfer;
+   } wkssvc_NetWkstaInfo1061;
+
+   typedef struct {
+   uint32 read_ahead_throughput;
+   } wkssvc_NetWkstaInfo1062;
+
typedef union {
[case(100)] wkssvc_NetWkstaInfo100 *info100;
[case(101)] wkssvc_NetWkstaInfo101 *info101;
@@ -128,7 +228,31 @@
[case(1018)] wkssvc_NetWkstaInfo1018 *info1018;
[case(1023)] wkssvc_NetWkstaInfo1023 *info1023;
[case(1027)] wkssvc_NetWkstaInfo1027 *info1027;
+   [case(1028)] wkssvc_NetWkstaInfo1028 *info1028;
+   [case(1032)] wkssvc_NetWkstaInfo1032 *info1032;
[case(1033)] wkssvc_NetWkstaInfo1033 *info1033;
+   [case(1041)] wkssvc_NetWkstaInfo1041 *info1041;
+   [case(1042)] wkssvc_NetWkstaInfo1042 *info1042;
+   [case(1043)] wkssvc_NetWkstaInfo1043 *info1043;
+   [case(1044)] wkssvc_NetWkstaInfo1044 *info1044;
+   [case(1045)] wkssvc_NetWkstaInfo1045 *info1045;
+   [case(1046)] wkssvc_NetWkstaInfo1046 *info1046;
+   [case(1047)] wkssvc_NetWkstaInfo1047 *info1047;
+   [case(1048)] wkssvc_NetWkstaInfo1048 *info1048;
+   [case(1049)] wkssvc_NetWkstaInfo1049 *info1049;
+   [case(1050)] wkssvc_NetWkstaInfo1050 *info1050;
+   [case(1051)] wkssvc_NetWkstaInfo1051 *info1051;
+   [case(1052)] wkssvc_NetWkstaInfo1052 *info1052;
+   [case(1053)] wkssvc_NetWkstaInfo1053 *info1053;
+

svn commit: samba r26168 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:27:27 + (Tue, 27 Nov 2007)
New Revision: 26168

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

Log:
Add two more documented WKSSVC_JOIN_FLAGS.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:26:20 UTC 
(rev 26167)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:27:27 UTC 
(rev 26168)
@@ -654,6 +654,8 @@
} wkssvc_PasswordBuffer;
 
typedef [bitmap32bit] bitmap {
+   WKSSVC_JOIN_FLAGS_JOIN_WITH_NEW_NAME= 0x0400,
+   WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT   = 0x0200,
/* TRUE: defer setting the SPN and dNSHostName until a rename 
operation */
WKSSVC_JOIN_FLAGS_DEFER_SPN = 0x0100,
 



svn commit: samba r26169 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:28:38 + (Tue, 27 Nov 2007)
New Revision: 26169

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

Log:
Use the NDR_PAHEX flag to print the encrypted wkssvc password buffer.

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:27:27 UTC 
(rev 26168)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 12:28:38 UTC 
(rev 26169)
@@ -1,3 +1,5 @@
+#include idl_types.h
+
 /*
   wkssvc interface definitions
 */
@@ -649,7 +651,7 @@
[out,ref] [size_is(*num_ous)] [string,charset(UTF16)] uint16 
***ous
);
 
-   typedef struct {
+   typedef [flag(NDR_PAHEX)] struct {
uint8 data[524];
} wkssvc_PasswordBuffer;
 
@@ -667,7 +669,7 @@
 
/* TRUE: allow the join to complete even if the account already 
exists */
WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED = 0x0020,
-   
+
/* TRUE: this join is part of a w9x upgrade */
WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE = 0x0010,
 
@@ -679,7 +681,7 @@
 
/* TRUE: join domainFALSE: join workgroup */
WKSSVC_JOIN_FLAGS_JOIN_TYPE = 0x0001
-   
+
} wkssvc_joinflags;
 
/*/



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

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 12:56:10 + (Tue, 27 Nov 2007)
New Revision: 26170

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

Log:
Put test_NetrUseGetInfo() in the correct order of tests.

Guenther

Modified:
   branches/SAMBA_4_0/source/torture/rpc/wkssvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:28:38 UTC 
(rev 26169)
+++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c  2007-11-27 12:56:10 UTC 
(rev 26170)
@@ -45,12 +45,15 @@
 
for (i=0;iARRAY_SIZE(levels);i++) {
r.in.level = levels[i];
-   torture_comment(tctx, testing NetWkstaGetInfo level %u\n, 
r.in.level);
+   torture_comment(tctx, testing NetWkstaGetInfo level %u\n,
+   r.in.level);
status = dcerpc_wkssvc_NetWkstaGetInfo(p, tctx, r);
torture_assert_ntstatus_ok(tctx, status,
-   talloc_asprintf(tctx, NetWkstaGetInfo level %u 
failed, r.in.level));
+   talloc_asprintf(tctx, NetWkstaGetInfo level %u failed,
+   r.in.level));
torture_assert_werr_ok(tctx, r.out.result,
-   talloc_asprintf(tctx, NetWkstaGetInfo level %u 
failed, r.in.level));
+   talloc_asprintf(tctx, NetWkstaGetInfo level %u failed,
+   r.in.level));
}
 
return true;
@@ -1068,8 +1071,6 @@
   test_NetWkstaTransportEnum);
torture_rpc_tcase_add_test(tcase, NetrWkstaTransportDel,
   test_NetrWkstaTransportDel);
-   torture_rpc_tcase_add_test(tcase, NetrUseGetInfo,
-  test_NetrUseGetInfo);
torture_rpc_tcase_add_test(tcase, NetrWkstaTransportAdd,
   test_NetrWkstaTransportAdd);
 
@@ -1080,6 +1081,8 @@
 
torture_rpc_tcase_add_test(tcase, NetrUseDel,
   test_NetrUseDel);
+   torture_rpc_tcase_add_test(tcase, NetrUseGetInfo,
+  test_NetrUseGetInfo);
torture_rpc_tcase_add_test(tcase, NetrUseEnum,
   test_NetrUseEnum);
torture_rpc_tcase_add_test(tcase, NetrUseAdd,



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-375-g1fab16f

2007-11-27 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  1fab16ffb888cd4ec18e52d9da33976a67a5d104 (commit)
  from  331c0d6216e1a1607a49ed7eb4078e10138ec16a (commit)

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


- Log -
commit 1fab16ffb888cd4ec18e52d9da33976a67a5d104
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Sun Nov 25 10:10:52 2007 +0100

Remove some statics

---

Summary of changes:
 source/lib/display_sec.c   |4 +-
 source/lib/util_uuid.c |   44 ++-
 source/libads/disp_sec.c   |4 +-
 source/libads/ldap.c   |   11 +---
 source/libsmb/dsgetdcname.c|2 +-
 source/printing/nt_printing.c  |6 +++-
 source/rpc_server/srv_spoolss_nt.c |3 +-
 source/rpcclient/cmd_lsarpc.c  |3 +-
 source/utils/net_ads.c |7 -
 9 files changed, 38 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/display_sec.c b/source/lib/display_sec.c
index 8e92c84..caa13a6 100644
--- a/source/lib/display_sec.c
+++ b/source/lib/display_sec.c
@@ -97,12 +97,12 @@ static void disp_sec_ace_object(struct security_ace_object 
*object)
 {
if (object-flags  SEC_ACE_OBJECT_PRESENT) {
printf(Object type: SEC_ACE_OBJECT_PRESENT\n);
-   printf(Object GUID: %s\n, smb_uuid_string_static(
+   printf(Object GUID: %s\n, smb_uuid_string(talloc_tos(),
object-type.type));
}
if (object-flags  SEC_ACE_OBJECT_INHERITED_PRESENT) {
printf(Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n);
-   printf(Object GUID: %s\n, smb_uuid_string_static(
+   printf(Object GUID: %s\n, smb_uuid_string(talloc_tos(), 
object-inherited_type.inherited_type));
}
 }
diff --git a/source/lib/util_uuid.c b/source/lib/util_uuid.c
index 606bfd2..36c04e9 100644
--- a/source/lib/util_uuid.c
+++ b/source/lib/util_uuid.c
@@ -44,14 +44,6 @@ void smb_uuid_unpack(const UUID_FLAT in, struct GUID *uu)
memcpy(uu-node, in.info+10, 6);
 }
 
-struct GUID smb_uuid_unpack_static(const UUID_FLAT in)
-{
-   static struct GUID uu;
-
-   smb_uuid_unpack(in, uu);
-   return uu;
-}
-
 void smb_uuid_generate_random(struct GUID *uu)
 {
UUID_FLAT tmp;
@@ -63,30 +55,20 @@ void smb_uuid_generate_random(struct GUID *uu)
uu-time_hi_and_version = (uu-time_hi_and_version  0x0FFF) | 0x4000;
 }
 
-char *smb_uuid_to_string(const struct GUID uu)
-{
-   char *out;
-
-   asprintf(out, %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,
-uu.time_low, uu.time_mid, uu.time_hi_and_version,
-uu.clock_seq[0], uu.clock_seq[1],
-uu.node[0], uu.node[1], uu.node[2], 
-uu.node[3], uu.node[4], uu.node[5]);
-
-   return out;
-}
-
-const char *smb_uuid_string_static(const struct GUID uu)
+const char *smb_uuid_string(TALLOC_CTX *mem_ctx, const struct GUID uu)
 {
-   static char out[37];
-
-   slprintf(out, sizeof(out), 
-%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,
-uu.time_low, uu.time_mid, uu.time_hi_and_version,
-uu.clock_seq[0], uu.clock_seq[1],
-uu.node[0], uu.node[1], uu.node[2], 
-uu.node[3], uu.node[4], uu.node[5]);
-   return out;
+   char *result;
+
+   result = talloc_asprintf(
+   mem_ctx,
+   %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,
+   uu.time_low, uu.time_mid, uu.time_hi_and_version,
+   uu.clock_seq[0], uu.clock_seq[1],
+   uu.node[0], uu.node[1], uu.node[2], 
+   uu.node[3], uu.node[4], uu.node[5]);
+
+   SMB_ASSERT(result != NULL);
+   return result;
 }
 
 bool smb_string_to_uuid(const char *in, struct GUID* uu)
diff --git a/source/libads/disp_sec.c b/source/libads/disp_sec.c
index e858096..e211ef6 100644
--- a/source/libads/disp_sec.c
+++ b/source/libads/disp_sec.c
@@ -114,14 +114,14 @@ static void ads_disp_sec_ace_object(ADS_STRUCT *ads,
 {
if (object-flags  SEC_ACE_OBJECT_PRESENT) {
printf(Object type: SEC_ACE_OBJECT_PRESENT\n);
-   printf(Object GUID: %s (%s)\n, smb_uuid_string_static(
+   printf(Object GUID: %s (%s)\n, smb_uuid_string(mem_ctx, 
object-type.type), 
ads_interprete_guid_from_object(ads, mem_ctx, 
object-type.type));
}
if (object-flags  SEC_ACE_OBJECT_INHERITED_PRESENT) {
printf(Object type: SEC_ACE_OBJECT_INHERITED_PRESENT\n);
-   printf(Object GUID: %s (%s)\n, smb_uuid_string_static(
+   printf(Object GUID: %s (%s)\n, smb_uuid_string(mem_ctx,
   

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

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 13:23:01 + (Tue, 27 Nov 2007)
New Revision: 26172

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

Log:
Skip testing wkssvc against us, we only have dummy support anyway.

Guenther

Modified:
   branches/SAMBA_4_0/source/samba4-knownfail


Changeset:
Modified: branches/SAMBA_4_0/source/samba4-knownfail
===
--- branches/SAMBA_4_0/source/samba4-knownfail  2007-11-27 12:59:35 UTC (rev 
26171)
+++ branches/SAMBA_4_0/source/samba4-knownfail  2007-11-27 13:23:01 UTC (rev 
26172)
@@ -6,6 +6,7 @@
 RAW-OPLOCK.*/OPLOCK
 RPC-WINREG
 LOCAL-REGISTRY.*/security # Not implemented yet
+RPC-WKSSVC
 RPC-HANDLES.*/lsarpc-shared
 RPC-HANDLES.*/mixed-shared
 RPC-EPMAPPER.*/Insert



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-376-g03673f2

2007-11-27 Thread Michael Adam
The branch, v3-2-test has been updated
   via  03673f2cd614526e7720275a5ba0869c68429f4d (commit)
  from  1fab16ffb888cd4ec18e52d9da33976a67a5d104 (commit)

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


- Log -
commit 03673f2cd614526e7720275a5ba0869c68429f4d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Tue Nov 27 16:36:06 2007 +0100

Use the proper boolean constants - the type has been
changed from BOOL to bool.

Michael

---

Summary of changes:
 source/passdb/lookup_sid.c |  152 ++--
 1 files changed, 76 insertions(+), 76 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/passdb/lookup_sid.c b/source/passdb/lookup_sid.c
index 43c86ff..bb54959 100644
--- a/source/passdb/lookup_sid.c
+++ b/source/passdb/lookup_sid.c
@@ -45,7 +45,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
 
if (tmp_ctx == NULL) {
DEBUG(0, (talloc_new failed\n));
-   return False;
+   return false;
}
 
p = strchr_m(full_name, '\\');
@@ -65,7 +65,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
if ((domain == NULL) || (name == NULL)) {
DEBUG(0, (talloc failed\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
if (strequal(domain, get_global_sam_name())) {
@@ -77,7 +77,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
goto ok;
}
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
if (strequal(domain, builtin_domain_name())) {
@@ -90,7 +90,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
goto ok;
}
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
/* Try the explicit winbind lookup first, don't let it guess the
@@ -107,7 +107,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
goto ok;
}
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
if (!(flags  LOOKUP_NAME_EXPLICIT)  strequal(domain, 
unix_groups_domain_name())) {
@@ -116,12 +116,12 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
goto ok;
}
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
if ((domain[0] == '\0')  (!(flags  LOOKUP_NAME_ISOLATED))) {
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
/* Now the guesswork begins, we haven't been given an explicit
@@ -152,7 +152,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
if (!secrets_fetch_domain_sid(name, sid)) {
DEBUG(3, (Could not fetch my SID\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
/* Swap domain and name */
tmp = name; name = domain; domain = tmp;
@@ -166,7 +166,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
if (!secrets_fetch_domain_sid(name, sid)) {
DEBUG(3, (Could not fetch the domain SID\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
/* Swap domain and name */
tmp = name; name = domain; domain = tmp;
@@ -210,7 +210,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
 
if (!(flags  LOOKUP_NAME_REMOTE)) {
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
/* If we are not a DC, we have to ask in our primary domain. Let
@@ -251,7 +251,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
DEBUG(2, (winbind could not find the domain's name 
  it just looked up for us\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
goto ok;
}
@@ -278,13 +278,13 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
 */
 
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
 
  ok:
if ((domain == NULL) || (name == NULL)) {
DEBUG(0, (talloc failed\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   return false;
}
 
/*
@@ -295,7 +295,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
!(*ret_name = talloc_strdup(mem_ctx, name))) {
DEBUG(0, (talloc failed\n));
TALLOC_FREE(tmp_ctx);
-   return False;
+   

svn commit: samba-docs r1212 - in trunk/xslt: .

2007-11-27 Thread ab
Author: ab
Date: 2007-11-27 15:50:28 + (Tue, 27 Nov 2007)
New Revision: 1212

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

Log:
- Activate embedded db2latex
- Use UTF-8 in LaTeX


Modified:
   trunk/xslt/latex.overrides.xml
   trunk/xslt/latex.xsl


Changeset:
Modified: trunk/xslt/latex.overrides.xml
===
--- trunk/xslt/latex.overrides.xml  2007-11-27 15:47:55 UTC (rev 1211)
+++ trunk/xslt/latex.overrides.xml  2007-11-27 15:50:28 UTC (rev 1212)
@@ -1,5 +1,5 @@
 ?xml version='1.0'?
-!DOCTYPE latexbindings SYSTEM 
http://db2latex.sourceforge.net/xsl/latex.mapping.dtd;
+!DOCTYPE latexbindings SYSTEM db2latex-xsl/xsl/latex.mapping.dtd
 latexbindings
latexmapping role=begin
/latexmapping

Modified: trunk/xslt/latex.xsl
===
--- trunk/xslt/latex.xsl2007-11-27 15:47:55 UTC (rev 1211)
+++ trunk/xslt/latex.xsl2007-11-27 15:50:28 UTC (rev 1212)
@@ -1,7 +1,7 @@
 ?xml version=1.0 encoding=ISO-8859-1?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version='1.0'
xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
-xsl:import href=http://db2latex.sourceforge.net/xsl/docbook.xsl/
+xsl:import href=db2latex-xsl/xsl/docbook.xsl/
 xsl:import href=strip-references.xsl/
 
 xsl:param name=latex.mapping.xml select=document('latex.overrides.xml')/
@@ -58,7 +58,7 @@
   /xsl:if
 /xsl:template
 
-xsl:output method=text encoding=ISO-8859-1 indent=yes/
+xsl:output method=text encoding=UTF-8 indent=yes/
 xsl:variable name=l10n.gentext.default.language select='en'/
 xsl:variable name=latex.document.fontdefault/xsl:variable
 xsl:variable name=latex.example.caption.style/xsl:variable
@@ -68,6 +68,8 @@
 xsl:variable name=latex.fancyhdr.lh/xsl:variable
 xsl:variable name=latex.use.fancyhdr/xsl:variable
 xsl:variable name=latex.use.parskip1/xsl:variable
+xsl:variable name=latex.use.ucs1/xsl:variable
+xsl:variable name=latex.inputencutf8/xsl:variable
 xsl:variable name=latex.book.varsets select=''/
 xsl:variable name=latex.hyphenation.tttricks1/xsl:variable
 xsl:variable name=latex.titlepage.file/xsl:variable



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-377-g172f7ce

2007-11-27 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  172f7ce96dc12cfc7d2209d8ed56aeebefd6207b (commit)
  from  03673f2cd614526e7720275a5ba0869c68429f4d (commit)

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


- Log -
commit 172f7ce96dc12cfc7d2209d8ed56aeebefd6207b
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Nov 27 18:01:56 2007 +0100

Unless talloc has some new magic there is a ctx missing here.

Guenther

---

Summary of changes:
 source/registry/reg_eventlog.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/registry/reg_eventlog.c b/source/registry/reg_eventlog.c
index be47d13..8994acf 100644
--- a/source/registry/reg_eventlog.c
+++ b/source/registry/reg_eventlog.c
@@ -141,7 +141,7 @@ bool eventlog_init_keys(void)
 
/* now do the values under KEY_EVENTLOG/Application/Application 
*/
TALLOC_FREE(evtlogpath);
-   evtlogpath = talloc_asprintf(%s\\%s\\%s,
+   evtlogpath = talloc_asprintf(ctx, %s\\%s\\%s,
  KEY_EVENTLOG, *elogs, *elogs);
if (!evtlogpath) {
return false;
@@ -234,7 +234,7 @@ bool eventlog_add_source( const char *eventlog, const char 
*sourcename,
return false;
}
 
-   evtlogpath = talloc_asprintf(%s\\%s, KEY_EVENTLOG, eventlog);
+   evtlogpath = talloc_asprintf(ctx, %s\\%s, KEY_EVENTLOG, eventlog);
if (!evtlogpath) {
TALLOC_FREE(values);
return false;
@@ -320,7 +320,7 @@ bool eventlog_add_source( const char *eventlog, const char 
*sourcename,
return False;
}
TALLOC_FREE(evtlogpath);
-   evtlogpath = talloc_asprintf(%s\\%s, KEY_EVENTLOG, eventlog );
+   evtlogpath = talloc_asprintf(ctx, %s\\%s, KEY_EVENTLOG, eventlog );
if (!evtlogpath) {
TALLOC_FREE(subkeys);
return false;
@@ -347,7 +347,7 @@ bool eventlog_add_source( const char *eventlog, const char 
*sourcename,
return False;
}
TALLOC_FREE(evtlogpath);
-   evtlogpath = talloc_asprintf(%s\\%s\\%s,
+   evtlogpath = talloc_asprintf(ctx, %s\\%s\\%s,
  KEY_EVENTLOG, eventlog, sourcename);
if (!evtlogpath) {
TALLOC_FREE(subkeys);


-- 
Samba Shared Repository


svn commit: samba r26173 - in branches/4.0-python: . source/build/smb_build source/librpc/rpc source/scripting/python

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-27 17:19:15 + (Tue, 27 Nov 2007)
New Revision: 26173

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

Log:
Merge upstream.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/main.pl
   branches/4.0-python/source/build/smb_build/makefile.pm
   branches/4.0-python/source/librpc/rpc/dcerpc.i
   branches/4.0-python/source/scripting/python/config.mk
   branches/4.0-python/source/scripting/python/parammodule.c
   branches/4.0-python/source/scripting/python/sidmodule.c


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:ancestry:v3-trunk0
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/build/smb_build/input.pm
===
--- branches/4.0-python/source/build/smb_build/input.pm 2007-11-27 13:23:01 UTC 
(rev 26172)
+++ branches/4.0-python/source/build/smb_build/input.pm 2007-11-27 17:19:15 UTC 
(rev 26173)
@@ -160,7 +160,9 @@
$python-{LIBRARY_REALNAME} = $basename.\$(SHLIBEXT);
}
 
-   check_library($INPUT, $python, [SHARED_LIBRARY]);
+   $python-{SUBSYSTEM} = LIBPYTHON;
+
+   check_module($INPUT, $python, [SHARED_LIBRARY]);
 }
 
 sub check_binary($$)

Modified: branches/4.0-python/source/build/smb_build/main.pl
===
--- branches/4.0-python/source/build/smb_build/main.pl  2007-11-27 13:23:01 UTC 
(rev 26172)
+++ branches/4.0-python/source/build/smb_build/main.pl  2007-11-27 17:19:15 UTC 
(rev 26173)
@@ -62,14 +62,14 @@
$mkenv-StaticLibrary($key) if grep(/STATIC_LIBRARY/, 
@{$key-{OUTPUT_TYPE}});
$mkenv-PkgConfig($key, $OUTPUT) if $key-{TYPE} eq LIBRARY 
and defined($key-{VERSION});
-   $mkenv-SharedLibrary($key) if ($key-{TYPE} eq LIBRARY or 
-   $key-{TYPE} eq PYTHON) and
+   $mkenv-SharedLibrary($key) if ($key-{TYPE} eq LIBRARY) and
grep(/SHARED_LIBRARY/, 
@{$key-{OUTPUT_TYPE}});
if ($key-{TYPE} eq LIBRARY and 
${$key-{OUTPUT_TYPE}}[0] eq SHARED_LIBRARY) {
$shared_libs_used = 1;
}
-   $mkenv-SharedModule($key) if $key-{TYPE} eq MODULE and
+   $mkenv-SharedModule($key) if ($key-{TYPE} eq MODULE or 
+  $key-{TYPE} 
eq PYTHON) and
grep(/SHARED_LIBRARY/, 
@{$key-{OUTPUT_TYPE}});
$mkenv-Binary($key) if grep(/BINARY/, @{$key-{OUTPUT_TYPE}});
$mkenv-PythonFiles($key) if defined($key-{PYTHON_FILES});

Modified: branches/4.0-python/source/build/smb_build/makefile.pm
===
--- branches/4.0-python/source/build/smb_build/makefile.pm  2007-11-27 
13:23:01 UTC (rev 26172)
+++ branches/4.0-python/source/build/smb_build/makefile.pm  2007-11-27 
17:19:15 UTC (rev 26173)
@@ -309,6 +309,11 @@
my $sane_subsystem = lc($ctx-{SUBSYSTEM});
$sane_subsystem =~ s/^lib//;

+   if ($ctx-{TYPE} eq PYTHON) {
+   push (@{$self-{python_dsos}}, 
+   $ctx-{SHAREDDIR}/$ctx-{LIBRARY_REALNAME});
+   }
+
push (@{$self-{shared_modules}}, $ctx-{TARGET_SHARED_LIBRARY});
push (@{$self-{plugins}}, 
$ctx-{SHAREDDIR}/$ctx-{LIBRARY_REALNAME});
 
@@ -395,11 +400,6 @@
$self-_prepare_list($ctx, LINK_FLAGS);
 #  $self-_prepare_list_ex($ctx, LINK_FLAGS, -Wl,--whole-archive, 
-Wl,--no-whole-archive);
 
-   if ($ctx-{TYPE} eq PYTHON) {
-   push (@{$self-{python_dsos}}, 
-   $ctx-{SHAREDDIR}/$ctx-{LIBRARY_REALNAME});
-   }
-
push(@{$self-{all_objs}}, 
\$($ctx-{TYPE}_$ctx-{NAME}_FULL_OBJ_LIST));
 
my $soarg = ;

Modified: branches/4.0-python/source/librpc/rpc/dcerpc.i
===
--- branches/4.0-python/source/librpc/rpc/dcerpc.i  2007-11-27 13:23:01 UTC 
(rev 26172)
+++ branches/4.0-python/source/librpc/rpc/dcerpc.i  2007-11-27 17:19:15 UTC 
(rev 26173)
@@ -41,7 +41,6 @@
 
 %}
 
-%include samba.i
 %include ../../lib/talloc/talloc.i
 %include ../../auth/credentials/credentials.i
 

Modified: branches/4.0-python/source/scripting/python/config.mk
===
--- branches/4.0-python/source/scripting/python/config.mk   2007-11-27 
13:23:01 UTC (rev 26172)
+++ branches/4.0-python/source/scripting/python/config.mk   2007-11-27 
17:19:15 UTC (rev 26173)
@@ -26,7 +26,7 @@
@echo Removing SWIG output files
@-rm -f 

svn commit: samba r26176 - in branches/SAMBA_4_0/source/librpc/idl: .

2007-11-27 Thread gd
Author: gd
Date: 2007-11-27 18:13:24 + (Tue, 27 Nov 2007)
New Revision: 26176

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

Log:
Fix in,out mismatch in wkssvc_NetrWkstaUserSetInfo().

Guenther

Modified:
   branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 17:19:29 UTC 
(rev 26175)
+++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-27 18:13:24 UTC 
(rev 26176)
@@ -339,7 +339,7 @@
WERROR wkssvc_NetrWkstaUserSetInfo(
[in] [string,charset(UTF16)] uint16 *unknown,
[in] uint32 level,
-   [out,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info,
+   [in,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info,
[in,out] uint32 *parm_err
);
 



[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-378-g55b4f9d

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  55b4f9d003b036af69085f7b64e0df08c5ba440d (commit)
  from  172f7ce96dc12cfc7d2209d8ed56aeebefd6207b (commit)

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


- Log -
commit 55b4f9d003b036af69085f7b64e0df08c5ba440d
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 11:22:58 2007 -0800

Remove pstring from everything in rpc_server except
srv_spoolss_nt.c and srv_srvsvc_nt.c.
They're next :-).
Jeremy.

---

Summary of changes:
 source/include/rpc_eventlog.h|   10 +-
 source/rpc_server/srv_eventlog_lib.c |  151 ++--
 source/rpc_server/srv_eventlog_nt.c  |  162 ++
 source/rpc_server/srv_netlog_nt.c|   27 ++--
 source/rpc_server/srv_samr_util.c|3 +-
 source/rpc_server/srv_srvsvc_nt.c|2 +-
 source/rpc_server/srv_svcctl_nt.c|   25 ++--
 source/rpc_server/srv_winreg_nt.c|  256 +++--
 8 files changed, 363 insertions(+), 273 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_eventlog.h b/source/include/rpc_eventlog.h
index 849c62b..9ec76a0 100644
--- a/source/include/rpc_eventlog.h
+++ b/source/include/rpc_eventlog.h
@@ -134,15 +134,15 @@ typedef struct {
 
 typedef struct {
uint32 source_name_len;
-   wpstring source_name;
+   smb_ucs2_t *source_name;
uint32 computer_name_len;
-   wpstring computer_name;
+   smb_ucs2_t *computer_name;
uint32 sid_padding;
-   wpstring sid;
+   smb_ucs2_t *sid;
uint32 strings_len;
-   wpstring strings;
+   smb_ucs2_t *strings;
uint32 user_data_len;
-   pstring user_data;
+   char *user_data;
uint32 data_padding;
 } Eventlog_data_record;
 
diff --git a/source/rpc_server/srv_eventlog_lib.c 
b/source/rpc_server/srv_eventlog_lib.c
index 00afe5b..b964828 100644
--- a/source/rpc_server/srv_eventlog_lib.c
+++ b/source/rpc_server/srv_eventlog_lib.c
@@ -62,17 +62,16 @@ TDB_CONTEXT *elog_init_tdb( char *tdbfilename )
  and size. Caller must free memory.
 /
 
-char *elog_tdbname( const char *name )
+char *elog_tdbname(TALLOC_CTX *ctx, const char *name )
 {
-   fstring path;
-   char *tdb_fullpath;
-   char *eventlogdir = state_path( eventlog );
-   
-   pstr_sprintf( path, %s/%s.tdb, eventlogdir, name );
-   strlower_m( path );
-   tdb_fullpath = SMB_STRDUP( path );
-   
-   return tdb_fullpath;
+   char *path = talloc_asprintf(ctx, %s/%s.tdb,
+   state_path(eventlog),
+   name);
+   if (!path) {
+   return NULL;
+   }
+   strlower_m(path);
+   return path;
 }
 
 
@@ -320,13 +319,13 @@ ELOG_TDB *elog_open_tdb( char *logname, bool force_clear )
TDB_CONTEXT *tdb = NULL;
uint32 vers_id;
ELOG_TDB *ptr;
-   char *tdbfilename;
-   pstring tdbpath;
+   char *tdbpath = NULL;
ELOG_TDB *tdb_node = NULL;
char *eventlogdir;
+   TALLOC_CTX *ctx = talloc_tos();
 
/* first see if we have an open context */
-   
+
for ( ptr=open_elog_list; ptr; ptr=ptr-next ) {
if ( strequal( ptr-name, logname ) ) {
ptr-ref_count++;
@@ -345,27 +344,28 @@ ELOG_TDB *elog_open_tdb( char *logname, bool force_clear )
return ptr;
}
}
-   
+
/* make sure that the eventlog dir exists */
-   
+
eventlogdir = state_path( eventlog );
if ( !directory_exist( eventlogdir, NULL ) )
-   mkdir( eventlogdir, 0755 ); 
-   
+   mkdir( eventlogdir, 0755 );
+
/* get the path on disk */
-   
-   tdbfilename = elog_tdbname( logname );
-   pstrcpy( tdbpath, tdbfilename );
-   SAFE_FREE( tdbfilename );
 
-   DEBUG(7,(elog_open_tdb: Opening %s...(force_clear == %s)\n, 
+   tdbpath = elog_tdbname(ctx, logname);
+   if (!tdbpath) {
+   return NULL;
+   }
+
+   DEBUG(7,(elog_open_tdb: Opening %s...(force_clear == %s)\n,
tdbpath, force_clear?True:False ));
-   
+
/* the tdb wasn't already open or this is a forced clear open */
 
if ( !force_clear ) {
 
-   tdb = tdb_open_log( tdbpath, 0, TDB_DEFAULT, O_RDWR , 0 );  
+   tdb = tdb_open_log( tdbpath, 0, TDB_DEFAULT, O_RDWR , 0 );
if ( tdb ) {
vers_id = tdb_fetch_int32( tdb, EVT_VERSION );
 
@@ -593,9 +593,8 @@ void fixup_eventlog_entry( Eventlog_entry * ee )
 
 bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor )
 {
+   TALLOC_CTX *ctx = talloc_tos();
char *start = NULL, *stop 

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-380-g0002a9e

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  0002a9e96b0ef78316295a6eb94ff29b64e2f988 (commit)
   via  951202913956e113841585f7372e8db8f9aeb76a (commit)
  from  55b4f9d003b036af69085f7b64e0df08c5ba440d (commit)

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


- Log -
commit 0002a9e96b0ef78316295a6eb94ff29b64e2f988
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 14:35:30 2007 -0800

Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.

commit 951202913956e113841585f7372e8db8f9aeb76a
Author: Guenther Deschner [EMAIL PROTECTED]
Date:   Tue Nov 27 21:53:41 2007 +0100

fix a obscure compiler warning

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jeremy,

I have never seen this warning before:
warning: comparison is always false due to limited range of data type.

Guenther
- --
Günther DeschnerGPG-ID: 8EE11688
Red Hat [EMAIL PROTECTED]
Samba Team  [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHTIOOSOk3aI7hFogRArxMAJwP0ktE96tHcwn9nXG6AOqonpeDgQCgm/zi
54B6HJZvx6zdUTMFFNWqUb0=
=kUJa
-END PGP SIGNATURE-

From 6a4935ee455adc1251fce2759f97d35f303bd40e Mon Sep 17 00:00:00 2001
From: =?utf-8?q?G=C3=BCnther=20Deschner?= [EMAIL PROTECTED]
Date: Tue, 27 Nov 2007 21:48:39 +0100
Subject: [PATCH] Getting rid of comparison is always false due to limited 
range of data type
 warning.

Guenther

---

Summary of changes:
 source/auth/auth_util.c  |6 +-
 source/lib/substitute.c  |   34 +--
 source/lib/util_unistr.c |   57 ++--
 source/rpc_client/cli_ds.c   |4 +-
 source/rpc_client/cli_lsarpc.c   |   10 +-
 source/rpc_client/cli_srvsvc.c   |   44 ++--
 source/rpc_server/srv_eventlog_lib.c |6 +-
 source/rpc_server/srv_srvsvc_nt.c|  510 +-
 source/utils/net_rpc.c   |   26 +-
 source/winbindd/winbindd_ads.c   |4 +-
 source/winbindd/winbindd_pam.c   |4 +-
 source/winbindd/winbindd_rpc.c   |8 +-
 12 files changed, 415 insertions(+), 298 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 7ef8942..c0a9e9b 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1452,13 +1452,13 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_PARAMETER;
}
 
-   if (!(nt_username = unistr2_tdup(mem_ctx, (info3-uni_user_name {
+   if (!(nt_username = unistr2_to_ascii_talloc(mem_ctx, 
(info3-uni_user_name {
/* If the server didn't give us one, just use the one we sent
 * them */
nt_username = sent_nt_username;
}
 
-   if (!(nt_domain = unistr2_tdup(mem_ctx, (info3-uni_logon_dom {
+   if (!(nt_domain = unistr2_to_ascii_talloc(mem_ctx, 
(info3-uni_logon_dom {
/* If the server didn't give us one, just use the one we sent
 * them */
nt_domain = domain;
@@ -1620,7 +1620,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
return nt_status;
}
 
-   result-login_server = unistr2_tdup(result, 
+   result-login_server = unistr2_to_ascii_talloc(result, 
(info3-uni_logon_srv));
 
/* ensure we are never given NULL session keys */
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index db79a9f..09604f8 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -831,8 +831,8 @@ static char *alloc_sub_advanced(const char *servicename, 
const char *user,
  */
 
 char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
- const char *servicename, const char *user, 
- const char *connectpath, gid_t gid, 
+ const char *servicename, const char *user,
+ const char *connectpath, gid_t gid,
  const char *smb_name, const char *domain_name,
  const char *str)
 {
@@ -848,13 +848,13 @@ char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
 }
 
 
-void standard_sub_advanced(const char *servicename, const char *user, 
-  const char *connectpath, gid_t gid, 
+void standard_sub_advanced(const char *servicename, const char *user,
+  const char *connectpath, gid_t gid,
   const char *smb_name, const char *domain_name,
   char *str, size_t len)
 {
char 

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

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-27 23:28:23 + (Tue, 27 Nov 2007)
New Revision: 26177

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

Log:
Allow prebuilding swig wrapper, install ldb.py.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/ldb/autogen.sh
   branches/SAMBA_4_0/source/lib/ldb/setup.py


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-27 18:13:24 UTC 
(rev 26176)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-27 23:28:23 UTC 
(rev 26177)
@@ -15,6 +15,7 @@
 srcdir = @srcdir@
 builddir = @builddir@
 SLAPD = @SLAPD@
+SWIG = swig
 [EMAIL PROTECTED]@
 TESTS=test-tdb.sh @TESTS@
 
@@ -232,11 +233,14 @@
 ctags:
ctags `find $(srcdir) -name *.[ch]`
 
+%_wrap.c %.py: %.i
+   $(SWIG) -python -keyword $
+
 # Python bindings
-build-python: lib/libldb.$(SHLIBEXT)
+build-python: lib/libldb.$(SHLIBEXT) ldb_wrap.c ldb.py
./setup.py build
 
-install-python:
+install-python: build-python
./setup.py install --prefix=$(prefix)
 
 check-python: build-python

Modified: branches/SAMBA_4_0/source/lib/ldb/autogen.sh
===
--- branches/SAMBA_4_0/source/lib/ldb/autogen.sh2007-11-27 18:13:24 UTC 
(rev 26176)
+++ branches/SAMBA_4_0/source/lib/ldb/autogen.sh2007-11-27 23:28:23 UTC 
(rev 26177)
@@ -17,6 +17,8 @@
 
 rm -rf autom4te.cache
 
+swig -python ldb.i # Ignore errors, for now
+
 echo Now run ./configure and then make.
 exit 0
 

Modified: branches/SAMBA_4_0/source/lib/ldb/setup.py
===
--- branches/SAMBA_4_0/source/lib/ldb/setup.py  2007-11-27 18:13:24 UTC (rev 
26176)
+++ branches/SAMBA_4_0/source/lib/ldb/setup.py  2007-11-27 23:28:23 UTC (rev 
26177)
@@ -9,7 +9,7 @@
   author_email=[EMAIL PROTECTED],
   license=LGPLv3,
   keywords=[ldap,ldb,db,ldif],
-  ext_modules=[Extension('_ldb', ['ldb.i'], include_dirs=['include'],
- swig_opts=[-keyword],
+  py_modules=[ldb],
+  ext_modules=[Extension('_ldb', ['ldb_wrap.c'], include_dirs=['include'],
  library_dirs=[lib], libraries=['ldb','ldap'])],
   )



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

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-27 23:49:42 + (Tue, 27 Nov 2007)
New Revision: 26178

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

Log:
Link against -ldl as well to prevent undefined symbols.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-27 23:28:23 UTC 
(rev 26177)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-27 23:49:42 UTC 
(rev 26178)
@@ -109,7 +109,7 @@
ln -fs $ $@
 
 $(SOLIB): $(OBJS)
-   $(SHLD) $(SHLD_FLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) $(TALLOC_LIBS) 
$(TDB_LIBS) $(LDAP_LIBS) @[EMAIL PROTECTED](SONAME)
+   $(SHLD) $(SHLD_FLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) $(TALLOC_LIBS) 
$(TDB_LIBS) $(LIBDL) $(LDAP_LIBS) @[EMAIL PROTECTED](SONAME)
 
 all: showflags dirs $(OBJS) $(STATICLIB) $(SOLIB) $(BINS) $(EXAMPLES) manpages
 



Build status as of Wed Nov 28 00:00:02 2007

2007-11-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-11-27 
00:00:40.0 +
+++ /home/build/master/cache/broken_results.txt 2007-11-28 00:01:13.0 
+
@@ -1,4 +1,4 @@
-Build status as of Tue Nov 27 00:00:01 2007
+Build status as of Wed Nov 28 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -16,10 +16,10 @@
 rsync28 12 0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   25 16 0 
+samba4   25 15 0 
 samba_3_20  0  0 
 samba_3_2_test 28 17 0 
 smb-build27 26 0 
 talloc   28 7  0 
-tdb  27 5  0 
+tdb  28 5  0 
 


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

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-28 00:25:47 + (Wed, 28 Nov 2007)
New Revision: 26179

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

Log:
Fix symlink.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-27 23:49:42 UTC 
(rev 26178)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2007-11-28 00:25:47 UTC 
(rev 26179)
@@ -18,6 +18,7 @@
 SWIG = swig
 [EMAIL PROTECTED]@
 TESTS=test-tdb.sh @TESTS@
+PACKAGE_VERSION = @PACKAGE_VERSION@
 
 TALLOC_LIBS = @TALLOC_LIBS@
 TALLOC_CFLAGS = @TALLOC_CFLAGS@
@@ -99,14 +100,14 @@
@mkdir -p $(NSSDIR)
 
 SONAME = libldb.$(SHLIBEXT).0
-SOLIB = lib/libldb.$(SHLIBEXT).0.9.0
+SOLIB = lib/libldb.$(SHLIBEXT).$(PACKAGE_VERSION)
 STATICLIB = lib/libldb.a
 
 lib/$(SONAME): $(SOLIB)
-   ln -fs $ $@
+   ln -fs libldb.$(SHLIBEXT).$(PACKAGE_VERSION) $@
 
 lib/libldb.$(SHLIBEXT): $(SOLIB)
-   ln -fs $ $@
+   ln -fs libldb.$(SHLIBEXT).$(PACKAGE_VERSION) $@
 
 $(SOLIB): $(OBJS)
$(SHLD) $(SHLD_FLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) $(TALLOC_LIBS) 
$(TDB_LIBS) $(LIBDL) $(LDAP_LIBS) @[EMAIL PROTECTED](SONAME)



Rev 678: apply upstream change notify fix from volker in http://samba.org/~tridge/3_0-ctdb

2007-11-27 Thread tridge

revno: 678
revision-id:[EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: s3-ctdb-tridge
timestamp: Wed 2007-11-28 11:40:51 +1100
message:
  apply upstream change notify fix from volker
modified:
  source/smbd/notify.c   notify.c-20070210173807-1wjifrbwaz6xnmgl-1020
=== modified file 'source/smbd/notify.c'
--- a/source/smbd/notify.c  2007-04-19 23:16:03 +
+++ b/source/smbd/notify.c  2007-11-28 00:40:51 +
@@ -136,6 +136,7 @@
 
if (notify_buf-num_changes == -1) {
change_notify_reply_packet(request_buf, NT_STATUS_OK);
+   notify_buf-num_changes = 0;
return;
}
 



svn commit: samba r26180 - in branches/SAMBA_4_0: . source/lib/tdb

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-28 01:20:00 + (Wed, 28 Nov 2007)
New Revision: 26180

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

Log:
Allow prebuilding swig output files.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in
   branches/SAMBA_4_0/source/lib/tdb/autogen.sh
   branches/SAMBA_4_0/source/lib/tdb/setup.py


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-28 00:25:47 UTC 
(rev 26179)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2007-11-28 01:20:00 UTC 
(rev 26180)
@@ -21,6 +21,7 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PICFLAG = @PICFLAG@
 SHLIBEXT = @SHLIBEXT@
+SWIG = @SWIG@
 
 .PHONY: test
 
@@ -111,7 +112,10 @@
 realdistclean: distclean
rm -f configure include/config.h.in
 
-build-python: libtdb.$(SHLIBEXT)
+tdb_wrap.c tdb.py: tdb.i
+   $(SWIG) -python -keyword tdb.i
+
+build-python: libtdb.$(SHLIBEXT) tdb_wrap.c tdb.py
./setup.py build
 
 install-python:

Modified: branches/SAMBA_4_0/source/lib/tdb/autogen.sh
===
--- branches/SAMBA_4_0/source/lib/tdb/autogen.sh2007-11-28 00:25:47 UTC 
(rev 26179)
+++ branches/SAMBA_4_0/source/lib/tdb/autogen.sh2007-11-28 01:20:00 UTC 
(rev 26180)
@@ -9,6 +9,8 @@
 
 rm -rf autom4te.cache
 
+swig -python -keyword tdb.i # Ignore errors for now
+
 echo Now run ./configure and then make.
 exit 0
 

Modified: branches/SAMBA_4_0/source/lib/tdb/setup.py
===
--- branches/SAMBA_4_0/source/lib/tdb/setup.py  2007-11-28 00:25:47 UTC (rev 
26179)
+++ branches/SAMBA_4_0/source/lib/tdb/setup.py  2007-11-28 01:20:00 UTC (rev 
26180)
@@ -5,6 +5,7 @@
 setup(name='tdb',
   version='1.0',
   url=http://tdb.samba.org/;,
-  ext_modules=[Extension('_tdb', ['tdb.i'], include_dirs=['include'],
-  library_dirs=[.], libraries=['tdb'], swig_opts=[-keyword])],
+  py_modules=[tdb],
+  ext_modules=[Extension('_tdb', ['tdb_wrap.c'], include_dirs=['include'],
+  library_dirs=[.], libraries=['tdb'])],
 )



svn commit: samba r26181 - in branches/SAMBA_4_0: . source/lib/tdb

2007-11-27 Thread jelmer
Author: jelmer
Date: 2007-11-28 01:20:10 + (Wed, 28 Nov 2007)
New Revision: 26181

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

Log:
Set version to 1.1.1, as 1.1.0 has already been released.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/configure.ac


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/tdb/configure.ac
===
--- branches/SAMBA_4_0/source/lib/tdb/configure.ac  2007-11-28 01:20:00 UTC 
(rev 26180)
+++ branches/SAMBA_4_0/source/lib/tdb/configure.ac  2007-11-28 01:20:10 UTC 
(rev 26181)
@@ -2,7 +2,7 @@
 AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ])
 AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ])
 AC_DEFUN([SMB_ENABLE], [echo -n ])
-AC_INIT(tdb, 1.1.0)
+AC_INIT(tdb, 1.1.1)
 AC_CONFIG_SRCDIR([common/tdb.c])
 AC_CONFIG_HEADER(include/config.h)
 AC_LIBREPLACE_ALL_CHECKS



[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-27a-9-g8b83ddc

2007-11-27 Thread Jeremy Allison
The branch, v3-0-test has been updated
   via  8b83ddcce126c8a2c36b535c86f4a5b8c25a92f8 (commit)
  from  1ae55fe5c2a54fc65a95c3d6c62b355bab380e33 (commit)

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


- Log -
commit 8b83ddcce126c8a2c36b535c86f4a5b8c25a92f8
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 17:42:46 2007 -0800

Fix old cut-and-paste bug where the wrong field was being written to.
Jerry please check.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_spoolss_nt.c 
b/source/rpc_server/srv_spoolss_nt.c
index 4cf43f0..0bc7a39 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -1403,8 +1403,8 @@ static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, 
DEVICEMODE *devmode)
 
len = unistrlen(devmode-formname.buffer);
if (len != -1) {
-   d-devicename.buffer = TALLOC_ARRAY(ctx, uint16, len);
-   if (!d-devicename.buffer) {
+   d-formname.buffer = TALLOC_ARRAY(ctx, uint16, len);
+   if (!d-formname.buffer) {
return NULL;
}
if (unistrcpy(d-formname.buffer, devmode-formname.buffer) != 
len)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-383-g6a556fd

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  6a556fd73ac8c247c15df664f7910f8688abfdbc (commit)
   via  3052172d2bfe9d78525e90816394aac2dd54 (commit)
   via  04aecde5cfdb00d5aa32f9675c797266aba83c0f (commit)
  from  0002a9e96b0ef78316295a6eb94ff29b64e2f988 (commit)

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


- Log -
commit 6a556fd73ac8c247c15df664f7910f8688abfdbc
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 17:50:39 2007 -0800

Fix old cut-and-paste bug where the wrong field was being written to.
Jerry please check.
Jeremy.

commit 3052172d2bfe9d78525e90816394aac2dd54
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 17:48:59 2007 -0800

Whitespace cleanup.
Jeremy.

commit 04aecde5cfdb00d5aa32f9675c797266aba83c0f
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 17:48:44 2007 -0800

Make init_unistr2_from_unistr take an explicit talloc context.
Make init_unistr() re-use rpcstr_push_talloc().
Jeremy.

---

Summary of changes:
 source/rpc_parse/parse_misc.c  |   17 +-
 source/rpc_parse/parse_spoolss.c   |   56 +-
 source/rpc_server/srv_spoolss_nt.c | 2076 ++--
 3 files changed, 1070 insertions(+), 1079 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c
index 2e85b59..783c7fb 100644
--- a/source/rpc_parse/parse_misc.c
+++ b/source/rpc_parse/parse_misc.c
@@ -430,16 +430,9 @@ void init_unistr(UNISTR *str, const char *buf)
str-buffer = NULL;
return;
}
-   
-   len = strlen(buf) + 1;
 
-   if (len) {
-   str-buffer = TALLOC_ZERO_ARRAY(talloc_tos(), uint16, len);
-   if (str-buffer == NULL)
-   smb_panic(init_unistr: malloc fail);
-
-   rpcstr_push(str-buffer, buf, len*sizeof(uint16), 
STR_TERMINATE);
-   } else {
+   len = rpcstr_push_talloc(talloc_tos(), str-buffer, buf);
+   if (len == (size_t)-1) {
str-buffer = NULL;
}
 }
@@ -870,7 +863,7 @@ void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const 
smb_ucs2_t *buf)
  Inits a UNISTR2 structure from a UNISTR
 /
 
-void init_unistr2_from_unistr(UNISTR2 *to, const UNISTR *from)
+void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR *from)
 {
uint32 i;
 
@@ -898,9 +891,9 @@ void init_unistr2_from_unistr(UNISTR2 *to, const UNISTR 
*from)
 
/* allocate the space and copy the string buffer */
if (i) {
-   to-buffer = TALLOC_ZERO_ARRAY(talloc_tos(), uint16, i);
+   to-buffer = TALLOC_ZERO_ARRAY(ctx, uint16, i);
if (to-buffer == NULL)
-   smb_panic(init_unistr2_from_unistr: malloc fail);
+   smb_panic(init_unistr2_from_unistr: talloc fail);
memcpy(to-buffer, from-buffer, i*sizeof(uint16));
} else {
to-buffer = NULL;
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c
index 3030ff1..ea76c57 100644
--- a/source/rpc_parse/parse_spoolss.c
+++ b/source/rpc_parse/parse_spoolss.c
@@ -1016,18 +1016,18 @@ bool make_spoolss_q_addprinterex( TALLOC_CTX *mem_ctx, 
SPOOL_Q_ADDPRINTEREX *q_u
 create a SPOOL_PRINTER_INFO_2 stuct from a PRINTER_INFO_2 struct
 ***/
 
-bool make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, 
SPOOL_PRINTER_INFO_LEVEL_2 **spool_info2, 
+bool make_spoolss_printer_info_2(TALLOC_CTX *ctx, SPOOL_PRINTER_INFO_LEVEL_2 
**spool_info2, 
PRINTER_INFO_2 *info)
 {
 
SPOOL_PRINTER_INFO_LEVEL_2 *inf;
 
/* allocate the necessary memory */
-   if (!(inf=TALLOC_P(mem_ctx, SPOOL_PRINTER_INFO_LEVEL_2))) {
+   if (!(inf=TALLOC_P(ctx, SPOOL_PRINTER_INFO_LEVEL_2))) {
DEBUG(0,(make_spoolss_printer_info_2: Unable to allocate 
SPOOL_PRINTER_INFO_LEVEL_2 sruct!\n));
return False;
}
-   
+
inf-servername_ptr = (info-servername.buffer!=NULL)?1:0;
inf-printername_ptr= (info-printername.buffer!=NULL)?1:0;
inf-sharename_ptr  = (info-sharename.buffer!=NULL)?1:0;
@@ -1048,18 +1048,18 @@ bool make_spoolss_printer_info_2(TALLOC_CTX *mem_ctx, 
SPOOL_PRINTER_INFO_LEVEL_2
inf-untiltime  = info-untiltime;
inf-cjobs  = info-cjobs;
inf-averageppm = info-averageppm;
-   init_unistr2_from_unistr(inf-servername,  info-servername);
-   init_unistr2_from_unistr(inf-printername, info-printername);
-   init_unistr2_from_unistr(inf-sharename,   info-sharename);
-   

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-384-gb5a2a1e

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  b5a2a1e3f82a0d319fc9a1d76f5166150680f4d4 (commit)
  from  6a556fd73ac8c247c15df664f7910f8688abfdbc (commit)

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


- Log -
commit b5a2a1e3f82a0d319fc9a1d76f5166150680f4d4
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 19:05:08 2007 -0800

Remove pstring from srv_spoolss_nt.c. All gone from rpc_server/*.c
Jeremy.

---

Summary of changes:
 source/include/nt_printing.h   |2 +-
 source/printing/print_cups.c   |4 +-
 source/registry/reg_printing.c |2 +-
 source/rpc_server/srv_spoolss_nt.c |  538 
 4 files changed, 311 insertions(+), 235 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/nt_printing.h b/source/include/nt_printing.h
index 8e8d87b..479404d 100644
--- a/source/include/nt_printing.h
+++ b/source/include/nt_printing.h
@@ -312,7 +312,7 @@ typedef struct nt_printer_info_level_2
fstring sharename;
fstring portname;
fstring drivername;
-   pstring comment;
+   char comment[1024];
fstring location;
NT_DEVICEMODE *devmode;
fstring sepfile;
diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c
index 6e62306..593c5c7 100644
--- a/source/printing/print_cups.c
+++ b/source/printing/print_cups.c
@@ -1298,7 +1298,9 @@ bool cups_pull_comment_location(NT_PRINTER_INFO_LEVEL_2 
*printer)
{
DEBUG(5,(cups_pull_comment_location: Using 
cups comment: %s\n,
 attr-values[0].string.text)); 

-   
pstrcpy(printer-comment,attr-values[0].string.text);
+   strlcpy(printer-comment,
+   attr-values[0].string.text,
+   sizeof(printer-comment));
}
 
/* Grab the location if we don't have one */ 
diff --git a/source/registry/reg_printing.c b/source/registry/reg_printing.c
index 8c1de76..2ca74f7 100644
--- a/source/registry/reg_printing.c
+++ b/source/registry/reg_printing.c
@@ -296,7 +296,7 @@ static bool add_printers_by_registry( REGSUBKEY_CTR 
*subkeys )
if ( snum == -1 ) {
fstrcpy( info2.printername, printername );
fstrcpy( info2.sharename, printername );
-   if ( !add_printer_hook( NULL, printer ) ) {
+   if ( !add_printer_hook(talloc_tos(), NULL, printer ) ) 
{
DEBUG(0,(add_printers_by_registry: Failed to 
add printer [%s]\n,
printername));
}   
diff --git a/source/rpc_server/srv_spoolss_nt.c 
b/source/rpc_server/srv_spoolss_nt.c
index a6f3bfb..b01f10b 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/rpc_server/srv_spoolss_nt.c
@@ -284,10 +284,11 @@ static bool close_printer_handle(pipes_struct *p, 
POLICY_HND *hnd)
 /
  Delete a printer given a handle.
 /
-WERROR delete_printer_hook( NT_USER_TOKEN *token, const char *sharename )
+
+WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char 
*sharename )
 {
char *cmd = lp_deleteprinter_cmd();
-   pstring command;
+   char *command = NULL;
int ret;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
bool is_print_op = False;
@@ -297,8 +298,12 @@ WERROR delete_printer_hook( NT_USER_TOKEN *token, const 
char *sharename )
if ( !*cmd )
return WERR_OK;
 
-   pstr_sprintf(command, %s \%s\, cmd, sharename);
-
+   command = talloc_asprintf(ctx,
+   %s \%s\,
+   cmd, sharename);
+   if (!command) {
+   return WERR_NOMEM;
+   }
if ( token )
is_print_op = user_has_privileges( token, se_printop );
 
@@ -322,6 +327,8 @@ WERROR delete_printer_hook( NT_USER_TOKEN *token, const 
char *sharename )
 
DEBUGADD(10,(returned [%d]\n, ret));
 
+   TALLOC_FREE(command);
+
if (ret != 0)
return WERR_BADFID; /* What to return here? */
 
@@ -367,7 +374,7 @@ static WERROR delete_printer_handle(pipes_struct *p, 
POLICY_HND *hnd)
return WERR_BADFID;
}
 
-   return delete_printer_hook( p-pipe_user.nt_user_token, 
Printer-sharename );
+   return delete_printer_hook(p-mem_ctx, p-pipe_user.nt_user_token, 
Printer-sharename );
 }
 
 

[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-385-gf1e401e

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  f1e401ef5c89ecf12921b7adb228da438521a693 (commit)
  from  b5a2a1e3f82a0d319fc9a1d76f5166150680f4d4 (commit)

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


- Log -
commit f1e401ef5c89ecf12921b7adb228da438521a693
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 19:12:42 2007 -0800

Save one extra strdup per lp_string. Use talloc_sub_basic()
directly.
Jeremy.

---

Summary of changes:
 source/param/loadparm.c |   26 ++
 1 files changed, 14 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 80eac74..16c6c59 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -1729,7 +1729,8 @@ static void init_globals(bool first_time_only)
 
 static char *lp_string(const char *s)
 {
-   char *ret, *tmpstr;
+   char *ret;
+   TALLOC_CTX *ctx = talloc_tos();
 
/* The follow debug is useful for tracking down memory problems
   especially if you have an inner loop that is calling a lp_*()
@@ -1740,19 +1741,20 @@ static char *lp_string(const char *s)
DEBUG(10, (lp_string(%s)\n, s));
 #endif
 
-   tmpstr = alloc_sub_basic(get_current_username(),
-current_user_info.domain, s);
-   if (trim_char(tmpstr, '\', '\')) {
-   if (strchr(tmpstr,'\') != NULL) {
-   SAFE_FREE(tmpstr);
-   tmpstr = alloc_sub_basic(get_current_username(),
-current_user_info.domain, s);
+   ret = talloc_sub_basic(ctx,
+   get_current_username(),
+   current_user_info.domain,
+   s);
+   if (trim_char(ret, '\', '\')) {
+   if (strchr(ret,'\') != NULL) {
+   TALLOC_FREE(ret);
+   ret = talloc_sub_basic(ctx,
+   get_current_username(),
+   current_user_info.domain,
+   s);
}
}
-   ret = talloc_strdup(talloc_tos(), tmpstr);
-   SAFE_FREE(tmpstr);
-   
-   return (ret);
+   return ret;
 }
 
 /*


-- 
Samba Shared Repository


svn commit: samba r26182 - in branches/SAMBA_4_0: source/dsdb/samdb/ldb_modules testprogs/ejs

2007-11-27 Thread abartlet
Author: abartlet
Date: 2007-11-28 04:24:12 + (Wed, 28 Nov 2007)
New Revision: 26182

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

Log:
Extend our linked attribute testsuite to cover many more possible
modifications, and then extend our implementation to match.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/linked_attributes.c
   branches/SAMBA_4_0/testprogs/ejs/ldap.js


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


[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-387-g9755c53

2007-11-27 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  9755c5311416f17bac0a848d027cafb3fd487618 (commit)
  from  6cae4b5fa1bcb848cb2a28daaafeefd6bcd08274 (commit)

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


- Log -
commit 9755c5311416f17bac0a848d027cafb3fd487618
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Nov 27 23:00:11 2007 -0800

Fixed obvious typo.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_winreg_nt.c 
b/source/rpc_server/srv_winreg_nt.c
index 631386c..8732240 100644
--- a/source/rpc_server/srv_winreg_nt.c
+++ b/source/rpc_server/srv_winreg_nt.c
@@ -790,7 +790,7 @@ WERROR _winreg_RestoreKey(pipes_struct *p, struct 
winreg_RestoreKey *r)
if ( !r-in.filename || !r-in.filename-name )
return WERR_INVALID_PARAM;
 
-   fname - talloc_strdup(p-mem_ctx, r-in.filename-name);
+   fname = talloc_strdup(p-mem_ctx, r-in.filename-name);
if (!fname) {
return WERR_NOMEM;
}


-- 
Samba Shared Repository