Re: [Samba] Samba Configuration

2009-03-18 Thread guido
Is hard for me to keep up with what you are doing for the hour here ...

But I can tell you this. If you are going to have a share with multiple
users accessing a directory the best thing you can do is to have a
domain-users like.

So...

For example:

[ADD]
path = /home/ADD
browseable = no
public = no
writable = yes
nt acl support = no
valid users = @add @addrw

(You should change the browseable to see the share from the clients)

ls -ld /home/ADD
drwxrwx---+ 10 root addrw 4096 Mar  6 12:31 /home/ADD/
bowman:/etc/samba# getfacl /home/ADD/
getfacl: Removing leading '/' from absolute path names
# file: home/ADD
# owner: root
# group: addrw
user::rwx
group::rwx
group:add:rwx
group:addrw:rwx
mask::rwx
other::---


Now if you like to manage permissions from the clients, you should start
thinking about using acls in the filesystem.

/dev/mapper/storage-home on /home type ext3 (rw,acl)

And you should change the nt acl support to yes.

I hope this helps.


 I think I'm making some progress.. I can now write to the directory.

 If I chown admin:domain admins admin I can then write to the directory
 on
 the XP side. I can see domain permissions, but cannot edit them.

 However in doing this, I can no longer access the directory as my user on
 the Linux side.

 I tried creating a new group called 'samba' and added my admin user, along
 with my XP user. I kept the owner as admin. Now I can access the folder on
 the Linux side, but not the XP. *frustration!*

 And thanks for the help.
 --
 View this message in context:
 http://www.nabble.com/Samba-Configuration-tp22566973p22572874.html
 Sent from the Samba - General mailing list archive at Nabble.com.

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



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


[Samba] Upgrade Samba Server Operating System version

2009-03-18 Thread Ooi Kwan Chen

Hi all,

I'm using Samba 3.0.24-6etch10 in Debian Etch 64bit with kernel Linux 
2.6.18-6-amd64.


I'm planning to upgrade my Samba Server from Debian Etch to Debian Lenny.

Will this affect Samba? Is it safe to perform upgrade from apt-get upgrade?

Thank you all for your help.

--
Best regards,

Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com 


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


[Samba] Open Files (MSOFFICE, xls, word) on samba share extreme slow

2009-03-18 Thread Daniel Müller
Dear all,

 

I have a samba 3.2.07 server up and running. All is working fine but W2000
clients have a heavy problem opening files on network shares.

Did someone recognized the same behavior and solved it?

 

Greetings

Daniel

 

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


Re: [Samba] Upgrade Samba Server Operating System version

2009-03-18 Thread Tim Bates

Ooi Kwan Chen wrote:

I'm planning to upgrade my Samba Server from Debian Etch to Debian Lenny.
Will this affect Samba? Is it safe to perform upgrade from apt-get 
upgrade? 
It generally goes fine I'd get apt to download all the required 
packages the night before you plan to do the upgrade, and then set aside 
2-3 hours to do the actual upgrade (it should take less than 1, but if 
something goes wrong you need a bit more time to get it going again).


I had no issues with Samba in my upgrades.

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


Re: [Samba] Upgrade Samba Server Operating System version

2009-03-18 Thread guido
 Hi all,

 I'm using Samba 3.0.24-6etch10 in Debian Etch 64bit with kernel Linux
 2.6.18-6-amd64.

 I'm planning to upgrade my Samba Server from Debian Etch to Debian Lenny.

 Will this affect Samba? Is it safe to perform upgrade from apt-get
 upgrade?

 Thank you all for your help.

 --
 Best regards,

 Ooi Kwan Chen (John), System Support, Server Management Section,
 Group IT Department, DXN Holdings Berhad
 Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
 Website : www.dxn2u.com

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


Hi! I have several debian etch to upgrade. But I didn't upgrade any samba
yet. I did a fresh install of a new server in Lenny and the only problem
that I have was with openldap. A few things changed in my scenario...
Like:

* In pam_ldap now is mandatory to have ssl on to use a ssl connection
* Slapd now is compiled agains gnutls, so you need to change the Ciphers
list in slapd.conf.

Please, post any problems. Im interested 'coz I have like ten PDC to
migrate from etch to lenny.

Bye.

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


Re: [Samba] Upgrade Samba Server Operating System version

2009-03-18 Thread Ooi Kwan Chen

Tim Bates wrote:

Ooi Kwan Chen wrote:
I'm planning to upgrade my Samba Server from Debian Etch to Debian 
Lenny.
Will this affect Samba? Is it safe to perform upgrade from apt-get 
upgrade? 
It generally goes fine I'd get apt to download all the required 
packages the night before you plan to do the upgrade, and then set 
aside 2-3 hours to do the actual upgrade (it should take less than 1, 
but if something goes wrong you need a bit more time to get it going 
again).


I had no issues with Samba in my upgrades.

TB


Hi Tim,

Thanks for your information. I just finished upgraded my Samba server 
smoothly. Everything is fine.


--
Best regards,

Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com 


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


Re: [Samba] Upgrade Samba Server Operating System version

2009-03-18 Thread Ooi Kwan Chen

gu...@lorenzutti.com.ar wrote:

Hi all,

I'm using Samba 3.0.24-6etch10 in Debian Etch 64bit with kernel Linux
2.6.18-6-amd64.

I'm planning to upgrade my Samba Server from Debian Etch to Debian Lenny.

Will this affect Samba? Is it safe to perform upgrade from apt-get
upgrade?

Thank you all for your help.

--
Best regards,

Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com

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




Hi! I have several debian etch to upgrade. But I didn't upgrade any samba
yet. I did a fresh install of a new server in Lenny and the only problem
that I have was with openldap. A few things changed in my scenario...
Like:

* In pam_ldap now is mandatory to have ssl on to use a ssl connection
* Slapd now is compiled agains gnutls, so you need to change the Ciphers
list in slapd.conf.

Please, post any problems. Im interested 'coz I have like ten PDC to
migrate from etch to lenny.

Bye.


  

Hi guido,

I'm just finish upgraded my Samba server to Lenny successfully. 
Everything is fine except for openldap that I'm not familiar with.


Hope this info helps.

--
Best regards,

Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com 


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


Re: [Samba] Creating users while preventing bash login

2009-03-18 Thread Ooi Kwan Chen

David Miller wrote:
On Mon, Feb 23, 2009 at 10:52 PM, Ooi Kwan Chen 
ooi_kwanc...@dxn2u.com mailto:ooi_kwanc...@dxn2u.com wrote:


Hi all,

I'm using Samba 3.0.24-6etch10 in Debian Etch 64bit with kernel
Linux 2.6.18-6-amd64.

Is it possible to disable the bash login permission for my clients
in the sharing group while they are only able to login to view share?

Example:-

I have created a system user which is able to connect and view the
share files, but i do not want to allow bash login to the server
such as ssh.

Thank you all for your help.

-- 
Best regards,


Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com http://www.dxn2u.com
-- 
To unsubscribe from this list go to the following URL and read the

instructions:  https://lists.samba.org/mailman/options/samba


All you need to do is set the users shell to /bin/false.
--
David

Hi David,

Just want to say thank you for your advice. Everything works fine.

--
Best regards,

Ooi Kwan Chen (John), System Support, Server Management Section,
Group IT Department, DXN Holdings Berhad
Office Phone : +604 771 6688 Ext 122 Fax : +604 772 4785
Website : www.dxn2u.com 


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


[Samba] AD and winbindd madness

2009-03-18 Thread Robert Gehr
Hello all

I tried for a couple of days now to get our samba domain hooked up with
an AD controller. I followed these instructions: 
http://www.msadfaq.de/wiki/ActiveDirectory/trust_relationship_samba_ad

I've solved a couple of problems over the years but this is a hard nut
to crack.

The setup is as follows

AD runs the domain BAUMANN (realm: baumann.local)
samba runs the domain BAUMANN-GMBH
The trust relationship has been esatblished, at least so it seems.

What I can do when I fire up winbind on the samba PDC (baadm1)

wbinfo -u: works
wbinfo -g: works
wbinfo -m: works
wbind -t: never returns but spits out no errors

getent passwd/group show the users/groups of the AD BAUMANN domain

I can assign file/group ownership to users/groups from the BAUMANN
domain.

If I don't have winbindd running I can connect to a share located on the
PDC of the samba controlled BAUMANN-GMBH domain, but can not write to
it.

If I run winbindd I can't connect to the share anymore. Same user, same
password. The error winbindd comes up with:

SCHANNEL: schannel_decode seq_num=13 data_len=32
SCHANNEL: schannel_decode seq_num=13 data_len=32
cli_pipe_validate_current_pdu: got pdu len 96, data_len 20, ss_len 12
rpc_api_pipe: got PDU len of 96 at offset 0
rpc_api_pipe: host baad1.baumann.local, pipe \NETLOGON, fnum 0x8006
returned 40 bytes.
netr_LogonSamLogonEx: struct netr_LogonSamLogonEx
out: struct netr_LogonSamLogonEx
validation   : *
validation   : union netr_Validation(case 3)
sam3 : NULL
authoritative: *
authoritative: 0x01 (1)
flags: *
flags: 0x (0)
result   : NT_STATUS_LOGON_FAILURE
NTLM CRAP authentication for user [BAUMANN]\[gehr] returned
NT_STATUS_LOGON_FAILURE (PAM: 4)


Here the relevant entries of smb.conf on the samba PDC

 [global]
   dos charset = 850
   unix charset = ISO8859-1
   display charset = ISO8859-1
   workgroup = BAUMANN-GMBH
   server string = %h
   passdb backend = ldapsam:ldap://baadm1.baumann-gmbh.de,
ldap://bafs2.baumann-gmbh.de;
   username map = /usr/local/samba/lib/user.map
   lanman auth = No
   socket options = TCP_NODELAY SO_RCVBUF=16384 SO_SNDBUF=16384
   add user script = /usr/local/sbin/smbldap-useradd -m %u
   add group script = /usr/local/sbin/smbldap-groupadd -a -p %g
   add user to group script = /usr/local/sbin/smbldap-groupmod -m %u
%g
   delete user from group script = /usr/local/sbin/smbldap-groupmod -x
%u %g
   set primary group script = /usr/local/sbin/smbldap-usermod -g %g %
u
   add machine script = /usr/local/sbin/smbldap-useradd -w %u
   logon path =
   domain logons = Yes
   os level = 65
   domain master = Yes
   wins support = Yes
   kernel oplocks = No
   ldap admin dn = cn=ldap-admin,dc=baumann-gmbh,dc=de
   ldap group suffix = ou=groups
   ldap idmap suffix = ou=idmap
   ldap machine suffix = ou=computers
   ldap passwd sync = Yes
   ldap suffix = dc=baumann-gmbh,dc=de
   ldap ssl = start tls
   ldap user suffix = ou=people
   #idmap backend = ldap:ldap://baadm1.baumann-gmbh.de
   #idmap domains = BAUMANN-GMBH
   idmap uid = 1-2
   idmap gid = 1-2
   ldapsam:trusted = yes
   idmap config BAUMANN-GMBH:ldap_url = ldap://baadm1.baumann-gmbh.de
   idmap config BAUMANN-GMBH:ldap_base_dn =
ou=idmap,dc=baumann-gmbh,dc=de
   idmap config BAUMANN-GMBH:backend = ldap
   idmap config BAUMANN-GMBH:default = yes


Here the conf winbindd gets started with:

[global]

workgroup = baumann
netbios name = baadm1

idmap uid = 3-4
idmap gid = 3-4
winbind enum users = yes
winbind enum groups = yes
#winbind separator = +

realm = BAUMANN.LOCAL
#winbind use default domain = Yes
security = ADS
domain master = No
encrypt passwords = yes
password server = baad1.baumann.local
client use spnego = yes
winbind trusted domains only = No


Help is greatly appreciated, for it is must that we get this thing
going. 

Thanks and regards

Rob






Success is going from failure to failure without loss of enthusiasm.
~ Winston Churchill


-- 
baumann GmbH
Oskar-von-Miller-Str. 7
92224 Amberg - Deutschland / Germany

GF / CEO: Dr. Georg Baumann, Rudi Neumann, Josef Konrad
HR: Amberg HRB 1067 

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


Re: [Samba] Domain Privileges on Samba 3.2

2009-03-18 Thread G.W. Haywood
On Tue, 17 Mar 2009 David Markey wrote:

Re: [Samba] Domain Privileges on Samba 3.2

 I think 3.2.5 has a privileges bug, You'll have to upgrade to the latest
 in the 3.2 series, probably compile it from scratch.

http://www.mail-archive.com/debian-bugs-d...@lists.debian.org/msg624481.html

--

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


RE: [Samba] Open Files (MSOFFICE, xls, word) on samba share extreme slow

2009-03-18 Thread Wikked one

Hi Daniel,
  A couple quick items to check.
Make sure you have log level set to 2 or less. (unless you are troubleshooting)
Another parameter worth looking into is 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192



 From: muel...@tropenklinik.de
 To: samba@lists.samba.org
 Date: Wed, 18 Mar 2009 09:17:33 +0100
 Subject: [Samba]  Open Files (MSOFFICE, xls, word) on samba share extreme 
 slow
 
 Dear all,
 
  
 
 I have a samba 3.2.07 server up and running. All is working fine but W2000
 clients have a heavy problem opening files on network shares.
 
 Did someone recognized the same behavior and solved it?
 
  
 
 Greetings
 
 Daniel
 
  
 
 -- 
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba LDAP troubleshooting

2009-03-18 Thread Brad C
Hi There,

Yep, Ok now I understand the SID needs to be the same as the server the
client formed the initial security relationship with,

Is this correct?

Kind Regards
Brad

On Tue, Mar 17, 2009 at 7:47 PM, Adam Williams awill...@mdah.state.ms.uswrote:

 well the user's sid is invalid.  does it match the domain's sid with net
 getdomainsid?


 Brad C wrote:

 Hello

 I'm hoping someone can provide some insight, sample snippet from smb.conf
 and the samba log.
 Password authentication is working  succeeding, complains about an
 invalid
 SID which I know is the trust relationship that is formed between server
 and
 client, this is a duplicate ldap database from a samba domain controller.

 On the topic, anyone have a good book to recommend on Samba, I feel I am
 only using 10% of its capability and not really well at that... something
 is
 staring me in the face and Im missing it.

 [global]
workgroup = companyx
printing = cups
 hosts allow = 192.168.1.printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
security = user
encrypt passwords = Yes
obey pam restrictions = No
log level = 2
passdb backend = ldapsam:ldap://127.0.0.1/
ldap admin dn = cn=manager,dc=companyx,dc=co,dc=za
ldap suffix = dc=companyx,dc=co,dc=za
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Computers
ldap idmap suffix = ou=Users
ldap ssl = off
ldap delete dn = Yes

 [testdir]
comment = test1
path = /data/test
browseable = yes
writable = yes
read only = no
available = yes
valid users = bradleyc
admin users = bradleyc



 [2009/03/13 08:36:39,  2]
 lib/access.c:check_access(406)

  Allowed connection from ___192.168.2.154
 (:::192.168.2.154)

 [2009/03/13 08:36:39,  2]
 lib/smbldap.c:smbldap_open_connection(796)

  smbldap_open_connection: connection
 opened

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_sam_from_ldap(571)

  init_sam_from_ldap: Entry found for user:
 bradleyc

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 513

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 513

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 1010

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 512

 [2009/03/13 08:36:39,  2]
 auth/auth.c:check_ntlm_password(308)

  check_ntlm_password:  authentication for user [bradleyc] - [bradleyc] -
 [bradleyc] succeeded
 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 544

 [2009/03/13 08:36:39,  2]
 lib/access.c:check_access(406)

  Allowed connection from :::192.168.2.154
 (:::192.168.2.154)

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_sam_from_ldap(571)

  init_sam_from_ldap: Entry found for user:
 bradleyc

 [2009/03/13 08:36:39,  2]
 passdb/pdb_ldap.c:init_group_from_ldap(2344)

  init_group_from_ldap: Entry found for group:
 513

 [2009/03/13 08:36:39,  0]
 passdb/passdb.c:lookup_global_sam_name(595)

  User bradleyc with invalid SID
 S-1-5-21-1571991244-1820204139-1100571284-3420 in
 passdb
 [2009/03/13 08:36:39,  2]
 smbd/service.c:make_connection_snum(736)

  user 'bradleyc' (from session setup) not permitted to access this share
 (testdir)



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


[Samba] fill_share_mode_lock failed

2009-03-18 Thread Mario Fetka
Hallo,

the subject says everything

the error is comming every now and then.

the system is a ubuntu server intrepid
the samba server uses ldap
version is 3.2.3
mounted with:
/dev/sde1 on /home type ext3 (rw,relatime,acl)

the clients windows xp prof (SP3)

the log
2009/03/18 13:20:41,  3] locking/locking.c:fetch_share_mode_unlocked(857)   

  
  fill_share_mode_lock failed   

   
[2009/03/18 13:20:41,  3] smbd/process.c:process_smb(1549)  

   
  Transaction 3143 of length 272 (0 toread) 

   
[2009/03/18 13:20:41,  3] smbd/process.c:switch_message(1361)   

   
  switch message SMBtrans2 (pid 6284) conn 0xb92772d8   

   
[2009/03/18 13:20:41,  3] smbd/trans2.c:call_trans2qfilepathinfo(3932)  

   
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 1004   

   
[2009/03/18 13:20:41,  3] locking/locking.c:fetch_share_mode_unlocked(857)  

   
  fill_share_mode_lock failed   

   
[2009/03/18 13:20:41,  3] smbd/trans2.c:call_trans2qfilepathinfo(4006)  

   
  call_trans2qfilepathinfo 
/Anwendungsdaten/OpenOffice.org/3/user/config/soffice.cfg/modules/StartModule/statusbar
 
(fnum = -1) level=1004 call=5 total_data=0  
[2009/03/18 13:20:41,  3] smbd/process.c:process_smb(1549)  

   
  Transaction 3144 of length 282 (0 toread) 

   
[2009/03/18 13:20:41,  3] smbd/process.c:switch_message(1361)   

   
  switch message SMBtrans2 (pid 6284) conn 0xb92772d8   

   
[2009/03/18 13:20:41,  3] smbd/trans2.c:call_trans2findfirst(1918)  

   
  call_trans2findfirst: dirtype = 16, maxentries = 1366, close_after_first=0, 
close_if_end = 1 requires_resume_key = 1 level = 0x104, max_data_bytes = 16384  
 
[2009/03/18 13:20:41,  3] smbd/dir.c:dptr_create(520)   

   
  creating new dirptr 256 for path 
/Anwendungsdaten/OpenOffice.org/3/user/config/soffice.cfg/modules/StartModule/statusbar,
 
expect_close = 1   
[2009/03/18 13:20:41,  3] locking/locking.c:fetch_share_mode_unlocked(857)  

   
  fill_share_mode_lock failed   

   
[2009/03/18 13:20:41,  3] locking/locking.c:fetch_share_mode_unlocked(857)  

   
 

[Samba] Samba Password Question.

2009-03-18 Thread mparsons
Hi All - Quick question. Is there anyway that when a user first invokes 
Samba to map to a network share that they are asked to change their 
(samba) password. 

I've got a whole bunch of (samba) users who all have been given the same 
password and I want them to have to change it to one of their own choosing 
upon first login.

Kind Regards,

Mark Parsons

Ernst  Young is proud to bring you Entrepreneur Of The Year - the prestigious 
global business awards for entrepreneurs. www.eoy.co.uk

This e-mail and any attachment are confidential and contain proprietary 
information, some or all of which may be legally privileged.  It is intended 
solely for the use of the individual or entity to which it is addressed.  If 
you are not the intended recipient, please notify the author immediately by 
telephone or by replying to this e-mail, and then delete all copies of the 
e-mail on your system.  If you are not the intended recipient, you must not 
use, disclose, distribute, copy, print or rely on this e-mail.

Whilst we have taken reasonable precautions to ensure that this e-mail and any 
attachment has been checked for viruses, we cannot guarantee that they are 
virus free and we cannot accept liability for any damage sustained as a result 
of software viruses.  We would advise that you carry out your own virus checks, 
especially before opening an attachment.

Ernst  Young refers to the global organization of member firms of Ernst  
Young Global Limited, each of which is a separate legal entity. Ernst  Young 
Global Limited, a UK company limited by guarantee, does not provide services to 
clients.

The UK firm Ernst  Young LLP is a limited liability partnership registered in 
England and Wales with registered number OC31 and is a member practice of 
Ernst  Young Global.  A list of members' names is available for inspection at 
1 More London Place, London, SE1 2AF, the firm's principal place of business 
and its registered office. 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba Password Question.

2009-03-18 Thread David Wells

mpars...@uk.ey.com wrote:
Hi All - Quick question. Is there anyway that when a user first invokes 
Samba to map to a network share that they are asked to change their 
(samba) password. 

I've got a whole bunch of (samba) users who all have been given the same 
password and I want them to have to change it to one of their own choosing 
upon first login.


Kind Regards,

Mark Parsons

Ernst  Young is proud to bring you Entrepreneur Of The Year - the prestigious 
global business awards for entrepreneurs. www.eoy.co.uk

This e-mail and any attachment are confidential and contain proprietary 
information, some or all of which may be legally privileged.  It is intended 
solely for the use of the individual or entity to which it is addressed.  If 
you are not the intended recipient, please notify the author immediately by 
telephone or by replying to this e-mail, and then delete all copies of the 
e-mail on your system.  If you are not the intended recipient, you must not 
use, disclose, distribute, copy, print or rely on this e-mail.

Whilst we have taken reasonable precautions to ensure that this e-mail and any 
attachment has been checked for viruses, we cannot guarantee that they are 
virus free and we cannot accept liability for any damage sustained as a result 
of software viruses.  We would advise that you carry out your own virus checks, 
especially before opening an attachment.

Ernst  Young refers to the global organization of member firms of Ernst  Young 
Global Limited, each of which is a separate legal entity. Ernst  Young Global Limited, 
a UK company limited by guarantee, does not provide services to clients.

The UK firm Ernst  Young LLP is a limited liability partnership registered in England and Wales with registered number OC31 and is a member practice of Ernst  Young Global.  A list of members' names is available for inspection at 1 More London Place, London, SE1 2AF, the firm's principal place of business and its registered office. 
  

Is samba the DC of the domain?

Best regards,
David Wells.

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


Re: [Samba] Samba Password Question.

2009-03-18 Thread mparsons
Hi David, 

Its Samba Release 3 on an HP-UX 11.11 machine. We are allowing users to 
map folders from the unix box as shares on their windows laptops. 

Cheers, 

Mark P.













David Wells d.we...@vitalcan.com.ar 
18/03/2009 14:38

To
mpars...@uk.ey.com
cc
samba@lists.samba.org
Subject
Re: [Samba] Samba Password Question.






mpars...@uk.ey.com wrote:
 Hi All - Quick question. Is there anyway that when a user first invokes 
 Samba to map to a network share that they are asked to change their 
 (samba) password. 

 I've got a whole bunch of (samba) users who all have been given the same 

 password and I want them to have to change it to one of their own 
choosing 
 upon first login.

 Kind Regards,

 Mark Parsons

 Ernst  Young is proud to bring you Entrepreneur Of The Year - the 
prestigious global business awards for entrepreneurs. www.eoy.co.uk

 This e-mail and any attachment are confidential and contain proprietary 
information, some or all of which may be legally privileged.  It is 
intended solely for the use of the individual or entity to which it is 
addressed.  If you are not the intended recipient, please notify the 
author immediately by telephone or by replying to this e-mail, and then 
delete all copies of the e-mail on your system.  If you are not the 
intended recipient, you must not use, disclose, distribute, copy, print or 
rely on this e-mail.

 Whilst we have taken reasonable precautions to ensure that this e-mail 
and any attachment has been checked for viruses, we cannot guarantee that 
they are virus free and we cannot accept liability for any damage 
sustained as a result of software viruses.  We would advise that you carry 
out your own virus checks, especially before opening an attachment.

 Ernst  Young refers to the global organization of member firms of Ernst 
 Young Global Limited, each of which is a separate legal entity. Ernst  
Young Global Limited, a UK company limited by guarantee, does not provide 
services to clients.

 The UK firm Ernst  Young LLP is a limited liability partnership 
registered in England and Wales with registered number OC31 and is a 
member practice of Ernst  Young Global.  A list of members' names is 
available for inspection at 1 More London Place, London, SE1 2AF, the 
firm's principal place of business and its registered office. 
 
Is samba the DC of the domain?

Best regards,
David Wells.






Ernst  Young is proud to bring you Entrepreneur Of The Year - the prestigious 
global business awards for entrepreneurs. www.eoy.co.uk

This e-mail and any attachment are confidential and contain proprietary 
information, some or all of which may be legally privileged.  It is intended 
solely for the use of the individual or entity to which it is addressed.  If 
you are not the intended recipient, please notify the author immediately by 
telephone or by replying to this e-mail, and then delete all copies of the 
e-mail on your system.  If you are not the intended recipient, you must not 
use, disclose, distribute, copy, print or rely on this e-mail.

Whilst we have taken reasonable precautions to ensure that this e-mail and any 
attachment has been checked for viruses, we cannot guarantee that they are 
virus free and we cannot accept liability for any damage sustained as a result 
of software viruses.  We would advise that you carry out your own virus checks, 
especially before opening an attachment.

Ernst  Young refers to the global organization of member firms of Ernst  
Young Global Limited, each of which is a separate legal entity. Ernst  Young 
Global Limited, a UK company limited by guarantee, does not provide services to 
clients.

The UK firm Ernst  Young LLP is a limited liability partnership registered in 
England and Wales with registered number OC31 and is a member practice of 
Ernst  Young Global.  A list of members' names is available for inspection at 
1 More London Place, London, SE1 2AF, the firm's principal place of business 
and its registered office. 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba Configuration

2009-03-18 Thread ElihuJ

Thanks Guido. I think I'm a little confused though :)

Here's what I added to my smb.conf:

[admin]
 path = /home/admin
 browseable = yes
 public = no
 writable =  yes
 nt acl support = no
 valid users = @admin

When I do ls -ld /home/admin I get:

drwx--x--x 8 admin wheel 4096 2009-03-18 00:49 /home/admin

And getfacl:

getfacl /home/admin
# file: home/admin
# owner: admin
# group: wheel
user::rwx
group::--x
other::---

So should I create a group, say addrw and add my admin user to it?

Thank you again, I appreciate your help.
-- 
View this message in context: 
http://www.nabble.com/Samba-Configuration-tp22566973p22585997.html
Sent from the Samba - General mailing list archive at Nabble.com.

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


[Samba] Can SAMBA make a kerberos keytab on Solaris 10?

2009-03-18 Thread Rob LaRose

Hi Samba people!

	I'm trying to use SAMBA (the version included with Solaris 10) with  
an AD.


	NET ADS JOIN works like a charm to create a computer object in the AD  
for the solaris machine, and SAMBA users are authenticating without a  
problem.  This is good.  HOWEVER -- I also need other protocols  
(including ssh and Xinet KA-Share) to authenticate users.


	As I understand it, SAMBA uses kerberos to authenticate against AD,  
so as long as everyone is using the same keytab file, I'd expect all  
to be well.  However, I find that when I do net ads join it doesn't  
create or modify a keytab file that I can find.  I have use kerberos  
keytab = true in my smb.conf file, but I can't see that it actually  
does anything.


	Can anyone steer me in the right direction here?  I've been chasing  
this for over a month.


--Rob


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


[Samba] samba ldap configuration attributes needed

2009-03-18 Thread John Goubeaux

Folks,

I am attempting to get an install of Samba authenticating against a Sun 
DS as a stand alone smb server eg. non PDC.
I have the host OS ( solaris 10) properly configured to authenticate 
against the directory, the directory schema modified
to accept the PosixAccount and SambaSamAccount objectclasses, smb.conf 
configured and in place and a test user in place as well.


My two question(s) are:

What are the minimal directory account attributes needed to get a user 
to authenticate?  eg my understanding is that many
of the attributes are used for a samba server acting as a PDC, which in 
my case are not needed.


My user base in the DS allready exists, so I will want to just add the 
extra necessary object classes and attributes to the
user's existing entries. What mechanism determines what the  sambaSID  
and  sambaPrimaryGroupSID values are ? I am unclear
how these values are derived and what they are based on. Realize my 
users already have passwd's in their entries that I am hoping

to not have to change.

any help is appreciated!   -john

--

John Goubeaux
Systems Administrator
Gevirtz Graduate School of Education
UC Santa Barbara
Phelps Hall 3534
805 893-8190

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


Re: [Samba] Can SAMBA make a kerberos keytab on Solaris 10?

2009-03-18 Thread Rob LaRose


Hi Edward,

	Thanks for the link.  Creating a computer account  keytab on the  
Windows side and copying it back to the Solaris works for my other  
services (ssh, etc.) but net ads join clobbers the existing account  
and creates a new one which no longer matches the keytab.  Is there a  
way to get samba / net ads join to just use the existing kerberos  
setup / keytab and NOT try to create a new account?


--Rob

On Mar 18, 2009, at 4:56 PM, Edward Irvine wrote:


Rob,



Hi Samba people!

	I'm trying to use SAMBA (the version included with Solaris 10)  
with an AD.


	NET ADS JOIN works like a charm to create a computer object in the  
AD for the solaris machine, and SAMBA users are authenticating  
without a problem.  This is good.  HOWEVER -- I also need other  
protocols (including ssh and Xinet KA-Share) to authenticate users.


	As I understand it, SAMBA uses kerberos to authenticate against  
AD, so as long as everyone is using the same keytab file, I'd  
expect all to be well.  However, I find that when I do net ads join  
it doesn't create or modify a keytab file that I can find.  I have  
use kerberos keytab = true in my smb.conf file, but I can't see  
that it actually does anything.


	Can anyone steer me in the right direction here?  I've been  
chasing this for over a month.




The following is a little dated. But see the section in http://users.tpg.com.au/adsl95uc/gssapi-sol10/ 
 that refers to Windows Active Directory. This is how you get a  
vailid /etc/krb5/krb5.keytab file onto your Solaris machine.


Not that you don't *have* to have a krb5.keytab file on your Solaris  
Servers to authenticate users, unless you want to do single sign on.


If you just want to have same sign on (same username, same password)  
then all the PAM stack needs is a correctly configured /etc/krb5/ 
krb5.conf file.


There is a section about building your own PAM/OpenSSH/Kerberos  
stack which you may be able to ignore.



--Rob


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






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


[Samba] Log entries with truncated service names

2009-03-18 Thread Miguel Medalha

Hello all

I am running Samba 3.2.8 over CentOS 5.2, with a LDAP back end.

On some days, not all, strange entries appear in the Samba logs. I get 
entries like this:



[2009/03/18 18:35:09,  0] smbd/service.c:make_connection(1366)
 aurora (192.168.0.22) couldn't find service netlogo


The real name of the service is of course netlogon.

Another example for the share named comercial:


[2009/03/13 09:48:00,  0] smbd/service.c:make_connection(1366)
 ana (192.168.0.12) couldn't find service comercia


And so on. The name of the service appears truncated by ONE character, 
the last one.


There is one less frequent exception to this rule:


[2009/03/18 14:51:47,  0] smbd/service.c:make_connection(1366)
 antonia (192.168.0.21) couldn't find service


Here the service name does not appear at all. Al I get is one space 
after the word service.


Does anyone here know why this happens?


Also, the logs get filled with:


[datetime,  0] smbd/trans2.c:call_trans2qfsinfo(2568)
call_trans2qfsinfo: not an allowed info level (0x102) on IPC$.


This goes to several hundreds of kilobytes in just a few days:

What does this mean? I asked about this twice here but I didn't get an 
answer. I searched in Google and I got nothing.


I would appreciate any help with these issues.
Thank you.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Re: Can not clear Read-only attribute - thank you

2009-03-18 Thread Jaroslav Fojtik
Dear Jeremy Allison,

 Logged it as bug #6186, I've attached the patch and described
 the workaround.
Thank you very much for this fix. I confirm that it works and I hope that 
it will be incorporated into a next Samba release.

You could also close this bug:
 https://bugzilla.samba.org/show_bug.cgi?id=4325


   Yes, you'll lose current DOS attribute mapping, but you'll
   be much happier in the long run :-).
I also do not want to loose existing attributes and rebuild reiserfs with 
support of extended attributes. I am interested only in Read Only attribute.

regards
   Jara


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


Re: [Samba] Re: Can not clear Read-only attribute - thank you

2009-03-18 Thread Jeremy Allison
On Thu, Mar 19, 2009 at 12:23:55AM +0100, Jaroslav Fojtik wrote:
 Dear Jeremy Allison,
 
  Logged it as bug #6186, I've attached the patch and described
  the workaround.
 Thank you very much for this fix. I confirm that it works and I hope that 
 it will be incorporated into a next Samba release.

Yes, it's in the git trees so it will be in all future Samba releases.

 You could also close this bug:
  https://bugzilla.samba.org/show_bug.cgi?id=4325

Thanks, will do.

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


Re: [Samba] Samba Configuration

2009-03-18 Thread guido

 Thanks Guido. I think I'm a little confused though :)

 Here's what I added to my smb.conf:

 [admin]
  path = /home/admin
  browseable = yes
  public = no
  writable =  yes
  nt acl support = no
  valid users = @admin

 When I do ls -ld /home/admin I get:

 drwx--x--x 8 admin wheel 4096 2009-03-18 00:49 /home/admin

 And getfacl:

 getfacl /home/admin
 # file: home/admin
 # owner: admin
 # group: wheel
 user::rwx
 group::--x
 other::---

 So should I create a group, say addrw and add my admin user to it?

 Thank you again, I appreciate your help.

I only give you an example of my groups. I have a group called addrw.
You should have a group in /home/admin (not wheel) and 770 (not 711).
Then, join the users that need to write in the share to this group.

Now in the linux filesystem they have the right to write in the share.

I hope this helps.

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


Re: [Samba] Samba Configuration

2009-03-18 Thread ElihuJ

Hey Guido, I just wanted to update you in that I got it working.

For /home/admin, I chowned admin:admins, and chmoded 770

After doing this I was able to write to the directory as admin, and also
write to it as admin on XP. Also other users are unable to see the
directory.

Just wanted to say thank you again for the help.
-- 
View this message in context: 
http://www.nabble.com/Samba-Configuration-tp22566973p22592802.html
Sent from the Samba - General mailing list archive at Nabble.com.

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


Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-497-g211e255

2009-03-18 Thread Stefan (metze) Metzmacher
Hi Zach,

   switch (transport-options.signing) {
   case SMB_SIGNING_OFF:
 @@ -187,7 +188,7 @@ static void continue_socket(struct composite_context 
 *creq)
   state-negprot.in.capabilities  = 0;
   unix_to_nt_time(state-negprot.in.start_time, time(NULL));
   dialects[0] = SMB2_DIALECT_REVISION;
 - dialects[1] = 0;
 + dialects[1] = SMB21_DIALECT_REVISION;
   state-negprot.in.dialects = dialects;

There was a reason to also provide dialect '0', as I want to work
against early longhorn beta versions.

I think the list should be:

dialects[0] = SMB21_DIALECT_REVISION;
dialects[1] = SMB2_DIALECT_REVISION;
dialects[2] = 0;

If we want SMB21_DIALECT_REVISION.

   req = smb2_negprot_send(transport, state-negprot);
 diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
 index d1d5b84..3cc3ec2 100644
 --- a/source4/libcli/smb2/smb2.h
 +++ b/source4/libcli/smb2/smb2.h
 @@ -35,6 +35,7 @@ struct smb2_negotiate {
   NTTIME system_time;
   NTTIME server_start_time;
   uint16_t security_mode;
 + uint16_t dialect_revision;
  };
  
  /* this is the context for the smb2 transport layer */
 @@ -226,8 +227,9 @@ struct smb2_request {
  
  #define SMB2_MAGIC 0x424D53FE /* 0xFE 'S' 'M' 'B' */
  
 -/* the dialect we support */
 +/* the dialects we support */
  #define SMB2_DIALECT_REVISION   0x202
 +#define SMB21_DIALECT_REVISION  0x210
  
  /* SMB2 negotiate security_mode */
  #define SMB2_NEGOTIATE_SIGNING_ENABLED   0x01
 diff --git a/source4/libcli/util/nterr.c b/source4/libcli/util/nterr.c
 index 4e7cdf5..7f544b5 100644
 --- a/source4/libcli/util/nterr.c
 +++ b/source4/libcli/util/nterr.c
 @@ -549,6 +549,7 @@ static const nt_err_code_struct nt_errs[] =
   { NT_STATUS_OBJECTID_NOT_FOUND, NT_STATUS_OBJECTID_NOT_FOUND },
   { NT_STATUS_DOWNGRADE_DETECTED, NT_STATUS_DOWNGRADE_DETECTED },
   { NT_STATUS_DS_BUSY, NT_STATUS_DS_BUSY },
 + { XXX_INVALID_RANGE, NT_STATUS_WIN7_INVALID_RANGE },

Could you please fix this, and let us display the correct name?

metze



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-523-g93c2057

2009-03-18 Thread Stefan Metzmacher
The branch, master has been updated
   via  93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a (commit)
   via  3b8dd79f2bc775ed94130565ec2c4383a4864348 (commit)
   via  0685031ccfc09feb0ad070df1c1a1d0cef5874f2 (commit)
   via  450252d2a1981fb04eb62eb095c1b762a96f7727 (commit)
   via  b659daf81f31678f7447545d015bd9d1db8811b9 (commit)
   via  339ea0503d5ce3bf85cf61528956345c73c668c6 (commit)
   via  445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2 (commit)
  from  cd7f62ab70337ccee7ba652e7d9ed8d299938bff (commit)

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


- Log -
commit 93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 17:27:30 2009 +0100

s3:winbindd: accept new connections via fd events

metze

commit 3b8dd79f2bc775ed94130565ec2c4383a4864348
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:14:20 2009 +0100

s3:winbindd: move non event related code out of process_loop() in the the 
caller

metze

commit 0685031ccfc09feb0ad070df1c1a1d0cef5874f2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:06:12 2009 +0100

s3:winbindd: remove unused close_winbindd_socket() function

metze

commit 450252d2a1981fb04eb62eb095c1b762a96f7727
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:55:39 2009 +0100

s3:smbd: use tevent_loop_once() in the parent event loop

metze

commit b659daf81f31678f7447545d015bd9d1db8811b9
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:47:57 2009 +0100

s3:printing: use tevent_loop_wait() instead of manual looping

metze

commit 339ea0503d5ce3bf85cf61528956345c73c668c6
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:56:11 2009 +0100

s3:printing: use a fd event to monitor the pipe to the parent

metze

commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:48:40 2009 +0100

s3:smbd: don't exit the parent when we have no connections

This code path can't really happen anymore, because
launchd support was removed with commit 
e5a951325a6cac8567af3a66de6d2df577508ae4.
But it's confusing to have that code there...

metze

---

Summary of changes:
 source3/printing/printing.c   |   82 ++--
 source3/smbd/server.c |   46 +
 source3/winbindd/winbindd.c   |  195 +++--
 source3/winbindd/winbindd_proto.h |1 -
 source3/winbindd/winbindd_util.c  |   18 
 5 files changed, 155 insertions(+), 187 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 71c6344..8524cfb 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -1387,6 +1387,18 @@ static void print_queue_receive(struct messaging_context 
*msg,
return;
 }
 
+static void printing_pause_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
+ uint16_t flags,
+ void *private_data)
+{
+   /*
+* If pause_pipe[1] is closed it means the parent smbd
+* and children exited or aborted.
+*/
+   exit_server_cleanly(NULL);
+}
+
 static pid_t background_lpq_updater_pid = -1;
 
 /
@@ -1415,6 +1427,9 @@ void start_background_queue(void)
}
 
if(background_lpq_updater_pid == 0) {
+   struct tevent_fd *fde;
+   int ret;
+
/* Child. */
DEBUG(5,(start_background_queue: background LPQ thread 
started\n));
 
@@ -1440,60 +1455,21 @@ void start_background_queue(void)
messaging_register(smbd_messaging_context(), NULL,
   MSG_PRINTER_UPDATE, print_queue_receive);
 
-   DEBUG(5,(start_background_queue: background LPQ thread waiting 
for messages\n));
-   while (1) {
-   fd_set r_fds, w_fds;
-   int ret;
-   struct timeval to;
-   int maxfd = 0;
-
-   /* Process a signal and timed events now... */
-   if (run_events(smbd_event_context(), 0, NULL, NULL)) {
-   continue;
-   }
-
-   to.tv_sec = SMBD_SELECT_TIMEOUT;
-   to.tv_usec = 0;
-
-   /*
-* Setup the select fd sets.
-*/
-
-   FD_ZERO(r_fds);
-   FD_ZERO(w_fds);
-
-   /*
-* Are there any timed 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-525-g342b436

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  342b436691a99fc6c4fb6606e7148e5c7ddd56c1 (commit)
   via  048013ddaa8b5c65ae6db0d8dbfd1e7082f75fc5 (commit)
  from  93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a (commit)

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


- Log -
commit 342b436691a99fc6c4fb6606e7148e5c7ddd56c1
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 03:00:37 2009 +0100

s4-smbtorture: fix spoolss_EnumPrinterKey callers in RPC-SPOOLSS-WIN test.

Kai, please check.

Guenther

commit 048013ddaa8b5c65ae6db0d8dbfd1e7082f75fc5
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 03:11:37 2009 +0100

spoolss: fix ndr_push_spoolss_EnumPrinterDataEx.

Guenther

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c  |1 +
 source4/torture/rpc/spoolss_win.c |   35 ---
 2 files changed, 13 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 16a9b1b..97624d3 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -458,6 +458,7 @@ enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct 
ndr_push *ndr, int f
_r.out.count= r-out.count;
_r.out.needed   = r-out.needed;
_r.out.result   = r-out.result;
+   _r.out.info = data_blob(NULL, 0);
if (r-in.offered = *r-out.needed) {
struct __spoolss_EnumPrinterDataEx __r;
_ndr_info = ndr_push_init_ctx(ndr, 
ndr-iconv_convenience);
diff --git a/source4/torture/rpc/spoolss_win.c 
b/source4/torture/rpc/spoolss_win.c
index 5624e68..c50cbfb 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -33,7 +33,7 @@ struct test_spoolss_win_context {
union spoolss_PrinterInfo *current_info;
 
/* EnumPrinterKeys */
-   char *printer_keys;
+   const char **printer_keys;
 };
 
 /* This is a convenience function for all OpenPrinterEx calls */
@@ -389,9 +389,7 @@ static bool test_EnumPrinterKey(struct torture_context 
*tctx,
 
torture_assert_werr_ok(tctx, epk.out.result, EnumPrinterKey failed);
 
-   convert_string_talloc_convenience(ctx, 
lp_iconv_convenience(tctx-lp_ctx), CH_UTF16,
-   CH_UNIX, epk.out.key_buffer, *epk.out.needed,
-   (void**)ctx-printer_keys, NULL, false);
+   ctx-printer_keys = key_buffer;
 
return true;
 }
@@ -458,7 +456,7 @@ static bool test_WinXP(struct torture_context *tctx, struct 
dcerpc_pipe *p)
 * code, the unused_handle structures are used for that. */
struct policy_handle unused_handle1, unused_handle2;
char *server_name;
-   char *key_pointer;
+   uint32_t i;
 
ntvfs_init(tctx-lp_ctx);
 
@@ -533,24 +531,15 @@ static bool test_WinXP(struct torture_context *tctx, 
struct dcerpc_pipe *p)
ret = test_EnumForms(tctx, p, handle03, 0);
 
ret = test_EnumPrinterKey(tctx, p, handle03, , ctx);
-   key_pointer = ctx-printer_keys;
-   while(*key_pointer != '\0') {
-   char *end_pointer;
-   char *key_name;
-
-   for(end_pointer = key_pointer; *end_pointer != '\0';
-   ++end_pointer) {
-   /* Do nothing, just move the pointer */
-   }
-   key_name = talloc_strndup(tctx, key_pointer,
-   end_pointer - key_pointer);
-
-   ret = test_EnumPrinterKey(tctx, p, handle03, key_name,
-   tmp_ctx);
-   ret = test_EnumPrinterDataEx(tctx, p, handle03, key_name, 0,
-   WERR_OK);
-
-   key_pointer = ++end_pointer;
+
+   for (i=0; ctx-printer_keys[i] != NULL; i++) {
+
+   ret = test_EnumPrinterKey(tctx, p, handle03,
+  ctx-printer_keys[i],
+  tmp_ctx);
+   ret = test_EnumPrinterDataEx(tctx, p, handle03,
+ ctx-printer_keys[i], 0,
+ WERR_OK);
}
 
ret = test_EnumPrinterDataEx(tctx, p, handle03, , 0,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-472-g9575c97

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  9575c97439c0e691f87a6cb094bdc5c9d464c3ce (commit)
   via  b60698bfbe5a3656c89d600453b198c003220227 (commit)
  from  38a225667ee7e59d4fcf090255a077c0660130ea (commit)

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


- Log -
commit 9575c97439c0e691f87a6cb094bdc5c9d464c3ce
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 03:00:37 2009 +0100

s4-smbtorture: fix spoolss_EnumPrinterKey callers in RPC-SPOOLSS-WIN test.

Kai, please check.

Guenther
(cherry picked from commit 342b436691a99fc6c4fb6606e7148e5c7ddd56c1)

commit b60698bfbe5a3656c89d600453b198c003220227
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 03:11:37 2009 +0100

spoolss: fix ndr_push_spoolss_EnumPrinterDataEx.

Guenther
(cherry picked from commit 048013ddaa8b5c65ae6db0d8dbfd1e7082f75fc5)

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c  |1 +
 source4/torture/rpc/spoolss_win.c |   35 ---
 2 files changed, 13 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 16a9b1b..97624d3 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -458,6 +458,7 @@ enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct 
ndr_push *ndr, int f
_r.out.count= r-out.count;
_r.out.needed   = r-out.needed;
_r.out.result   = r-out.result;
+   _r.out.info = data_blob(NULL, 0);
if (r-in.offered = *r-out.needed) {
struct __spoolss_EnumPrinterDataEx __r;
_ndr_info = ndr_push_init_ctx(ndr, 
ndr-iconv_convenience);
diff --git a/source4/torture/rpc/spoolss_win.c 
b/source4/torture/rpc/spoolss_win.c
index 5624e68..c50cbfb 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -33,7 +33,7 @@ struct test_spoolss_win_context {
union spoolss_PrinterInfo *current_info;
 
/* EnumPrinterKeys */
-   char *printer_keys;
+   const char **printer_keys;
 };
 
 /* This is a convenience function for all OpenPrinterEx calls */
@@ -389,9 +389,7 @@ static bool test_EnumPrinterKey(struct torture_context 
*tctx,
 
torture_assert_werr_ok(tctx, epk.out.result, EnumPrinterKey failed);
 
-   convert_string_talloc_convenience(ctx, 
lp_iconv_convenience(tctx-lp_ctx), CH_UTF16,
-   CH_UNIX, epk.out.key_buffer, *epk.out.needed,
-   (void**)ctx-printer_keys, NULL, false);
+   ctx-printer_keys = key_buffer;
 
return true;
 }
@@ -458,7 +456,7 @@ static bool test_WinXP(struct torture_context *tctx, struct 
dcerpc_pipe *p)
 * code, the unused_handle structures are used for that. */
struct policy_handle unused_handle1, unused_handle2;
char *server_name;
-   char *key_pointer;
+   uint32_t i;
 
ntvfs_init(tctx-lp_ctx);
 
@@ -533,24 +531,15 @@ static bool test_WinXP(struct torture_context *tctx, 
struct dcerpc_pipe *p)
ret = test_EnumForms(tctx, p, handle03, 0);
 
ret = test_EnumPrinterKey(tctx, p, handle03, , ctx);
-   key_pointer = ctx-printer_keys;
-   while(*key_pointer != '\0') {
-   char *end_pointer;
-   char *key_name;
-
-   for(end_pointer = key_pointer; *end_pointer != '\0';
-   ++end_pointer) {
-   /* Do nothing, just move the pointer */
-   }
-   key_name = talloc_strndup(tctx, key_pointer,
-   end_pointer - key_pointer);
-
-   ret = test_EnumPrinterKey(tctx, p, handle03, key_name,
-   tmp_ctx);
-   ret = test_EnumPrinterDataEx(tctx, p, handle03, key_name, 0,
-   WERR_OK);
-
-   key_pointer = ++end_pointer;
+
+   for (i=0; ctx-printer_keys[i] != NULL; i++) {
+
+   ret = test_EnumPrinterKey(tctx, p, handle03,
+  ctx-printer_keys[i],
+  tmp_ctx);
+   ret = test_EnumPrinterDataEx(tctx, p, handle03,
+ ctx-printer_keys[i], 0,
+ WERR_OK);
}
 
ret = test_EnumPrinterDataEx(tctx, p, handle03, , 0,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-529-gef02342

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  ef0234256296451517b65113d9f5cfcffa95d736 (commit)
   via  f68334129409d1e194877689bb6a691ac4025dc9 (commit)
   via  2687d29f7c4dbb2bbb88a85558cae43c2ce8e7f8 (commit)
   via  ec47aac299eeef1fd83448c3ce2fe02892df8e8c (commit)
  from  342b436691a99fc6c4fb6606e7148e5c7ddd56c1 (commit)

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


- Log -
commit ef0234256296451517b65113d9f5cfcffa95d736
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:25:15 2009 +0100

s3-spoolss: add registry_value_to_printer_enum_value.

Guenther

commit f68334129409d1e194877689bb6a691ac4025dc9
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:22:11 2009 +0100

s3-spoolss: add SPOOLSS_BUFFER_ARRAY macro.

Guenther

commit 2687d29f7c4dbb2bbb88a85558cae43c2ce8e7f8
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:11:05 2009 +0100

spoolss: add ndr_size_spoolss_EnumPrinterDataEx_info in spoolss helper.

Guenther

commit ec47aac299eeef1fd83448c3ce2fe02892df8e8c
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:10:25 2009 +0100

spoolss: rename NDR_SPOOLSS_SIZE_ENUM macro to NDR_SPOOLSS_SIZE_ENUM_LEVEL 
in
spoolss helper.

Guenther

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c|   39 ++
 librpc/ndr/ndr_spoolss_buf.h|2 +
 source3/rpc_server/srv_spoolss_nt.c |   34 ++
 3 files changed, 66 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 97624d3..f30c17b 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -173,7 +173,7 @@
 } while (0)
 
 /* TODO: set _ndr_info-flags correct */
-#define NDR_SPOOLSS_SIZE_ENUM(fn) do { \
+#define NDR_SPOOLSS_SIZE_ENUM_LEVEL(fn) do { \
struct __##fn __r;\
DATA_BLOB _data_blob_info;\
struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, 
iconv_convenience);\
@@ -187,6 +187,21 @@
return _data_blob_info.length;\
 } while(0)
 
+/* TODO: set _ndr_info-flags correct */
+#define NDR_SPOOLSS_SIZE_ENUM(fn) do { \
+   struct __##fn __r;\
+   DATA_BLOB _data_blob_info;\
+   struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, 
iconv_convenience);\
+   if (!_ndr_info) return 0;\
+   _ndr_info-flags|=0;\
+   __r.in.count= count;\
+   __r.out.info= info;\
+   _NDR_CHECK_UINT32(ndr_push___##fn(_ndr_info, NDR_OUT, __r)); \
+   _data_blob_info = ndr_push_blob(_ndr_info);\
+   return _data_blob_info.length;\
+} while(0)
+
+
 /*
   spoolss_EnumPrinters
 */
@@ -216,7 +231,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinters(struct 
ndr_pull *ndr, int flags,
 
 uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_PrinterInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinters);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinters);
 }
 
 /*
@@ -252,7 +267,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumJobs(struct ndr_pull 
*ndr, int flags, str
 
 uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_JobInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumJobs);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumJobs);
 }
 
 /*
@@ -284,7 +299,7 @@ enum ndr_err_code 
ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int
 
 uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_DriverInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinterDrivers);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers);
 }
 
 /*
@@ -312,7 +327,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumForms(struct 
ndr_pull *ndr, int flags, st
 
 uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_FormInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumForms);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumForms);
 }
 
 /*
@@ -340,7 +355,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPorts(struct 
ndr_pull *ndr, int flags, st
 
 uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_PortInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPorts);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPorts);
 }
 
 /*
@@ -368,7 +383,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumMonitors(struct 
ndr_pull *ndr, int 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-476-gf894065

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  f894065e736ec325f4251530ea66952122a1785f (commit)
   via  d7d6ab1026728c1bdd42355d8b0302a9f9596756 (commit)
   via  9febc1daffb2ac66e9e85246f8d37f6f1f0dcdfa (commit)
   via  5b145b94bb34c0490c7c19184d13c2295b2493c4 (commit)
  from  9575c97439c0e691f87a6cb094bdc5c9d464c3ce (commit)

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


- Log -
commit f894065e736ec325f4251530ea66952122a1785f
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:25:15 2009 +0100

s3-spoolss: add registry_value_to_printer_enum_value.

Guenther
(cherry picked from commit ef0234256296451517b65113d9f5cfcffa95d736)

commit d7d6ab1026728c1bdd42355d8b0302a9f9596756
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:22:11 2009 +0100

s3-spoolss: add SPOOLSS_BUFFER_ARRAY macro.

Guenther
(cherry picked from commit f68334129409d1e194877689bb6a691ac4025dc9)

commit 9febc1daffb2ac66e9e85246f8d37f6f1f0dcdfa
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:11:05 2009 +0100

spoolss: add ndr_size_spoolss_EnumPrinterDataEx_info in spoolss helper.

Guenther
(cherry picked from commit 2687d29f7c4dbb2bbb88a85558cae43c2ce8e7f8)

commit 5b145b94bb34c0490c7c19184d13c2295b2493c4
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 11:10:25 2009 +0100

spoolss: rename NDR_SPOOLSS_SIZE_ENUM macro to NDR_SPOOLSS_SIZE_ENUM_LEVEL 
in
spoolss helper.

Guenther
(cherry picked from commit ec47aac299eeef1fd83448c3ce2fe02892df8e8c)

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c|   39 ++
 librpc/ndr/ndr_spoolss_buf.h|2 +
 source3/rpc_server/srv_spoolss_nt.c |   34 ++
 3 files changed, 66 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 97624d3..f30c17b 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -173,7 +173,7 @@
 } while (0)
 
 /* TODO: set _ndr_info-flags correct */
-#define NDR_SPOOLSS_SIZE_ENUM(fn) do { \
+#define NDR_SPOOLSS_SIZE_ENUM_LEVEL(fn) do { \
struct __##fn __r;\
DATA_BLOB _data_blob_info;\
struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, 
iconv_convenience);\
@@ -187,6 +187,21 @@
return _data_blob_info.length;\
 } while(0)
 
+/* TODO: set _ndr_info-flags correct */
+#define NDR_SPOOLSS_SIZE_ENUM(fn) do { \
+   struct __##fn __r;\
+   DATA_BLOB _data_blob_info;\
+   struct ndr_push *_ndr_info = ndr_push_init_ctx(mem_ctx, 
iconv_convenience);\
+   if (!_ndr_info) return 0;\
+   _ndr_info-flags|=0;\
+   __r.in.count= count;\
+   __r.out.info= info;\
+   _NDR_CHECK_UINT32(ndr_push___##fn(_ndr_info, NDR_OUT, __r)); \
+   _data_blob_info = ndr_push_blob(_ndr_info);\
+   return _data_blob_info.length;\
+} while(0)
+
+
 /*
   spoolss_EnumPrinters
 */
@@ -216,7 +231,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrinters(struct 
ndr_pull *ndr, int flags,
 
 uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_PrinterInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinters);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinters);
 }
 
 /*
@@ -252,7 +267,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumJobs(struct ndr_pull 
*ndr, int flags, str
 
 uint32_t ndr_size_spoolss_EnumJobs_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_JobInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumJobs);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumJobs);
 }
 
 /*
@@ -284,7 +299,7 @@ enum ndr_err_code 
ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int
 
 uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_DriverInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumPrinterDrivers);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers);
 }
 
 /*
@@ -312,7 +327,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumForms(struct 
ndr_pull *ndr, int flags, st
 
 uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience *iconv_convenience, uint32_t level, uint32_t count, union 
spoolss_FormInfo *info)
 {
-   NDR_SPOOLSS_SIZE_ENUM(spoolss_EnumForms);
+   NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumForms);
 }
 
 /*
@@ -340,7 +355,7 @@ enum ndr_err_code ndr_pull_spoolss_EnumPorts(struct 
ndr_pull *ndr, int flags, st
 
 uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, struct 
smb_iconv_convenience 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-530-gb074765

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  b0747651b94d6d1176dad00277b6135300ed57d7 (commit)
  from  ef0234256296451517b65113d9f5cfcffa95d736 (commit)

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


- Log -
commit b0747651b94d6d1176dad00277b6135300ed57d7
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 12:46:40 2009 +0100

s3-printing: use marshall/unmarshall_sec_desc_buf in sec_desc_upg_fn().

Guenther

---

Summary of changes:
 source3/printing/nt_printing.c |   31 +--
 1 files changed, 5 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 6b6803d..8e6fe1f 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -343,7 +343,7 @@ static bool upgrade_to_version_3(void)
 static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
 TDB_DATA data, void *state )
 {
-   prs_struct ps;
+   NTSTATUS status;
SEC_DESC_BUF *sd_orig = NULL;
SEC_DESC_BUF *sd_new, *sd_store;
SEC_DESC *sec, *new_sec;
@@ -362,22 +362,16 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, 
TDB_DATA key,
 
/* upgrade the security descriptor */
 
-   ZERO_STRUCT( ps );
-
-   prs_init_empty( ps, ctx, UNMARSHALL );
-   prs_give_memory( ps, (char *)data.dptr, data.dsize, False );
-
-   if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_orig, ps, 1 ) ) {
+   status = unmarshall_sec_desc_buf(ctx, data.dptr, data.dsize, sd_orig);
+   if (!NT_STATUS_IS_OK(status)) {
/* delete bad entries */
DEBUG(0,(sec_desc_upg_fn: Failed to parse original sec_desc 
for %si.  Deleting\n,
(const char *)key.dptr ));
tdb_delete( tdb_printers, key );
-   prs_mem_free( ps );
return 0;
}
 
if (!sd_orig) {
-   prs_mem_free( ps );
return 0;
}
sec = sd_orig-sd;
@@ -385,7 +379,6 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA 
key,
/* is this even valid? */
 
if ( !sec-dacl ) {
-   prs_mem_free( ps );
return 0;
}
 
@@ -416,45 +409,31 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, 
TDB_DATA key,
 global_sid_Builtin_Administrators,
 NULL, NULL, size_new_sec );
if (!new_sec) {
-   prs_mem_free( ps );
return 0;
}
sd_new = make_sec_desc_buf( ctx, size_new_sec, new_sec );
if (!sd_new) {
-   prs_mem_free( ps );
return 0;
}
 
if ( !(sd_store = sec_desc_merge( ctx, sd_new, sd_orig )) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to update sec_desc for %s\n, 
key.dptr ));
-   prs_mem_free( ps );
return 0;
}
 
-   prs_mem_free( ps );
-
/* store it back */
 
sd_size = ndr_size_security_descriptor(sd_store-sd, NULL, 0)
+ sizeof(SEC_DESC_BUF);
-   if ( !prs_init(ps, sd_size, ctx, MARSHALL) ) {
-   DEBUG(0,(sec_desc_upg_fn: Failed to allocate prs memory for 
%s\n, key.dptr ));
-   return 0;
-   }
 
-   if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_store, ps, 1 ) ) {
+   status = marshall_sec_desc_buf(ctx, sd_store, data.dptr, data.dsize);
+   if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,(sec_desc_upg_fn: Failed to parse new sec_desc for 
%s\n, key.dptr ));
-   prs_mem_free( ps );
return 0;
}
 
-   data.dptr = (uint8 *)prs_data_p( ps );
-   data.dsize = sd_size;
-
result = tdb_store( tdb_printers, key, data, TDB_REPLACE );
 
-   prs_mem_free( ps );
-
/* 0 to continue and non-zero to stop traversal */
 
return (result == -1);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-477-g74ce96d

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  74ce96d6b3762df63dafb69444ae8159495006b5 (commit)
  from  f894065e736ec325f4251530ea66952122a1785f (commit)

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


- Log -
commit 74ce96d6b3762df63dafb69444ae8159495006b5
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 12:46:40 2009 +0100

s3-printing: use marshall/unmarshall_sec_desc_buf in sec_desc_upg_fn().

Guenther
(cherry picked from commit b0747651b94d6d1176dad00277b6135300ed57d7)

---

Summary of changes:
 source3/printing/nt_printing.c |   31 +--
 1 files changed, 5 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 6b6803d..8e6fe1f 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -343,7 +343,7 @@ static bool upgrade_to_version_3(void)
 static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
 TDB_DATA data, void *state )
 {
-   prs_struct ps;
+   NTSTATUS status;
SEC_DESC_BUF *sd_orig = NULL;
SEC_DESC_BUF *sd_new, *sd_store;
SEC_DESC *sec, *new_sec;
@@ -362,22 +362,16 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, 
TDB_DATA key,
 
/* upgrade the security descriptor */
 
-   ZERO_STRUCT( ps );
-
-   prs_init_empty( ps, ctx, UNMARSHALL );
-   prs_give_memory( ps, (char *)data.dptr, data.dsize, False );
-
-   if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_orig, ps, 1 ) ) {
+   status = unmarshall_sec_desc_buf(ctx, data.dptr, data.dsize, sd_orig);
+   if (!NT_STATUS_IS_OK(status)) {
/* delete bad entries */
DEBUG(0,(sec_desc_upg_fn: Failed to parse original sec_desc 
for %si.  Deleting\n,
(const char *)key.dptr ));
tdb_delete( tdb_printers, key );
-   prs_mem_free( ps );
return 0;
}
 
if (!sd_orig) {
-   prs_mem_free( ps );
return 0;
}
sec = sd_orig-sd;
@@ -385,7 +379,6 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA 
key,
/* is this even valid? */
 
if ( !sec-dacl ) {
-   prs_mem_free( ps );
return 0;
}
 
@@ -416,45 +409,31 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, 
TDB_DATA key,
 global_sid_Builtin_Administrators,
 NULL, NULL, size_new_sec );
if (!new_sec) {
-   prs_mem_free( ps );
return 0;
}
sd_new = make_sec_desc_buf( ctx, size_new_sec, new_sec );
if (!sd_new) {
-   prs_mem_free( ps );
return 0;
}
 
if ( !(sd_store = sec_desc_merge( ctx, sd_new, sd_orig )) ) {
DEBUG(0,(sec_desc_upg_fn: Failed to update sec_desc for %s\n, 
key.dptr ));
-   prs_mem_free( ps );
return 0;
}
 
-   prs_mem_free( ps );
-
/* store it back */
 
sd_size = ndr_size_security_descriptor(sd_store-sd, NULL, 0)
+ sizeof(SEC_DESC_BUF);
-   if ( !prs_init(ps, sd_size, ctx, MARSHALL) ) {
-   DEBUG(0,(sec_desc_upg_fn: Failed to allocate prs memory for 
%s\n, key.dptr ));
-   return 0;
-   }
 
-   if ( !sec_io_desc_buf( sec_desc_upg_fn, sd_store, ps, 1 ) ) {
+   status = marshall_sec_desc_buf(ctx, sd_store, data.dptr, data.dsize);
+   if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,(sec_desc_upg_fn: Failed to parse new sec_desc for 
%s\n, key.dptr ));
-   prs_mem_free( ps );
return 0;
}
 
-   data.dptr = (uint8 *)prs_data_p( ps );
-   data.dsize = sd_size;
-
result = tdb_store( tdb_printers, key, data, TDB_REPLACE );
 
-   prs_mem_free( ps );
-
/* 0 to continue and non-zero to stop traversal */
 
return (result == -1);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-531-g9fdeb7f

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  9fdeb7f7b319dca5dbd1fdaf24f01fb19e124fe6 (commit)
  from  b0747651b94d6d1176dad00277b6135300ed57d7 (commit)

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


- Log -
commit 9fdeb7f7b319dca5dbd1fdaf24f01fb19e124fe6
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 13:22:51 2009 +0100

s3-spoolss: remove custom syntax_spoolss and use the syntax defined in IDL.

Guenther

---

Summary of changes:
 source3/include/rpc_dce.h   |2 -
 source3/rpc_client/cli_pipe.c   |2 +-
 source3/rpc_parse/parse_rpc.c   |   10 -
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 source3/rpcclient/cmd_spoolss.c |   68 +-
 source3/utils/net_ads.c |2 +-
 source3/utils/net_rpc.c |   36 +-
 source3/utils/net_rpc_printer.c |   10 +++---
 8 files changed, 60 insertions(+), 72 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index b63f0ea..580b14f 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -159,8 +159,6 @@ enum schannel_direction {
 /* RPC_IFACE */
 typedef struct ndr_syntax_id RPC_IFACE;
 
-extern const struct ndr_syntax_id syntax_spoolss;
-
 #define RPC_IFACE_LEN (UUID_SIZE + 4)
 
 /* RPC_HDR - dce rpc header */
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index ef10c12..57f49fb 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -65,7 +65,7 @@ static const struct pipe_id_info {
{ PIPE_SRVSVC,  ndr_table_srvsvc.syntax_id },
{ PIPE_WKSSVC,  ndr_table_wkssvc.syntax_id },
{ PIPE_WINREG,  ndr_table_winreg.syntax_id },
-   { PIPE_SPOOLSS, syntax_spoolss },
+   { PIPE_SPOOLSS, ndr_table_spoolss.syntax_id },
{ PIPE_NETDFS,  ndr_table_netdfs.syntax_id },
{ PIPE_ECHO,ndr_table_rpcecho.syntax_id },
{ PIPE_SHUTDOWN,ndr_table_initshutdown.syntax_id },
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 1477a4c..14a4eff 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -639,13 +639,3 @@ bool smb_io_rpc_auth_schannel_chk(const char *desc, int 
auth_len,
 
return True;
 }
-
-const struct ndr_syntax_id syntax_spoolss = {
-   {
-   0x12345678, 0x1234, 0xabcd,
-   { 0xef, 0x00 },
-   { 0x01, 0x23,
- 0x45, 0x67, 0x89, 0xab }
-   }, 0x01
-};
-
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 97223c9..2d191c1 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2634,7 +2634,7 @@ static bool spoolss_connect_to_client(struct 
rpc_pipe_client **pp_pipe,
 * Now start the NT Domain stuff :-).
 */
 
-   ret = cli_rpc_pipe_open_noauth(the_cli, syntax_spoolss, pp_pipe);
+   ret = cli_rpc_pipe_open_noauth(the_cli, ndr_table_spoolss.syntax_id, 
pp_pipe);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(2,(spoolss_connect_to_client: unable to open the spoolss 
pipe on machine %s. Error was : %s.\n,
remote_machine, nt_errstr(ret)));
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 053f0b2..ed877d0 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2888,7 +2888,7 @@ static WERROR cmd_spoolss_printercmp(struct 
rpc_pipe_client *cli,
if ( !NT_STATUS_IS_OK(nt_status) )
return WERR_GENERAL_FAILURE;
 
-   nt_status = cli_rpc_pipe_open_noauth(cli_server2, syntax_spoolss,
+   nt_status = cli_rpc_pipe_open_noauth(cli_server2, 
ndr_table_spoolss.syntax_id,
 cli2);
if (!NT_STATUS_IS_OK(nt_status)) {
printf(failed to open spoolss pipe on server %s (%s)\n,
@@ -3121,39 +3121,39 @@ struct cmd_set spoolss_commands[] = {
 
{ SPOOLSS  },
 
-   { adddriver,  RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_addprinterdriver,   syntax_spoolss, NULL, Add a print driver,
   },
-   { addprinter, RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_addprinterex,   syntax_spoolss, NULL, Add a printer, 
   },
-   { deldriver,  RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_deletedriver,   syntax_spoolss, NULL, Delete a printer 
driver,  },
-   { deldriverex,RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_deletedriverex, syntax_spoolss, NULL, Delete a printer driver 
with files,   },
-   { enumdata,   RPC_RTYPE_WERROR, NULL, cmd_spoolss_enum_data,  
syntax_spoolss, NULL, 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-478-ge13b545

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  e13b545ca914d3d84b94f1d7ecb958f093f3143b (commit)
  from  74ce96d6b3762df63dafb69444ae8159495006b5 (commit)

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


- Log -
commit e13b545ca914d3d84b94f1d7ecb958f093f3143b
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 13:22:51 2009 +0100

s3-spoolss: remove custom syntax_spoolss and use the syntax defined in IDL.

Guenther
(cherry picked from commit 9fdeb7f7b319dca5dbd1fdaf24f01fb19e124fe6)

---

Summary of changes:
 source3/include/rpc_dce.h   |2 -
 source3/rpc_client/cli_pipe.c   |2 +-
 source3/rpc_parse/parse_rpc.c   |   10 -
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 source3/rpcclient/cmd_spoolss.c |   68 +-
 source3/utils/net_ads.c |2 +-
 source3/utils/net_rpc.c |   36 +-
 source3/utils/net_rpc_printer.c |   10 +++---
 8 files changed, 60 insertions(+), 72 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h
index b63f0ea..580b14f 100644
--- a/source3/include/rpc_dce.h
+++ b/source3/include/rpc_dce.h
@@ -159,8 +159,6 @@ enum schannel_direction {
 /* RPC_IFACE */
 typedef struct ndr_syntax_id RPC_IFACE;
 
-extern const struct ndr_syntax_id syntax_spoolss;
-
 #define RPC_IFACE_LEN (UUID_SIZE + 4)
 
 /* RPC_HDR - dce rpc header */
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index ef10c12..57f49fb 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -65,7 +65,7 @@ static const struct pipe_id_info {
{ PIPE_SRVSVC,  ndr_table_srvsvc.syntax_id },
{ PIPE_WKSSVC,  ndr_table_wkssvc.syntax_id },
{ PIPE_WINREG,  ndr_table_winreg.syntax_id },
-   { PIPE_SPOOLSS, syntax_spoolss },
+   { PIPE_SPOOLSS, ndr_table_spoolss.syntax_id },
{ PIPE_NETDFS,  ndr_table_netdfs.syntax_id },
{ PIPE_ECHO,ndr_table_rpcecho.syntax_id },
{ PIPE_SHUTDOWN,ndr_table_initshutdown.syntax_id },
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 1477a4c..14a4eff 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -639,13 +639,3 @@ bool smb_io_rpc_auth_schannel_chk(const char *desc, int 
auth_len,
 
return True;
 }
-
-const struct ndr_syntax_id syntax_spoolss = {
-   {
-   0x12345678, 0x1234, 0xabcd,
-   { 0xef, 0x00 },
-   { 0x01, 0x23,
- 0x45, 0x67, 0x89, 0xab }
-   }, 0x01
-};
-
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 97223c9..2d191c1 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2634,7 +2634,7 @@ static bool spoolss_connect_to_client(struct 
rpc_pipe_client **pp_pipe,
 * Now start the NT Domain stuff :-).
 */
 
-   ret = cli_rpc_pipe_open_noauth(the_cli, syntax_spoolss, pp_pipe);
+   ret = cli_rpc_pipe_open_noauth(the_cli, ndr_table_spoolss.syntax_id, 
pp_pipe);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(2,(spoolss_connect_to_client: unable to open the spoolss 
pipe on machine %s. Error was : %s.\n,
remote_machine, nt_errstr(ret)));
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 053f0b2..ed877d0 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2888,7 +2888,7 @@ static WERROR cmd_spoolss_printercmp(struct 
rpc_pipe_client *cli,
if ( !NT_STATUS_IS_OK(nt_status) )
return WERR_GENERAL_FAILURE;
 
-   nt_status = cli_rpc_pipe_open_noauth(cli_server2, syntax_spoolss,
+   nt_status = cli_rpc_pipe_open_noauth(cli_server2, 
ndr_table_spoolss.syntax_id,
 cli2);
if (!NT_STATUS_IS_OK(nt_status)) {
printf(failed to open spoolss pipe on server %s (%s)\n,
@@ -3121,39 +3121,39 @@ struct cmd_set spoolss_commands[] = {
 
{ SPOOLSS  },
 
-   { adddriver,  RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_addprinterdriver,   syntax_spoolss, NULL, Add a print driver,
   },
-   { addprinter, RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_addprinterex,   syntax_spoolss, NULL, Add a printer, 
   },
-   { deldriver,  RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_deletedriver,   syntax_spoolss, NULL, Delete a printer 
driver,  },
-   { deldriverex,RPC_RTYPE_WERROR, NULL, 
cmd_spoolss_deletedriverex, syntax_spoolss, NULL, Delete a printer driver 
with files,   },
-   { enumdata,   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-532-g9ab8953

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  9ab8953d74491d7ab4a30c242aa0935efb38f857 (commit)
  from  9fdeb7f7b319dca5dbd1fdaf24f01fb19e124fe6 (commit)

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


- Log -
commit 9ab8953d74491d7ab4a30c242aa0935efb38f857
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:05:44 2009 +0100

s3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.

Guenther

---

Summary of changes:
 source3/include/proto.h|2 +-
 source3/rpc_parse/parse_misc.c |   24 
 source3/rpc_parse/parse_prs.c  |   24 
 3 files changed, 25 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1c2abc6..5019cb6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5698,7 +5698,6 @@ bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, 
uint32 buffer, prs_struct *
 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
 void init_unistr3(UNISTR3 *str, const char *buf);
 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int 
depth);
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 uint32 str_len_uni(UNISTR *source);
 bool policy_handle_is_valid(const POLICY_HND *hnd);
 
@@ -5748,6 +5747,7 @@ bool prs_pointer( const char *name, prs_struct *ps, int 
depth,
 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS 
*status);
 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS 
*status);
 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index e948afd..d966790 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -632,30 +632,6 @@ bool smb_io_unistr3(const char *desc, UNISTR3 *name, 
prs_struct *ps, int depth)
 }
 
 /***
- Stream a uint64_struct
- /
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
-{
-   if (UNMARSHALLING(ps)) {
-   uint32 high, low;
-
-   if (!prs_uint32(name, ps, depth+1, low))
-   return False;
-
-   if (!prs_uint32(name, ps, depth+1, high))
-   return False;
-
-   *data64 = ((uint64_t)high  32) + low;
-
-   return True;
-   } else {
-   uint32 high = (*data64)  32, low = (*data64)  0x;
-   return prs_uint32(name, ps, depth+1, low)  
-  prs_uint32(name, ps, depth+1, high);
-   }
-}
-
-/***
 return the length of a UNISTR string.
 /  
 
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index bc9202c..c420189 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -760,6 +760,30 @@ bool prs_int32(const char *name, prs_struct *ps, int 
depth, int32 *data32)
 }
 
 /***
+ Stream a uint64_struct
+ /
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
+{
+   if (UNMARSHALLING(ps)) {
+   uint32 high, low;
+
+   if (!prs_uint32(name, ps, depth+1, low))
+   return False;
+
+   if (!prs_uint32(name, ps, depth+1, high))
+   return False;
+
+   *data64 = ((uint64_t)high  32) + low;
+
+   return True;
+   } else {
+   uint32 high = (*data64)  32, low = (*data64)  0x;
+   return prs_uint32(name, ps, depth+1, low) 
+  prs_uint32(name, ps, depth+1, high);
+   }
+}
+
+/***
  Stream a NTSTATUS
  /
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-479-gd001b19

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  d001b199a1cf73b7c7f4574191698325871527d9 (commit)
  from  e13b545ca914d3d84b94f1d7ecb958f093f3143b (commit)

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


- Log -
commit d001b199a1cf73b7c7f4574191698325871527d9
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:05:44 2009 +0100

s3-rpc_parse: move prs_uint64 to rpc_parse/parse_prs.c.

Guenther
(cherry picked from commit 9ab8953d74491d7ab4a30c242aa0935efb38f857)

---

Summary of changes:
 source3/include/proto.h|2 +-
 source3/rpc_parse/parse_misc.c |   24 
 source3/rpc_parse/parse_prs.c  |   24 
 3 files changed, 25 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1c2abc6..5019cb6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5698,7 +5698,6 @@ bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, 
uint32 buffer, prs_struct *
 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
 void init_unistr3(UNISTR3 *str, const char *buf);
 bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int 
depth);
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 uint32 str_len_uni(UNISTR *source);
 bool policy_handle_is_valid(const POLICY_HND *hnd);
 
@@ -5748,6 +5747,7 @@ bool prs_pointer( const char *name, prs_struct *ps, int 
depth,
 bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
 bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32);
 bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32);
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
 bool prs_ntstatus(const char *name, prs_struct *ps, int depth, NTSTATUS 
*status);
 bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS 
*status);
 bool prs_werror(const char *name, prs_struct *ps, int depth, WERROR *status);
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index e948afd..d966790 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -632,30 +632,6 @@ bool smb_io_unistr3(const char *desc, UNISTR3 *name, 
prs_struct *ps, int depth)
 }
 
 /***
- Stream a uint64_struct
- /
-bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
-{
-   if (UNMARSHALLING(ps)) {
-   uint32 high, low;
-
-   if (!prs_uint32(name, ps, depth+1, low))
-   return False;
-
-   if (!prs_uint32(name, ps, depth+1, high))
-   return False;
-
-   *data64 = ((uint64_t)high  32) + low;
-
-   return True;
-   } else {
-   uint32 high = (*data64)  32, low = (*data64)  0x;
-   return prs_uint32(name, ps, depth+1, low)  
-  prs_uint32(name, ps, depth+1, high);
-   }
-}
-
-/***
 return the length of a UNISTR string.
 /  
 
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index bc9202c..c420189 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -760,6 +760,30 @@ bool prs_int32(const char *name, prs_struct *ps, int 
depth, int32 *data32)
 }
 
 /***
+ Stream a uint64_struct
+ /
+bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64)
+{
+   if (UNMARSHALLING(ps)) {
+   uint32 high, low;
+
+   if (!prs_uint32(name, ps, depth+1, low))
+   return False;
+
+   if (!prs_uint32(name, ps, depth+1, high))
+   return False;
+
+   *data64 = ((uint64_t)high  32) + low;
+
+   return True;
+   } else {
+   uint32 high = (*data64)  32, low = (*data64)  0x;
+   return prs_uint32(name, ps, depth+1, low) 
+  prs_uint32(name, ps, depth+1, high);
+   }
+}
+
+/***
  Stream a NTSTATUS
  /
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-505-g00b65cc

2009-03-18 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  00b65cc6ebcb4c67259e7fa618f6d961f7117396 (commit)
   via  ca31920af281ba9ea8f466ed0264118737a1b055 (commit)
   via  e270b4f0f62699469cbaad024c893fe84142a256 (commit)
   via  3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d (commit)
   via  c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b (commit)
   via  c9eac30fbbd4af6d73b803b19f0dec8ce72baf59 (commit)
   via  a527e24b80abf5aeaafdd67db21b5b021d1effe0 (commit)
   via  a6a4acddbcfcb36d581c1c7d15ddb8405c0b2bb2 (commit)
   via  c0a0f504e1477648542aae27b8a58d4db4867d84 (commit)
   via  8053941b377d3fd2e58e67f68eecb2551be49c10 (commit)
   via  7fcb16a79681a24ca3b96ec73bc44b43e57c3c8f (commit)
   via  d88a254c5d2fbdda642d469924411d4d6d5f8422 (commit)
   via  54af7b9da45dcef881d9fee7c414d363ca6cdab4 (commit)
   via  ba8a0b59d6f486f09d73e0bcac5712584c9580cc (commit)
   via  de7125980d237e9a8aa126f155bbc84c96bad37e (commit)
   via  f18ff6728e97580ff980385137e8e7973ae1d785 (commit)
   via  c742112da583809f47e40f2e4b48713d2e81edda (commit)
   via  c0bc27fc57260191e35464b63e114163d291d4da (commit)
   via  1eb7ad106499865713c28847f491aae10f37beb7 (commit)
   via  606b55d220c354f11299d633b1387afd4bc47c55 (commit)
   via  646c93ee8f7e6f52b55900923b5db9d7a1571742 (commit)
   via  5c75c1406fd6bdd6319070cb4098929c28eeba94 (commit)
   via  f136ed96e46c1d4b6aec13daf468ada2fdf59715 (commit)
   via  868cc328b189144c49901692206534c9b2729fbd (commit)
   via  82f9d29c4b6cd5cc1c5901d801a28c2f649d4205 (commit)
   via  3106e9fac2316cbbb06261f54aa86a7a2e77e2b4 (commit)
  from  d001b199a1cf73b7c7f4574191698325871527d9 (commit)

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


- Log -
commit 00b65cc6ebcb4c67259e7fa618f6d961f7117396
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 17:27:30 2009 +0100

s3:winbindd: accept new connections via fd events

metze
(cherry picked from commit 93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a)

commit ca31920af281ba9ea8f466ed0264118737a1b055
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:14:20 2009 +0100

s3:winbindd: move non event related code out of process_loop() in the the 
caller

metze
(cherry picked from commit 3b8dd79f2bc775ed94130565ec2c4383a4864348)

commit e270b4f0f62699469cbaad024c893fe84142a256
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:06:12 2009 +0100

s3:winbindd: remove unused close_winbindd_socket() function

metze
(cherry picked from commit 0685031ccfc09feb0ad070df1c1a1d0cef5874f2)

commit 3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:55:39 2009 +0100

s3:smbd: use tevent_loop_once() in the parent event loop

metze
(cherry picked from commit 450252d2a1981fb04eb62eb095c1b762a96f7727)

commit c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:47:57 2009 +0100

s3:printing: use tevent_loop_wait() instead of manual looping

metze
(cherry picked from commit b659daf81f31678f7447545d015bd9d1db8811b9)

commit c9eac30fbbd4af6d73b803b19f0dec8ce72baf59
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:56:11 2009 +0100

s3:printing: use a fd event to monitor the pipe to the parent

metze
(cherry picked from commit 339ea0503d5ce3bf85cf61528956345c73c668c6)

commit a527e24b80abf5aeaafdd67db21b5b021d1effe0
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:48:40 2009 +0100

s3:smbd: don't exit the parent when we have no connections

This code path can't really happen anymore, because
launchd support was removed with commit 
e5a951325a6cac8567af3a66de6d2df577508ae4.
But it's confusing to have that code there...

metze
(cherry picked from commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2)

commit a6a4acddbcfcb36d581c1c7d15ddb8405c0b2bb2
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:31 2009 +0100

s4:build: require tevent 0.9.5

metze
(cherry picked from commit e95d0b548e344dbc8cb3dd0a0f29854711bd0cac)

commit c0a0f504e1477648542aae27b8a58d4db4867d84
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:01 2009 +0100

tevent: change version to 0.9.5 after the ABI has changed

metze
(cherry picked from commit 7d07266ca26f7069269601043b713a91f1a4693c)

commit 8053941b377d3fd2e58e67f68eecb2551be49c10
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:13:34 2009 +0100

tevent: store the location where a request was finished

This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.

metze
(cherry picked from commit 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-539-g31106cd

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  31106cdace883de16d5810386d69fc3da7d37c61 (commit)
   via  e61c9ca36d48167ea14d7d7cc41ac43a803d3aca (commit)
   via  8b730ca1d8431d8d1eddee9523c64e60e06bc59c (commit)
   via  9744a7058c1f4805c9ca12080fd8ccffe3a038b8 (commit)
   via  65151077b31e8cc4a8bfedd8fb4a186804d36b9a (commit)
   via  0e21ea39d51583d9395628255dc34c173629a724 (commit)
   via  f9ddc6ae4ac750dd349f8103d045eb23bc4416a0 (commit)
  from  9ab8953d74491d7ab4a30c242aa0935efb38f857 (commit)

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


- Log -
commit 31106cdace883de16d5810386d69fc3da7d37c61
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:37:33 2009 +0100

s3-spoolss: use printer and job notify enums provided by idl.

Guenther

commit e61c9ca36d48167ea14d7d7cc41ac43a803d3aca
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:16:25 2009 +0100

s3-spoolss: fix spoolss server after spoolss_Field changes.

Guenther

commit 8b730ca1d8431d8d1eddee9523c64e60e06bc59c
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:10:52 2009 +0100

s3-rpcclient: fix spoolss notify test after spoolss_Field changes.

Guenther

commit 9744a7058c1f4805c9ca12080fd8ccffe3a038b8
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:10:11 2009 +0100

s4-smbtorture: fix spoolss notify test after spoolss_Field changes.

Guenther

commit 65151077b31e8cc4a8bfedd8fb4a186804d36b9a
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:06:40 2009 +0100

spoolss: add custom ndr_print_spoolss_Field.

Guenther

commit 0e21ea39d51583d9395628255dc34c173629a724
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:48:48 2009 +0100

s3: re-run make samba3-idl.

Guenther

commit f9ddc6ae4ac750dd349f8103d045eb23bc4416a0
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:48:06 2009 +0100

spoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag 
enums.

Guenther

---

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c |  193 ++--
 librpc/gen_ndr/ndr_spoolss.h |8 +-
 librpc/gen_ndr/spoolss.h |  177 -
 librpc/idl/spoolss.idl   |   95 +++-
 librpc/ndr/ndr_spoolss_buf.c |   22 
 librpc/ndr/ndr_spoolss_buf.h |1 +
 source3/include/proto.h  |2 +-
 source3/printing/notify.c|   30 +++---
 source3/rpc_server/srv_spoolss_nt.c  |  206 +-
 source3/rpcclient/cmd_spoolss.c  |8 +-
 source4/torture/rpc/spoolss_notify.c |8 +-
 11 files changed, 503 insertions(+), 247 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index d340b81..f5b161a 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -16964,13 +16964,13 @@ _PUBLIC_ void 
ndr_print_spoolss_PrinterChangeFlags(struct ndr_print *ndr, const
ndr-depth--;
 }
 
-static enum ndr_err_code ndr_push_spoolss_Field(struct ndr_push *ndr, int 
ndr_flags, enum spoolss_Field r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobNotifyField(struct ndr_push 
*ndr, int ndr_flags, enum spoolss_JobNotifyField r)
 {
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_spoolss_Field(struct ndr_pull *ndr, int 
ndr_flags, enum spoolss_Field *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobNotifyField(struct ndr_pull 
*ndr, int ndr_flags, enum spoolss_JobNotifyField *r)
 {
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, v));
@@ -16978,37 +16978,86 @@ static enum ndr_err_code 
ndr_pull_spoolss_Field(struct ndr_pull *ndr, int ndr_fl
return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, 
enum spoolss_Field r)
+_PUBLIC_ void ndr_print_spoolss_JobNotifyField(struct ndr_print *ndr, const 
char *name, enum spoolss_JobNotifyField r)
 {
const char *val = NULL;
 
switch (r) {
-   case SPOOLSS_FIELD_SERVER_NAME: val = 
SPOOLSS_FIELD_SERVER_NAME; break;
-   case SPOOLSS_FIELD_PRINTER_NAME: val = 
SPOOLSS_FIELD_PRINTER_NAME; break;
-   case SPOOLSS_FIELD_SHARE_NAME: val = 
SPOOLSS_FIELD_SHARE_NAME; break;
-   case SPOOLSS_FIELD_PORT_NAME: val = SPOOLSS_FIELD_PORT_NAME; 
break;
-   case SPOOLSS_FIELD_DRIVER_NAME: val = 
SPOOLSS_FIELD_DRIVER_NAME; break;
-   case SPOOLSS_FIELD_COMMENT: val = SPOOLSS_FIELD_COMMENT; 
break;
-   case SPOOLSS_FIELD_LOCATION: val = SPOOLSS_FIELD_LOCATION; 
break;
-   case 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-512-g5b10355

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  5b1035546673343f922679a1280b5203c1c1abc4 (commit)
   via  a5fc8ef7e61442c14f0f39bb86ae57a50ddedc95 (commit)
   via  0a876be5de06d0ca627bfdfe8769c08c5876f436 (commit)
   via  d63021ec7bc1b0dcfa500c258116bca268f71079 (commit)
   via  9fb3b11b9846ec259f9fffd629db59567db10f18 (commit)
   via  c39be71ac70155c19098737d6dce42772b5bf9c6 (commit)
   via  5c2b396dde289a6f37bb9cb40ae1ef6ec784818e (commit)
  from  00b65cc6ebcb4c67259e7fa618f6d961f7117396 (commit)

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


- Log -
commit 5b1035546673343f922679a1280b5203c1c1abc4
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:37:33 2009 +0100

s3-spoolss: use printer and job notify enums provided by idl.

Guenther
(cherry picked from commit 31106cdace883de16d5810386d69fc3da7d37c61)

commit a5fc8ef7e61442c14f0f39bb86ae57a50ddedc95
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:16:25 2009 +0100

s3-spoolss: fix spoolss server after spoolss_Field changes.

Guenther
(cherry picked from commit e61c9ca36d48167ea14d7d7cc41ac43a803d3aca)

commit 0a876be5de06d0ca627bfdfe8769c08c5876f436
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:10:52 2009 +0100

s3-rpcclient: fix spoolss notify test after spoolss_Field changes.

Guenther
(cherry picked from commit 8b730ca1d8431d8d1eddee9523c64e60e06bc59c)

commit d63021ec7bc1b0dcfa500c258116bca268f71079
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:10:11 2009 +0100

s4-smbtorture: fix spoolss notify test after spoolss_Field changes.

Guenther
(cherry picked from commit 9744a7058c1f4805c9ca12080fd8ccffe3a038b8)

commit 9fb3b11b9846ec259f9fffd629db59567db10f18
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:06:40 2009 +0100

spoolss: add custom ndr_print_spoolss_Field.

Guenther
(cherry picked from commit 65151077b31e8cc4a8bfedd8fb4a186804d36b9a)

commit c39be71ac70155c19098737d6dce42772b5bf9c6
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:48:48 2009 +0100

s3: re-run make samba3-idl.

Guenther
(cherry picked from commit 0e21ea39d51583d9395628255dc34c173629a724)

commit 5c2b396dde289a6f37bb9cb40ae1ef6ec784818e
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:48:06 2009 +0100

spoolss: make spoolss_Field a nodiscriminant union of 2 sets of notify flag 
enums.

Guenther
(cherry picked from commit f9ddc6ae4ac750dd349f8103d045eb23bc4416a0)

---

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c |  193 ++--
 librpc/gen_ndr/ndr_spoolss.h |8 +-
 librpc/gen_ndr/spoolss.h |  177 -
 librpc/idl/spoolss.idl   |   95 +++-
 librpc/ndr/ndr_spoolss_buf.c |   22 
 librpc/ndr/ndr_spoolss_buf.h |1 +
 source3/include/proto.h  |2 +-
 source3/printing/notify.c|   30 +++---
 source3/rpc_server/srv_spoolss_nt.c  |  206 +-
 source3/rpcclient/cmd_spoolss.c  |8 +-
 source4/torture/rpc/spoolss_notify.c |8 +-
 11 files changed, 503 insertions(+), 247 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index d340b81..f5b161a 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -16964,13 +16964,13 @@ _PUBLIC_ void 
ndr_print_spoolss_PrinterChangeFlags(struct ndr_print *ndr, const
ndr-depth--;
 }
 
-static enum ndr_err_code ndr_push_spoolss_Field(struct ndr_push *ndr, int 
ndr_flags, enum spoolss_Field r)
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobNotifyField(struct ndr_push 
*ndr, int ndr_flags, enum spoolss_JobNotifyField r)
 {
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_spoolss_Field(struct ndr_pull *ndr, int 
ndr_flags, enum spoolss_Field *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobNotifyField(struct ndr_pull 
*ndr, int ndr_flags, enum spoolss_JobNotifyField *r)
 {
uint16_t v;
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, v));
@@ -16978,37 +16978,86 @@ static enum ndr_err_code 
ndr_pull_spoolss_Field(struct ndr_pull *ndr, int ndr_fl
return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, 
enum spoolss_Field r)
+_PUBLIC_ void ndr_print_spoolss_JobNotifyField(struct ndr_print *ndr, const 
char *name, enum spoolss_JobNotifyField r)
 {
const char *val = NULL;
 
switch (r) {
-   case SPOOLSS_FIELD_SERVER_NAME: val = 
SPOOLSS_FIELD_SERVER_NAME; break;
-   case 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-540-g0cfb1ae

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  0cfb1aea29929c0605d299d71784787aa516bc2a (commit)
  from  31106cdace883de16d5810386d69fc3da7d37c61 (commit)

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


- Log -
commit 0cfb1aea29929c0605d299d71784787aa516bc2a
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:38:40 2009 +0100

s3-spoolss: use pidl for _spoolss_EnumPrinterDataEx.

Please note that this has been the last call in samba3 that was
using hand-marshalled rpc. With this commit all named pipe rpc services
in samba3 have now fully moved to pidl generated code :-)

Guenther

---

Summary of changes:
 source3/include/proto.h |1 -
 source3/rpc_server/srv_spoolss.c|   22 +-
 source3/rpc_server/srv_spoolss_nt.c |  152 ++-
 3 files changed, 60 insertions(+), 115 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index deee1bb..2f4c360 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6032,7 +6032,6 @@ struct spoolss_DeviceMode *construct_dev_mode(TALLOC_CTX 
*mem_ctx,
 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char 
*portname, const char *uri );
 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, 
NT_PRINTER_INFO_LEVEL *printer);
 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
-WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX 
*q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
 
 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
 
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 1b9cdb3..301d4a7 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -464,27 +464,7 @@ static bool api_spoolss_enumprinterkey(pipes_struct *p)
 
 static bool api_spoolss_enumprinterdataex(pipes_struct *p)
 {
-   SPOOL_Q_ENUMPRINTERDATAEX q_u;
-   SPOOL_R_ENUMPRINTERDATAEX r_u;
-   prs_struct *data = p-in_data.data;
-   prs_struct *rdata = p-out_data.rdata;
-   
-   ZERO_STRUCT(q_u);
-   ZERO_STRUCT(r_u);
-   
-   if(!spoolss_io_q_enumprinterdataex(, q_u, data, 0)) {
-   DEBUG(0,(spoolss_io_q_enumprinterdataex: unable to unmarshall 
SPOOL_Q_ENUMPRINTERDATAEX.\n));
-   return False;
-   }
-   
-   r_u.status = _spoolss_enumprinterdataex(p, q_u, r_u);
-   
-   if(!spoolss_io_r_enumprinterdataex(, r_u, rdata, 0)) {
-   DEBUG(0,(spoolss_io_r_enumprinterdataex: unable to marshall 
SPOOL_R_ENUMPRINTERDATAEX.\n));
-   return False;
-   }
-
-   return True;
+   return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMPRINTERDATAEX);
 }
 
 /
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index a31a7d3..d3e342b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9014,34 +9014,32 @@ static WERROR 
registry_value_to_printer_enum_value(TALLOC_CTX *mem_ctx,
return WERR_OK;
 }
 
-/
- * spoolss_enumprinterdataex
- /
+/
+ _spoolss_EnumPrinterDataEx
+/
 
-WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX 
*q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u)
+WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
+ struct spoolss_EnumPrinterDataEx *r)
 {
-   POLICY_HND  *handle = q_u-handle;
-   uint32  in_size = q_u-size;
-   uint32  num_entries,
-   needed;
+   uint32_tcount = 0;
NT_PRINTER_INFO_LEVEL   *printer = NULL;
-   PRINTER_ENUM_VALUES *enum_values = NULL;
+   struct spoolss_PrinterEnumValues *info = NULL;
NT_PRINTER_DATA *p_data;
-   fstring key;
-   Printer_entry   *Printer = find_printer_index_by_hnd(p, handle);
+   Printer_entry   *Printer = find_printer_index_by_hnd(p, r-in.handle);
int snum;
WERROR  result;
int key_index;
int i;
-   REGISTRY_VALUE  *val;
-   char*value_name;
-   uint32  data_len;
 
+   DEBUG(4,(_spoolss_EnumPrinterDataEx\n));
 
-   DEBUG(4,(_spoolss_enumprinterdataex\n));
+   *r-out.count = 0;
+   *r-out.needed = 0;
+   *r-out.info = NULL;
 
if (!Printer) {
-   

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-513-g0a20f7d

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  0a20f7df770f2d460ff4034baf3ad29a96be4dd3 (commit)
  from  5b1035546673343f922679a1280b5203c1c1abc4 (commit)

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


- Log -
commit 0a20f7df770f2d460ff4034baf3ad29a96be4dd3
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:38:40 2009 +0100

s3-spoolss: use pidl for _spoolss_EnumPrinterDataEx.

Please note that this has been the last call in samba3 that was
using hand-marshalled rpc. With this commit all named pipe rpc services
in samba3 have now fully moved to pidl generated code :-)

Guenther
(cherry picked from commit 0cfb1aea29929c0605d299d71784787aa516bc2a)

---

Summary of changes:
 source3/include/proto.h |1 -
 source3/rpc_server/srv_spoolss.c|   22 +-
 source3/rpc_server/srv_spoolss_nt.c |  152 ++-
 3 files changed, 60 insertions(+), 115 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index deee1bb..2f4c360 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6032,7 +6032,6 @@ struct spoolss_DeviceMode *construct_dev_mode(TALLOC_CTX 
*mem_ctx,
 WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char 
*portname, const char *uri );
 bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, 
NT_PRINTER_INFO_LEVEL *printer);
 WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines );
-WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX 
*q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u);
 
 /* The following definitions come from rpc_server/srv_srvsvc_nt.c  */
 
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index 1b9cdb3..301d4a7 100644
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -464,27 +464,7 @@ static bool api_spoolss_enumprinterkey(pipes_struct *p)
 
 static bool api_spoolss_enumprinterdataex(pipes_struct *p)
 {
-   SPOOL_Q_ENUMPRINTERDATAEX q_u;
-   SPOOL_R_ENUMPRINTERDATAEX r_u;
-   prs_struct *data = p-in_data.data;
-   prs_struct *rdata = p-out_data.rdata;
-   
-   ZERO_STRUCT(q_u);
-   ZERO_STRUCT(r_u);
-   
-   if(!spoolss_io_q_enumprinterdataex(, q_u, data, 0)) {
-   DEBUG(0,(spoolss_io_q_enumprinterdataex: unable to unmarshall 
SPOOL_Q_ENUMPRINTERDATAEX.\n));
-   return False;
-   }
-   
-   r_u.status = _spoolss_enumprinterdataex(p, q_u, r_u);
-   
-   if(!spoolss_io_r_enumprinterdataex(, r_u, rdata, 0)) {
-   DEBUG(0,(spoolss_io_r_enumprinterdataex: unable to marshall 
SPOOL_R_ENUMPRINTERDATAEX.\n));
-   return False;
-   }
-
-   return True;
+   return proxy_spoolss_call(p, NDR_SPOOLSS_ENUMPRINTERDATAEX);
 }
 
 /
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index a31a7d3..d3e342b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9014,34 +9014,32 @@ static WERROR 
registry_value_to_printer_enum_value(TALLOC_CTX *mem_ctx,
return WERR_OK;
 }
 
-/
- * spoolss_enumprinterdataex
- /
+/
+ _spoolss_EnumPrinterDataEx
+/
 
-WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX 
*q_u, SPOOL_R_ENUMPRINTERDATAEX *r_u)
+WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
+ struct spoolss_EnumPrinterDataEx *r)
 {
-   POLICY_HND  *handle = q_u-handle;
-   uint32  in_size = q_u-size;
-   uint32  num_entries,
-   needed;
+   uint32_tcount = 0;
NT_PRINTER_INFO_LEVEL   *printer = NULL;
-   PRINTER_ENUM_VALUES *enum_values = NULL;
+   struct spoolss_PrinterEnumValues *info = NULL;
NT_PRINTER_DATA *p_data;
-   fstring key;
-   Printer_entry   *Printer = find_printer_index_by_hnd(p, handle);
+   Printer_entry   *Printer = find_printer_index_by_hnd(p, r-in.handle);
int snum;
WERROR  result;
int key_index;
int i;
-   REGISTRY_VALUE  *val;
-   char*value_name;
-   uint32  data_len;
 
+   DEBUG(4,(_spoolss_EnumPrinterDataEx\n));
 
-   DEBUG(4,(_spoolss_enumprinterdataex\n));
+   *r-out.count = 0;
+   *r-out.needed = 0;
+   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-544-g7fbdf8a

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  7fbdf8aae93f143c879de705936279f42eb8ee6f (commit)
   via  36d07858069ed8710a0ad822535074bed77ec130 (commit)
   via  a502392541bcb45babbb8ca57e17306aa726ee9b (commit)
   via  a4e999c7e3214de26bdc7a20d5ec25d4ffdf152d (commit)
  from  0cfb1aea29929c0605d299d71784787aa516bc2a (commit)

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


- Log -
commit 7fbdf8aae93f143c879de705936279f42eb8ee6f
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:38:36 2009 +0100

s3-spoolss: remove include/rpc_spoolss.h.

Guenther

commit 36d07858069ed8710a0ad822535074bed77ec130
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:45:35 2009 +0100

s3-spoolss: remove rpc_server/srv_spoolss.c alltogether.

Guenther

commit a502392541bcb45babbb8ca57e17306aa726ee9b
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:43:31 2009 +0100

s3-spoolss: remove rpc_parse/parse_spoolss.c alltogether.

Good-Bye, last hand-marshalled rpc functions, rest in peace.

Guenther

commit a4e999c7e3214de26bdc7a20d5ec25d4ffdf152d
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:41:47 2009 +0100

s3-spoolss: remove old spoolss_EnumPrinterDataEx.

Guenther

---

Summary of changes:
 source3/Makefile.in   |7 +-
 source3/configure.in  |6 +-
 source3/include/includes.h|1 -
 source3/include/proto.h   |   12 -
 source3/include/rpc_spoolss.h |  205 -
 source3/rpc_parse/parse_spoolss.c |  280 --
 source3/rpc_server/srv_spoolss.c  |  591 -
 7 files changed, 6 insertions(+), 1096 deletions(-)
 delete mode 100644 source3/include/rpc_spoolss.h
 delete mode 100644 source3/rpc_parse/parse_spoolss.c
 delete mode 100644 source3/rpc_server/srv_spoolss.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9a1beaf..a393fea 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -577,7 +577,7 @@ RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs_nt.o \
 
 RPC_DFS_OBJ =  ../librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
 
-RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o \
+RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss_nt.o \
  ../librpc/gen_ndr/srv_spoolss.o
 
 RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog_nt.o \
@@ -590,8 +590,7 @@ RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o 
../librpc/gen_ndr/srv_echo.o
 
 RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
 
-RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2) \
-rpc_parse/parse_spoolss.o
+RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2)
 
 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o rpc_client/rpc_transport_np.o \
rpc_client/rpc_transport_sock.o rpc_client/rpc_transport_smbd.o
@@ -2278,7 +2277,7 @@ bin/librpc_dsset...@shlibext@: $(BINARY_PREREQS) 
$(RPC_DSSETUP_OBJ)
@echo Linking $@
@$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
 
-bin/librpc_spools...@shlibext@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
+bin/librpc_spool...@shlibext@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
@echo Linking $@
@$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
 
diff --git a/source3/configure.in b/source3/configure.in
index 993290d..dc5850a 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -433,7 +433,7 @@ AC_SUBST(DYNEXP)
 
 dnl Add modules that have to be built by default here
 dnl These have to be built static:
-default_static_modules=pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc 
rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl 
rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss2 rpc_eventlog 
auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin 
auth_netlogond vfs_default nss_info_template
+default_static_modules=pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc 
rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl 
rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam 
auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin 
auth_netlogond vfs_default nss_info_template
 
 dnl These are preferably build shared, and static if dlopen() is not available
 default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit 
vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap 
vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 
auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot 
vfs_acl_xattr vfs_acl_tdb vfs_smb_traffic_analyzer vfs_preopen
@@ -6090,7 +6090,7 @@ do
 done
 
 dnl Always build these modules static
-MODULE_rpc_spoolss2=STATIC
+MODULE_rpc_spoolss=STATIC
 MODULE_rpc_srvsvc=STATIC
 MODULE_idmap_tdb=STATIC
 MODULE_idmap_passdb=STATIC
@@ -6134,7 +6134,7 @@ 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-517-g2471cb6

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  2471cb64f7d2d2e7eb594b1cf904af9d6befd389 (commit)
   via  931e48a757d40fb4dd5099560fe31afad201464c (commit)
   via  82e78e67e00863437ef26914ff8d85007509b620 (commit)
   via  92a9ede4ffc82a66531e716535db34416b387340 (commit)
  from  0a20f7df770f2d460ff4034baf3ad29a96be4dd3 (commit)

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


- Log -
commit 2471cb64f7d2d2e7eb594b1cf904af9d6befd389
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 16:38:36 2009 +0100

s3-spoolss: remove include/rpc_spoolss.h.

Guenther
(cherry picked from commit 7fbdf8aae93f143c879de705936279f42eb8ee6f)

commit 931e48a757d40fb4dd5099560fe31afad201464c
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:45:35 2009 +0100

s3-spoolss: remove rpc_server/srv_spoolss.c alltogether.

Guenther
(cherry picked from commit 36d07858069ed8710a0ad822535074bed77ec130)

commit 82e78e67e00863437ef26914ff8d85007509b620
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:43:31 2009 +0100

s3-spoolss: remove rpc_parse/parse_spoolss.c alltogether.

Good-Bye, last hand-marshalled rpc functions, rest in peace.

Guenther
(cherry picked from commit a502392541bcb45babbb8ca57e17306aa726ee9b)

commit 92a9ede4ffc82a66531e716535db34416b387340
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 00:41:47 2009 +0100

s3-spoolss: remove old spoolss_EnumPrinterDataEx.

Guenther
(cherry picked from commit a4e999c7e3214de26bdc7a20d5ec25d4ffdf152d)

---

Summary of changes:
 source3/Makefile.in   |7 +-
 source3/configure.in  |6 +-
 source3/include/includes.h|1 -
 source3/include/proto.h   |   12 -
 source3/include/rpc_spoolss.h |  205 -
 source3/rpc_parse/parse_spoolss.c |  280 --
 source3/rpc_server/srv_spoolss.c  |  591 -
 7 files changed, 6 insertions(+), 1096 deletions(-)
 delete mode 100644 source3/include/rpc_spoolss.h
 delete mode 100644 source3/rpc_parse/parse_spoolss.c
 delete mode 100644 source3/rpc_server/srv_spoolss.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1e48ce9..e9eeff8 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -578,7 +578,7 @@ RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs_nt.o \
 
 RPC_DFS_OBJ =  ../librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
 
-RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o \
+RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss_nt.o \
  ../librpc/gen_ndr/srv_spoolss.o
 
 RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog_nt.o \
@@ -591,8 +591,7 @@ RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o 
../librpc/gen_ndr/srv_echo.o
 
 RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
 
-RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2) \
-rpc_parse/parse_spoolss.o
+RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2)
 
 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o rpc_client/rpc_transport_np.o \
rpc_client/rpc_transport_sock.o rpc_client/rpc_transport_smbd.o
@@ -2279,7 +2278,7 @@ bin/librpc_dsset...@shlibext@: $(BINARY_PREREQS) 
$(RPC_DSSETUP_OBJ)
@echo Linking $@
@$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
 
-bin/librpc_spools...@shlibext@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
+bin/librpc_spool...@shlibext@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
@echo Linking $@
@$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
 
diff --git a/source3/configure.in b/source3/configure.in
index d81e02d..c7a81d1 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -433,7 +433,7 @@ AC_SUBST(DYNEXP)
 
 dnl Add modules that have to be built by default here
 dnl These have to be built static:
-default_static_modules=pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc 
rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl 
rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss2 rpc_eventlog 
auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin 
auth_netlogond vfs_default nss_info_template
+default_static_modules=pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc 
rpc_samr rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl 
rpc_ntsvcs rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog auth_sam 
auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin 
auth_netlogond vfs_default nss_info_template
 
 dnl These are preferably build shared, and static if dlopen() is not available
 default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit 
vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap 
vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 
auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-545-g9d1ab9a

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  9d1ab9a0013127d08bad01975a5204e8f63b9ddc (commit)
  from  7fbdf8aae93f143c879de705936279f42eb8ee6f (commit)

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


- Log -
commit 9d1ab9a0013127d08bad01975a5204e8f63b9ddc
Author: Günther Deschner g...@samba.org
Date:   Wed Feb 25 14:33:59 2009 +0100

spoolss: add my copyright.

Guenther

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c|1 +
 source3/rpc_server/srv_spoolss_nt.c |1 +
 source3/rpcclient/cmd_spoolss.c |1 +
 source3/utils/net_rpc_printer.c |2 +-
 4 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 06f9b6f..0acae3d 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -5,6 +5,7 @@
 
Copyright (C) Andrew Tridgell 2003
Copyright (C) Tim Potter 2003
+   Copyright (C) Guenther Deschner 2009
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index d3e342b..0b95988 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7,6 +7,7 @@
  *  Copyright (C) Jeremy Allison   2001-2002,
  *  Copyright (C) Gerald Carter   2000-2004,
  *  Copyright (C) Tim Potter   2001-2002.
+ *  Copyright (C) Guenther Deschner 2009.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 86f0cd8..dd2a360 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -6,6 +6,7 @@
Copyright (C) Tim Potter2000
Copyright (C) Andrew Tridgell  1992-1999
Copyright (C) Luke Kenneth Casson Leighton 1996-1999
+   Copyright (C) Guenther Deschner 2009
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 41fc50c..8684e4c 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1,7 +1,7 @@
 /*
Samba Unix/Linux SMB client library
Distributed SMB/CIFS Server Management Utility
-   Copyright (C) 2004 Guenther Deschner (g...@samba.org)
+   Copyright (C) 2004,2009 Guenther Deschner (g...@samba.org)
 
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


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-518-gecc7537

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  ecc7537b6b0c7921160448b97a3cd8df1f4c77cf (commit)
  from  2471cb64f7d2d2e7eb594b1cf904af9d6befd389 (commit)

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


- Log -
commit ecc7537b6b0c7921160448b97a3cd8df1f4c77cf
Author: Günther Deschner g...@samba.org
Date:   Wed Feb 25 14:33:59 2009 +0100

spoolss: add my copyright.

Guenther
(cherry picked from commit 9d1ab9a0013127d08bad01975a5204e8f63b9ddc)

---

Summary of changes:
 librpc/ndr/ndr_spoolss_buf.c|1 +
 source3/rpc_server/srv_spoolss_nt.c |1 +
 source3/rpcclient/cmd_spoolss.c |1 +
 source3/utils/net_rpc_printer.c |2 +-
 4 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index 06f9b6f..0acae3d 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -5,6 +5,7 @@
 
Copyright (C) Andrew Tridgell 2003
Copyright (C) Tim Potter 2003
+   Copyright (C) Guenther Deschner 2009
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index d3e342b..0b95988 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7,6 +7,7 @@
  *  Copyright (C) Jeremy Allison   2001-2002,
  *  Copyright (C) Gerald Carter   2000-2004,
  *  Copyright (C) Tim Potter   2001-2002.
+ *  Copyright (C) Guenther Deschner 2009.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 86f0cd8..dd2a360 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -6,6 +6,7 @@
Copyright (C) Tim Potter2000
Copyright (C) Andrew Tridgell  1992-1999
Copyright (C) Luke Kenneth Casson Leighton 1996-1999
+   Copyright (C) Guenther Deschner 2009
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 41fc50c..8684e4c 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1,7 +1,7 @@
 /*
Samba Unix/Linux SMB client library
Distributed SMB/CIFS Server Management Utility
-   Copyright (C) 2004 Guenther Deschner (g...@samba.org)
+   Copyright (C) 2004,2009 Guenther Deschner (g...@samba.org)
 
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


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-546-g21391f7

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  21391f7fbe6c92ba050462750571cda661f5fb8a (commit)
  from  9d1ab9a0013127d08bad01975a5204e8f63b9ddc (commit)

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


- Log -
commit 21391f7fbe6c92ba050462750571cda661f5fb8a
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 17:45:30 2009 +0100

s3-smbcontrol: use correct PRINTER_NOTIFY flags.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 6ea200b..fc7d0aa 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -669,11 +669,11 @@ static bool do_printnotify(struct messaging_context 
*msg_ctx,
}
 
if (strcmp(argv[3], comment) == 0) {
-   attribute = PRINTER_NOTIFY_COMMENT;
+   attribute = PRINTER_NOTIFY_FIELD_COMMENT;
} else if (strcmp(argv[3], port) == 0) {
-   attribute = PRINTER_NOTIFY_PORT_NAME;
+   attribute = PRINTER_NOTIFY_FIELD_PORT_NAME;
} else if (strcmp(argv[3], driver) == 0) {
-   attribute = PRINTER_NOTIFY_DRIVER_NAME;
+   attribute = PRINTER_NOTIFY_FIELD_DRIVER_NAME;
} else {
fprintf(stderr, Invalid printer command '%s'\n,
argv[3]);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-547-g8595f26

2009-03-18 Thread Tim Prouty
The branch, master has been updated
   via  8595f260ebec2bf06d24d68a8c2f96810647156b (commit)
  from  21391f7fbe6c92ba050462750571cda661f5fb8a (commit)

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


- Log -
commit 8595f260ebec2bf06d24d68a8c2f96810647156b
Author: Zach Loafman zachary.loaf...@isilon.com
Date:   Wed Mar 18 10:36:59 2009 -0700

s4 libcli: Add back Longhorn beta dialect as a constant

Also tweak how the dialect array and count is initialized.

---

Summary of changes:
 source4/libcli/smb2/connect.c |7 +++
 source4/libcli/smb2/smb2.h|1 +
 2 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 3fd9a38..b522a56 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -162,7 +162,8 @@ static void continue_socket(struct composite_context *creq)
struct smbcli_socket *sock;
struct smb2_transport *transport;
struct smb2_request *req;
-   uint16_t dialects[2];
+   uint16_t dialects[3] = { SMB2_DIALECT_REVISION, SMB21_DIALECT_REVISION,
+SMB2_LONGHORN_BETA_DIALECT_REVISION };
 
c-status = smbcli_sock_connect_recv(creq, state, sock);
if (!composite_is_ok(c)) return;
@@ -171,7 +172,7 @@ static void continue_socket(struct composite_context *creq)
if (composite_nomem(transport, c)) return;
 
ZERO_STRUCT(state-negprot);
-   state-negprot.in.dialect_count = 2;
+   state-negprot.in.dialect_count = sizeof(dialects) / 
sizeof(dialects[0]);
switch (transport-options.signing) {
case SMB_SIGNING_OFF:
state-negprot.in.security_mode = 0;
@@ -187,8 +188,6 @@ static void continue_socket(struct composite_context *creq)
}
state-negprot.in.capabilities  = 0;
unix_to_nt_time(state-negprot.in.start_time, time(NULL));
-   dialects[0] = SMB2_DIALECT_REVISION;
-   dialects[1] = SMB21_DIALECT_REVISION;
state-negprot.in.dialects = dialects;
 
req = smb2_negprot_send(transport, state-negprot);
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index 3cc3ec2..7c07c84 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -230,6 +230,7 @@ struct smb2_request {
 /* the dialects we support */
 #define SMB2_DIALECT_REVISION   0x202
 #define SMB21_DIALECT_REVISION  0x210
+#define SMB2_LONGHORN_BETA_DIALECT_REVISION0x0 /* early beta dialect */
 
 /* SMB2 negotiate security_mode */
 #define SMB2_NEGOTIATE_SIGNING_ENABLED   0x01


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-548-ge966719

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  e966719049702827c482c5e19783b9a7c725bdb1 (commit)
  from  8595f260ebec2bf06d24d68a8c2f96810647156b (commit)

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


- Log -
commit e966719049702827c482c5e19783b9a7c725bdb1
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 18:10:01 2009 +0100

s3-rpc_client: remove unused CLI_DO_RPC_WERR macro.

Guenther

---

Summary of changes:
 source3/include/rpc_client.h |   30 --
 1 files changed, 0 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index afa1889..84ac8b1 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -41,34 +41,4 @@
 
 #define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, 
(_ctx_), (_io_))
 
-/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
-
-#define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \
- q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
-{\
-   SMB_ASSERT(ndr_syntax_id_equal(pcli-abstract_syntax, interface)); \
-   if (!prs_init( q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \
-   return WERR_NOMEM;\
-   }\
-   if ( q_io_fn(, q_in, q_ps, 0) ) {\
-   NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(ctx, pcli, opnum, 
q_ps, r_ps); \
-   if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return ntstatus_to_werror(_smb_pipe_stat_);\
-   }\
-   if (!r_io_fn(, r_out, r_ps, 0)) {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return default_error;\
-   }\
-   } else {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return default_error;\
-   }\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-}
-
 #endif /* _RPC_CLIENT_H */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-520-ge1055c3

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  e1055c372a3b77fdd28f17635465a7a0a9c578fa (commit)
  from  6ac0a8d45e14deede30f56ab8c4d8288b83f15b4 (commit)

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


- Log -
commit e1055c372a3b77fdd28f17635465a7a0a9c578fa
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 18:10:01 2009 +0100

s3-rpc_client: remove unused CLI_DO_RPC_WERR macro.

Guenther
(cherry picked from commit e966719049702827c482c5e19783b9a7c725bdb1)

---

Summary of changes:
 source3/include/rpc_client.h |   30 --
 1 files changed, 0 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index afa1889..84ac8b1 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -41,34 +41,4 @@
 
 #define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, 
(_ctx_), (_io_))
 
-/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
-
-#define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \
- q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
-{\
-   SMB_ASSERT(ndr_syntax_id_equal(pcli-abstract_syntax, interface)); \
-   if (!prs_init( q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \
-   return WERR_NOMEM;\
-   }\
-   if ( q_io_fn(, q_in, q_ps, 0) ) {\
-   NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(ctx, pcli, opnum, 
q_ps, r_ps); \
-   if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return ntstatus_to_werror(_smb_pipe_stat_);\
-   }\
-   if (!r_io_fn(, r_out, r_ps, 0)) {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return default_error;\
-   }\
-   } else {\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-   return default_error;\
-   }\
-   prs_mem_free( q_ps );\
-   prs_mem_free( r_ps );\
-}
-
 #endif /* _RPC_CLIENT_H */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-549-g7a85a87

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  7a85a87edf3a589235b932a3c802278e78da4ec5 (commit)
  from  e966719049702827c482c5e19783b9a7c725bdb1 (commit)

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


- Log -
commit 7a85a87edf3a589235b932a3c802278e78da4ec5
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 12:22:22 2009 +0100

s3-rpc_parse: remove unused BUFFER5 and UNISTR3.

Guenther

---

Summary of changes:
 source3/include/proto.h|6 ---
 source3/include/rpc_misc.h |   19 -
 source3/lib/util_unistr.c  |   16 
 source3/rpc_parse/parse_misc.c |   81 
 source3/rpc_parse/parse_prs.c  |   61 --
 5 files changed, 0 insertions(+), 183 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index d0b8f22..f96e224 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1557,7 +1557,6 @@ char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const 
UNISTR2 *src);
 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
 void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
-void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
 char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
 const char *unistr2_static(const UNISTR2 *str);
 smb_ucs2_t toupper_w(smb_ucs2_t val);
@@ -5685,7 +5684,6 @@ bool smb_io_uuid(const char *desc, struct GUID *uuid,
 prs_struct *ps, int depth);
 void init_unistr(UNISTR *str, const char *buf);
 bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
-bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int 
depth);
 void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
 void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes 
flags);
@@ -5696,8 +5694,6 @@ bool prs_io_unistr2_p(const char *desc, prs_struct *ps, 
int depth, UNISTR2 **uni
 bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 
);
 bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct 
*ps, int depth);
 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
-void init_unistr3(UNISTR3 *str, const char *buf);
-bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int 
depth);
 uint32 str_len_uni(UNISTR *source);
 bool policy_handle_is_valid(const POLICY_HND *hnd);
 
@@ -5755,9 +5751,7 @@ bool prs_uint8s(bool charmode, const char *name, 
prs_struct *ps, int depth, uint
 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint16 *data16s, int len);
 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, 
uint16 *data16s, int len);
 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint32 *data32s, int len);
-bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, 
BUFFER5 *str);
 bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, 
UNISTR2 *str);
-bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct 
*ps, int depth);
 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int 
max_buf_size);
 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char 
**str);
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 37dffbb..cdcfb01 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -100,17 +100,6 @@ typedef struct policy_handle POLICY_HND;
 
 
 /** 
- * Buffers use by spoolss (i might be able to replace it with
- * an RPC_DATA_BLOB)
- **/
-
-typedef struct {
-   uint32 buf_len;
-   uint16 *buffer; /* data */
-} BUFFER5;
-
-
-/** 
  * UNICODE string variations
  **/
 
@@ -130,14 +119,6 @@ typedef struct {   /* UNISTR2 - unicode string 
size (in
  should include the NULL character */
 } UNISTR2;
 
-/* i think this is the same as a BUFFER5 used in the spoolss code --jerry */
-/* not sure about how the termination matches between the uint16 buffers 
thought */
-
-typedef struct {   /* UNISTR3 -  not sure about this structure 
*/
-   uint32 uni_str_len;
-   UNISTR str;
-} UNISTR3;
-
 /*
  * I'm 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-521-g5bc2518

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  5bc2518950cce45dcbdccf17439c11a3d959f97d (commit)
  from  e1055c372a3b77fdd28f17635465a7a0a9c578fa (commit)

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


- Log -
commit 5bc2518950cce45dcbdccf17439c11a3d959f97d
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 12:22:22 2009 +0100

s3-rpc_parse: remove unused BUFFER5 and UNISTR3.

Guenther
(cherry picked from commit 7a85a87edf3a589235b932a3c802278e78da4ec5)

---

Summary of changes:
 source3/include/proto.h|6 ---
 source3/include/rpc_misc.h |   19 -
 source3/lib/util_unistr.c  |   16 
 source3/rpc_parse/parse_misc.c |   81 
 source3/rpc_parse/parse_prs.c  |   61 --
 5 files changed, 0 insertions(+), 183 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index d0b8f22..f96e224 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1557,7 +1557,6 @@ char *rpcstr_pull_unistr2_talloc(TALLOC_CTX *ctx, const 
UNISTR2 *src);
 int rpcstr_push(void *dest, const char *src, size_t dest_len, int flags);
 int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
 void unistr2_to_ascii(char *dest, const UNISTR2 *str, size_t maxlen);
-void unistr3_to_ascii(char *dest, const UNISTR3 *str, size_t maxlen);
 char *unistr2_to_ascii_talloc(TALLOC_CTX *ctx, const UNISTR2 *str);
 const char *unistr2_static(const UNISTR2 *str);
 smb_ucs2_t toupper_w(smb_ucs2_t val);
@@ -5685,7 +5684,6 @@ bool smb_io_uuid(const char *desc, struct GUID *uuid,
 prs_struct *ps, int depth);
 void init_unistr(UNISTR *str, const char *buf);
 bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
-bool smb_io_buffer5(const char *desc, BUFFER5 *buf5, prs_struct *ps, int 
depth);
 void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
 void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes 
flags);
@@ -5696,8 +5694,6 @@ bool prs_io_unistr2_p(const char *desc, prs_struct *ps, 
int depth, UNISTR2 **uni
 bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 
);
 bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct 
*ps, int depth);
 bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
-void init_unistr3(UNISTR3 *str, const char *buf);
-bool smb_io_unistr3(const char *desc, UNISTR3 *name, prs_struct *ps, int 
depth);
 uint32 str_len_uni(UNISTR *source);
 bool policy_handle_is_valid(const POLICY_HND *hnd);
 
@@ -5755,9 +5751,7 @@ bool prs_uint8s(bool charmode, const char *name, 
prs_struct *ps, int depth, uint
 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint16 *data16s, int len);
 bool prs_uint16uni(bool charmode, const char *name, prs_struct *ps, int depth, 
uint16 *data16s, int len);
 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint32 *data32s, int len);
-bool prs_buffer5(bool charmode, const char *name, prs_struct *ps, int depth, 
BUFFER5 *str);
 bool prs_unistr2(bool charmode, const char *name, prs_struct *ps, int depth, 
UNISTR2 *str);
-bool prs_unistr3(bool charmode, const char *name, UNISTR3 *str, prs_struct 
*ps, int depth);
 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
 bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int 
max_buf_size);
 bool prs_string_alloc(const char *name, prs_struct *ps, int depth, const char 
**str);
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 37dffbb..cdcfb01 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -100,17 +100,6 @@ typedef struct policy_handle POLICY_HND;
 
 
 /** 
- * Buffers use by spoolss (i might be able to replace it with
- * an RPC_DATA_BLOB)
- **/
-
-typedef struct {
-   uint32 buf_len;
-   uint16 *buffer; /* data */
-} BUFFER5;
-
-
-/** 
  * UNICODE string variations
  **/
 
@@ -130,14 +119,6 @@ typedef struct {   /* UNISTR2 - unicode string 
size (in
  should include the NULL character */
 } UNISTR2;
 
-/* i think this is the same as a BUFFER5 used in the spoolss code --jerry */
-/* not sure about how the termination matches between the uint16 buffers 
thought */
-
-typedef struct {   /* UNISTR3 -  not sure about this structure 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-551-ga125659

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  a1256594b047061d5fce8b7b4234dc725462392d (commit)
   via  43182fdff89bc5c238e7a90cf93500cef850ecd5 (commit)
  from  7a85a87edf3a589235b932a3c802278e78da4ec5 (commit)

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


- Log -
commit a1256594b047061d5fce8b7b4234dc725462392d
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 21:54:26 2009 +0100

s3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error 
code.

When _spoolss_GetPrinterData receives a query on a printserver handle for a
value that we have not stored or do not provide, we need to return
WERR_INVALID_PARAM, not WERR_BADFILE. Tested with w2k and w2k3 servers.
Found by torture test.

Guenther

commit 43182fdff89bc5c238e7a90cf93500cef850ecd5
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 21:36:40 2009 +0100

s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.

When a windows clients queries the  key, we need to make sure to return 
with
the appropriate error (WERR_INVALID_PARAM in that case), and not fall 
through
to the buffer size handling macros. Found by torture test.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 0b95988..b825cef 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2482,7 +2482,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX 
*mem_ctx,
return WERR_OK;
}
 
-   return WERR_BADFILE;
+   return WERR_INVALID_PARAM;
 }
 
 /
@@ -9141,6 +9141,10 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
free_a_printer(printer, 2);
}
 
+   if (!W_ERROR_IS_OK(result)) {
+   return result;
+   }
+
*r-out.needed  = SPOOLSS_BUFFER_ARRAY(p-mem_ctx,
   spoolss_EnumPrinterDataEx, NULL,
   *r-out.info,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-523-g4a62b83

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  4a62b839c64ce309245a6167388f78e63918c5c4 (commit)
   via  095eb03b14a7ddf4194dcafb618100c768369f1d (commit)
  from  5bc2518950cce45dcbdccf17439c11a3d959f97d (commit)

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


- Log -
commit 4a62b839c64ce309245a6167388f78e63918c5c4
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 21:54:26 2009 +0100

s3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error 
code.

When _spoolss_GetPrinterData receives a query on a printserver handle for a
value that we have not stored or do not provide, we need to return
WERR_INVALID_PARAM, not WERR_BADFILE. Tested with w2k and w2k3 servers.
Found by torture test.

Guenther
(cherry picked from commit a1256594b047061d5fce8b7b4234dc725462392d)

commit 095eb03b14a7ddf4194dcafb618100c768369f1d
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 21:36:40 2009 +0100

s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.

When a windows clients queries the  key, we need to make sure to return 
with
the appropriate error (WERR_INVALID_PARAM in that case), and not fall 
through
to the buffer size handling macros. Found by torture test.

Guenther
(cherry picked from commit 43182fdff89bc5c238e7a90cf93500cef850ecd5)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 0b95988..b825cef 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2482,7 +2482,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX 
*mem_ctx,
return WERR_OK;
}
 
-   return WERR_BADFILE;
+   return WERR_INVALID_PARAM;
 }
 
 /
@@ -9141,6 +9141,10 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
free_a_printer(printer, 2);
}
 
+   if (!W_ERROR_IS_OK(result)) {
+   return result;
+   }
+
*r-out.needed  = SPOOLSS_BUFFER_ARRAY(p-mem_ctx,
   spoolss_EnumPrinterDataEx, NULL,
   *r-out.info,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-552-g7d7b1a8

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  7d7b1a8dcc338ea037cc02ef1b2dd9e9f6ce0943 (commit)
  from  a1256594b047061d5fce8b7b4234dc725462392d (commit)

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


- Log -
commit 7d7b1a8dcc338ea037cc02ef1b2dd9e9f6ce0943
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:09:57 2009 +0100

s3-rpc_parse: remove some unused parsing code.

Guenther

---

Summary of changes:
 source3/include/proto.h|   13 --
 source3/rpc_parse/parse_misc.c |  338 
 2 files changed, 0 insertions(+), 351 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index f96e224..c7efc58 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5676,26 +5676,13 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 /* The following definitions come from rpc_parse/parse_misc.c  */
 
 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
-bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME 
*nttime);
 bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, 
SYSTEMTIME *systime);
 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
 prs_struct *ps, int depth);
 void init_unistr(UNISTR *str, const char *buf);
-bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
-void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
-void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes 
flags);
-void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
-void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR 
*from);
-void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
-bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 
**uni2);
-bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 
);
-bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct 
*ps, int depth);
-bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
-uint32 str_len_uni(UNISTR *source);
-bool policy_handle_is_valid(const POLICY_HND *hnd);
 
 /* The following definitions come from rpc_parse/parse_prs.c  */
 
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index bddd421..8b4135a 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -59,15 +59,6 @@ bool smb_io_time(const char *desc, NTTIME *nttime, 
prs_struct *ps, int depth)
 }
 
 /***
- Reads or writes an NTTIME structure.
-/
-
-bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime)
-{
-   return smb_io_time( desc, nttime, ps, depth );
-}
-
-/***
 /
 
 bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, 
SYSTEMTIME *systime)
@@ -195,76 +186,6 @@ void init_unistr(UNISTR *str, const char *buf)
 }
 
 /***
-reads or writes a UNISTR structure.
- NOTE: UNISTR structures NEED to be null-terminated.
-/
-
-bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
-{
-   if (uni == NULL)
-   return False;
-
-   prs_debug(ps, depth, desc, smb_io_unistr);
-   depth++;
-
-   if(!prs_unistr(unistr, ps, depth, uni))
-   return False;
-
-   return True;
-}
-
-/***
-creates a UNISTR2 structure: sets up the buffer, too
-/
-
-void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf)
-{
-   if (buf != NULL) {
-   *ptr = 1;
-   init_unistr2(str, buf, UNI_STR_TERMINATE);
-   } else {
-   *ptr = 0;
-   init_unistr2(str, NULL, UNI_FLAGS_NONE);
-
-   }
-}
-
-/***
- Copies a UNISTR2 structure.
-/
-
-void copy_unistr2(UNISTR2 *str, const UNISTR2 *from)
-{
-   if (from-buffer == NULL) {
-   ZERO_STRUCTP(str);
-   return;
-   }
-
-   

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-524-g032113b

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  032113b3fe5a8fa06672256cbc028833b519b83f (commit)
  from  4a62b839c64ce309245a6167388f78e63918c5c4 (commit)

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


- Log -
commit 032113b3fe5a8fa06672256cbc028833b519b83f
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 15:09:57 2009 +0100

s3-rpc_parse: remove some unused parsing code.

Guenther
(cherry picked from commit 7d7b1a8dcc338ea037cc02ef1b2dd9e9f6ce0943)

---

Summary of changes:
 source3/include/proto.h|   13 --
 source3/rpc_parse/parse_misc.c |  338 
 2 files changed, 0 insertions(+), 351 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index f96e224..c7efc58 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5676,26 +5676,13 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
 /* The following definitions come from rpc_parse/parse_misc.c  */
 
 bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth);
-bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME 
*nttime);
 bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, 
SYSTEMTIME *systime);
 bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime);
 bool smb_io_dom_sid(const char *desc, DOM_SID *sid, prs_struct *ps, int depth);
 bool smb_io_uuid(const char *desc, struct GUID *uuid, 
 prs_struct *ps, int depth);
 void init_unistr(UNISTR *str, const char *buf);
-bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth);
-void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf);
-void copy_unistr2(UNISTR2 *str, const UNISTR2 *from);
 void init_unistr2(UNISTR2 *str, const char *buf, enum unistr2_term_codes 
flags);
-void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf);
-void init_unistr2_from_unistr(TALLOC_CTX *ctx, UNISTR2 *to, const UNISTR 
*from);
-void init_unistr2_from_datablob(UNISTR2 *str, DATA_BLOB *blob) ;
-bool prs_io_unistr2_p(const char *desc, prs_struct *ps, int depth, UNISTR2 
**uni2);
-bool prs_io_unistr2(const char *desc, prs_struct *ps, int depth, UNISTR2 *uni2 
);
-bool smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct 
*ps, int depth);
-bool smb_io_pol_hnd(const char *desc, POLICY_HND *pol, prs_struct *ps, int 
depth);
-uint32 str_len_uni(UNISTR *source);
-bool policy_handle_is_valid(const POLICY_HND *hnd);
 
 /* The following definitions come from rpc_parse/parse_prs.c  */
 
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index bddd421..8b4135a 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -59,15 +59,6 @@ bool smb_io_time(const char *desc, NTTIME *nttime, 
prs_struct *ps, int depth)
 }
 
 /***
- Reads or writes an NTTIME structure.
-/
-
-bool smb_io_nttime(const char *desc, prs_struct *ps, int depth, NTTIME *nttime)
-{
-   return smb_io_time( desc, nttime, ps, depth );
-}
-
-/***
 /
 
 bool smb_io_system_time(const char *desc, prs_struct *ps, int depth, 
SYSTEMTIME *systime)
@@ -195,76 +186,6 @@ void init_unistr(UNISTR *str, const char *buf)
 }
 
 /***
-reads or writes a UNISTR structure.
- NOTE: UNISTR structures NEED to be null-terminated.
-/
-
-bool smb_io_unistr(const char *desc, UNISTR *uni, prs_struct *ps, int depth)
-{
-   if (uni == NULL)
-   return False;
-
-   prs_debug(ps, depth, desc, smb_io_unistr);
-   depth++;
-
-   if(!prs_unistr(unistr, ps, depth, uni))
-   return False;
-
-   return True;
-}
-
-/***
-creates a UNISTR2 structure: sets up the buffer, too
-/
-
-void init_buf_unistr2(UNISTR2 *str, uint32 *ptr, const char *buf)
-{
-   if (buf != NULL) {
-   *ptr = 1;
-   init_unistr2(str, buf, UNI_STR_TERMINATE);
-   } else {
-   *ptr = 0;
-   init_unistr2(str, NULL, UNI_FLAGS_NONE);
-
-   }
-}
-
-/***
- Copies a UNISTR2 structure.
-/
-
-void copy_unistr2(UNISTR2 *str, const UNISTR2 *from)
-{
-   if (from-buffer == NULL) {
-   

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

2009-03-18 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  a549aee12f33dc91f0cc32612516025eb212fb66 (commit)
   via  35a1ee3687f75e8b74e0009443362cf370eedc19 (commit)
  from  db811fbc3570f55b170567dbfd8882d270c10d83 (commit)

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


- Log -
commit a549aee12f33dc91f0cc32612516025eb212fb66
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 14:31:56 2009 -0700

Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb 
correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.

commit 35a1ee3687f75e8b74e0009443362cf370eedc19
Author: Alexander Zagrebin al...@visp.ru
Date:   Tue Mar 17 15:36:16 2009 -0700

Missing break in conversion function prevents tdb password database update.

---

Summary of changes:
 source/Makefile.in  |   10 +-
 source/passdb/pdb_tdb.c |  216 ---
 2 files changed, 207 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index e160a99..988ca2c 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -575,7 +575,7 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o 
passdb/pdb_interface.o \
passdb/util_unixsids.o passdb/lookup_sid.o \
passdb/login_cache.o @PDB_STATIC@ \
lib/account_pol.o $(PRIVILEGES_OBJ) \
-   lib/util_nscd.o lib/winbind_util.o
+   lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ)
 
 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
 CP850_OBJ = modules/CP850.o
@@ -670,7 +670,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
   smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
   smbd/vfs.o smbd/statcache.o smbd/seal.o \
-   smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
+   smbd/posix_acls.o lib/sysacls.o \
   smbd/process.o smbd/service.o smbd/error.o \
   printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
   lib/sysquotas_xfs.o lib/sysquotas_4A.o \
@@ -881,7 +881,7 @@ NET_OBJ = $(NET_OBJ1) \
  $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
  $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
  $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
  $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
  $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
@@ -1043,7 +1043,7 @@ WINBINDD_OBJ = \
$(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
$(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
-   $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) 
+   $(LIBADS_SERVER_OBJ) $(LDB_OBJ) 
 
 WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) 
\
$(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
@@ -1109,7 +1109,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o 
utils/ntlm_auth_diagnostics.o
 
 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o 
libads/kerberos.o \
-   $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
+   $(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
$(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c
index 143a2e2..de49ed2 100644
--- a/source/passdb/pdb_tdb.c
+++ b/source/passdb/pdb_tdb.c
@@ -102,6 +102,7 @@ static int tdbsam_convert_one(struct db_record *rec, void 
*priv)
ret = init_samu_from_buffer(user, SAMU_BUFFER_V3,
(uint8 *)rec-value.dptr,
rec-value.dsize);
+   break;
case 4:
ret = init_samu_from_buffer(user, SAMU_BUFFER_V4,
(uint8 *)rec-value.dptr,
@@ -141,6 +142,149 @@ static int tdbsam_convert_one(struct db_record *rec, void 
*priv)
return 0;
 }
 
+/**
+ Struct and function to backup an old record.
+ */
+
+struct tdbsam_backup_state {
+   struct db_context *new_db;
+   bool success;
+};
+
+static int 

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

2009-03-18 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  b5d794d5de872bcf757c8021c103b6b3d320b8db (commit)
  from  6efb624135a672babaad1459ff1f21b61281780e (commit)

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


- Log -
commit b5d794d5de872bcf757c8021c103b6b3d320b8db
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 14:31:01 2009 -0700

Fix bug 6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb 
correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.

---

Summary of changes:
 source/Makefile.in  |   10 +-
 source/passdb/pdb_tdb.c |  215 +++---
 2 files changed, 206 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index a7ddf9c..c01a6cc 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -547,7 +547,7 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o 
passdb/pdb_interface.o \
passdb/util_unixsids.o passdb/lookup_sid.o \
passdb/login_cache.o @PDB_STATIC@ \
lib/account_pol.o $(PRIVILEGES_OBJ) \
-   lib/util_nscd.o lib/winbind_util.o
+   lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ)
 
 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
 CP850_OBJ = modules/CP850.o
@@ -639,7 +639,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
   smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
   smbd/vfs.o smbd/statcache.o smbd/seal.o \
-   smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
+   smbd/posix_acls.o lib/sysacls.o \
   smbd/process.o smbd/service.o smbd/error.o \
   printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
   lib/sysquotas_xfs.o lib/sysquotas_4A.o \
@@ -841,7 +841,7 @@ NET_OBJ = $(NET_OBJ1) \
  $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
  $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
  $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
  $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
  $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
@@ -1011,7 +1011,7 @@ WINBINDD_OBJ = \
$(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
$(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
-   $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) 
+   $(LIBADS_SERVER_OBJ) $(LDB_OBJ) 
 
 WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) 
\
$(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
@@ -1076,7 +1076,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o 
utils/ntlm_auth_diagnostics.o
 
 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o 
libads/kerberos.o \
-   $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
+   $(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
$(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c
index 9c8c7b8..9928768 100644
--- a/source/passdb/pdb_tdb.c
+++ b/source/passdb/pdb_tdb.c
@@ -687,7 +687,7 @@ static uint32 init_buffer_from_sam (uint8 **buf, struct 
samu *sampass, bool size
 }
 
 /**
- Intialize a BYTE buffer from a struct samu struct
+ Struct and function to update an old record.
  */
 
 struct tdbsam_convert_state {
@@ -772,38 +772,188 @@ static int tdbsam_convert_one(struct db_record *rec, 
void *priv)
return 0;
 }
 
-static bool tdbsam_convert(struct db_context *db, int32 from)
+/**
+ Struct and function to backup an old record.
+ */
+
+struct tdbsam_backup_state {
+   struct db_context *new_db;
+   bool success;
+};
+
+static int backup_copy_fn(struct db_record *orig_rec, void *state)
+{
+   struct tdbsam_backup_state *bs = (struct tdbsam_backup_state *)state;
+   struct db_record *new_rec;
+   NTSTATUS status;
+
+   new_rec = bs-new_db-fetch_locked(bs-new_db, talloc_tos(), 
orig_rec-key);
+   if 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-553-g531af13

2009-03-18 Thread Günther Deschner
The branch, master has been updated
   via  531af136f9dd5c6050f78948837294aed02de440 (commit)
  from  7d7b1a8dcc338ea037cc02ef1b2dd9e9f6ce0943 (commit)

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


- Log -
commit 531af136f9dd5c6050f78948837294aed02de440
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 22:49:41 2009 +0100

s3: remove POLICY_HND.

Guenther

---

Summary of changes:
 source3/include/libsmb_internal.h|2 +-
 source3/include/nt_printing.h|2 +-
 source3/include/ntdomain.h   |2 +-
 source3/include/proto.h  |   20 ++--
 source3/include/rpc_misc.h   |2 -
 source3/lib/netapi/group.c   |   12 +-
 source3/lib/netapi/user.c|4 +-
 source3/lib/util.c   |4 +-
 source3/libads/ldap_printer.c|2 +-
 source3/libnet/libnet_join.c |6 +-
 source3/libsmb/libsmb_xattr.c|   12 +-
 source3/libsmb/trusts_util.c |2 +-
 source3/rpc_client/cli_lsarpc.c  |   10 +-
 source3/rpc_client/cli_reg.c |2 +-
 source3/rpc_client/cli_samr.c|2 +-
 source3/rpc_server/srv_eventlog_nt.c |6 +-
 source3/rpc_server/srv_lsa_hnd.c |8 +-
 source3/rpc_server/srv_samr_nt.c |   23 ++---
 source3/rpc_server/srv_spoolss_nt.c  |  227 -
 source3/rpc_server/srv_svcctl_nt.c   |4 +-
 source3/rpc_server/srv_winreg_nt.c   |6 +-
 source3/rpcclient/cmd_lsarpc.c   |   48 
 source3/rpcclient/cmd_samr.c |   56 
 source3/rpcclient/cmd_spoolss.c  |   48 
 source3/rpcclient/cmd_test.c |2 +-
 source3/rpcclient/rpcclient.c|2 +-
 source3/utils/net_rpc.c  |   74 ++--
 source3/utils/net_rpc_audit.c|8 +-
 source3/utils/net_rpc_join.c |2 +-
 source3/utils/net_rpc_printer.c  |   32 +++---
 source3/utils/net_rpc_registry.c |6 +-
 source3/utils/net_rpc_rights.c   |   20 ++--
 source3/utils/net_rpc_service.c  |   22 ++--
 source3/utils/net_rpc_sh_acct.c  |2 +-
 source3/utils/net_util.c |2 +-
 source3/utils/netlookup.c|2 +-
 source3/utils/smbcquotas.c   |2 +-
 source3/winbindd/winbindd.h  |4 +-
 source3/winbindd/winbindd_ads.c  |2 +-
 source3/winbindd/winbindd_cm.c   |6 +-
 source3/winbindd/winbindd_pam.c  |6 +-
 source3/winbindd/winbindd_proto.h|4 +-
 source3/winbindd/winbindd_rpc.c  |   28 ++--
 43 files changed, 360 insertions(+), 376 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/libsmb_internal.h 
b/source3/include/libsmb_internal.h
index e28c853..0bfcd8f 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -74,7 +74,7 @@ struct _SMBCSRV {
bool no_pathinfo;
bool no_pathinfo2;
 bool no_nt_session;
-POLICY_HND pol;
+struct policy_handle pol;
 
SMBCSRV *next, *prev;

diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 2d13197..7dc60a8 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -440,7 +440,7 @@ typedef struct _Printer{
fstring localmachine;
uint32 printerlocal;
struct spoolss_NotifyOption *option;
-   POLICY_HND client_hnd;
+   struct policy_handle client_hnd;
bool client_connected;
uint32 change;
/* are we in a FindNextPrinterChangeNotify() call? */
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 0b827d3..c95931b 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -117,7 +117,7 @@ typedef struct _input_data {
 struct policy {
struct policy *next, *prev;
 
-   POLICY_HND pol_hnd;
+   struct policy_handle pol_hnd;
 
void *data_ptr;
 };
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c7efc58..3d87f75 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1209,7 +1209,7 @@ void *_talloc_zero_array_zeronull(const void *ctx, size_t 
el_size, unsigned coun
 void *talloc_zeronull(const void *context, size_t size, const char *name);
 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
-bool is_valid_policy_hnd(const POLICY_HND *hnd);
+bool is_valid_policy_hnd(const struct policy_handle *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
  const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
@@ -5170,13 +5170,13 @@ WERROR regkey_open_internal( TALLOC_CTX *ctx, 
REGISTRY_KEY **regkey,
 NTSTATUS 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-525-g91216ff

2009-03-18 Thread Günther Deschner
The branch, v3-4-test has been updated
   via  91216ffa95b4ed53e54b11665e96b911cb4e4ab5 (commit)
  from  032113b3fe5a8fa06672256cbc028833b519b83f (commit)

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


- Log -
commit 91216ffa95b4ed53e54b11665e96b911cb4e4ab5
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 18 22:49:41 2009 +0100

s3: remove POLICY_HND.

Guenther
(cherry picked from commit 531af136f9dd5c6050f78948837294aed02de440)

---

Summary of changes:
 source3/include/libsmb_internal.h|2 +-
 source3/include/nt_printing.h|2 +-
 source3/include/ntdomain.h   |2 +-
 source3/include/proto.h  |   20 ++--
 source3/include/rpc_misc.h   |2 -
 source3/lib/netapi/group.c   |   12 +-
 source3/lib/netapi/user.c|4 +-
 source3/lib/util.c   |4 +-
 source3/libads/ldap_printer.c|2 +-
 source3/libnet/libnet_join.c |6 +-
 source3/libsmb/libsmb_xattr.c|   12 +-
 source3/libsmb/trusts_util.c |2 +-
 source3/rpc_client/cli_lsarpc.c  |   10 +-
 source3/rpc_client/cli_reg.c |2 +-
 source3/rpc_client/cli_samr.c|2 +-
 source3/rpc_server/srv_eventlog_nt.c |6 +-
 source3/rpc_server/srv_lsa_hnd.c |8 +-
 source3/rpc_server/srv_samr_nt.c |   23 ++---
 source3/rpc_server/srv_spoolss_nt.c  |  227 -
 source3/rpc_server/srv_svcctl_nt.c   |4 +-
 source3/rpc_server/srv_winreg_nt.c   |6 +-
 source3/rpcclient/cmd_lsarpc.c   |   48 
 source3/rpcclient/cmd_samr.c |   56 
 source3/rpcclient/cmd_spoolss.c  |   48 
 source3/rpcclient/cmd_test.c |2 +-
 source3/rpcclient/rpcclient.c|2 +-
 source3/utils/net_rpc.c  |   74 ++--
 source3/utils/net_rpc_audit.c|8 +-
 source3/utils/net_rpc_join.c |2 +-
 source3/utils/net_rpc_printer.c  |   32 +++---
 source3/utils/net_rpc_registry.c |6 +-
 source3/utils/net_rpc_rights.c   |   20 ++--
 source3/utils/net_rpc_service.c  |   22 ++--
 source3/utils/net_rpc_sh_acct.c  |2 +-
 source3/utils/net_util.c |2 +-
 source3/utils/netlookup.c|2 +-
 source3/utils/smbcquotas.c   |2 +-
 source3/winbindd/winbindd.h  |4 +-
 source3/winbindd/winbindd_ads.c  |2 +-
 source3/winbindd/winbindd_cm.c   |6 +-
 source3/winbindd/winbindd_pam.c  |6 +-
 source3/winbindd/winbindd_proto.h|4 +-
 source3/winbindd/winbindd_rpc.c  |   28 ++--
 43 files changed, 360 insertions(+), 376 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/libsmb_internal.h 
b/source3/include/libsmb_internal.h
index e28c853..0bfcd8f 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -74,7 +74,7 @@ struct _SMBCSRV {
bool no_pathinfo;
bool no_pathinfo2;
 bool no_nt_session;
-POLICY_HND pol;
+struct policy_handle pol;
 
SMBCSRV *next, *prev;

diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 2d13197..7dc60a8 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -440,7 +440,7 @@ typedef struct _Printer{
fstring localmachine;
uint32 printerlocal;
struct spoolss_NotifyOption *option;
-   POLICY_HND client_hnd;
+   struct policy_handle client_hnd;
bool client_connected;
uint32 change;
/* are we in a FindNextPrinterChangeNotify() call? */
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 0b827d3..c95931b 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -117,7 +117,7 @@ typedef struct _input_data {
 struct policy {
struct policy *next, *prev;
 
-   POLICY_HND pol_hnd;
+   struct policy_handle pol_hnd;
 
void *data_ptr;
 };
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c7efc58..3d87f75 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1209,7 +1209,7 @@ void *_talloc_zero_array_zeronull(const void *ctx, size_t 
el_size, unsigned coun
 void *talloc_zeronull(const void *context, size_t size, const char *name);
 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
-bool is_valid_policy_hnd(const POLICY_HND *hnd);
+bool is_valid_policy_hnd(const struct policy_handle *hnd);
 bool policy_hnd_equal(const struct policy_handle *hnd1,
  const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
@@ -5170,13 +5170,13 @@ WERROR 

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-526-g8e1c29a

2009-03-18 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  8e1c29a8be7ea21a6998b77e872bcef90160ee83 (commit)
  from  91216ffa95b4ed53e54b11665e96b911cb4e4ab5 (commit)

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


- Log -
commit 8e1c29a8be7ea21a6998b77e872bcef90160ee83
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 15:43:36 2009 -0700

Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb 
correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.

---

Summary of changes:
 source3/Makefile.in  |   10 +-
 source3/passdb/pdb_tdb.c |  215 +++---
 2 files changed, 206 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index e9eeff8..6cd5898 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -609,7 +609,7 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o 
passdb/pdb_interface.o \
passdb/util_unixsids.o passdb/lookup_sid.o \
passdb/login_cache.o @PDB_STATIC@ \
lib/account_pol.o $(PRIVILEGES_OBJ) \
-   lib/util_nscd.o lib/winbind_util.o
+   lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ)
 
 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
 CP850_OBJ = modules/CP850.o
@@ -713,7 +713,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
   smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
   smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
-   smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
+   smbd/posix_acls.o lib/sysacls.o \
   smbd/process.o smbd/service.o smbd/error.o \
   printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
   lib/sysquotas_xfs.o lib/sysquotas_4A.o \
@@ -930,7 +930,7 @@ NET_OBJ = $(NET_OBJ1) \
  $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
  $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
  $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
  $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
  $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
@@ -1093,7 +1093,7 @@ WINBINDD_OBJ = \
$(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
$(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
-   $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) \
+   $(LIBADS_SERVER_OBJ) $(LDB_OBJ) \
$(TDB_VALIDATE_OBJ)
 
 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) 
$(LIB_NONSMBD_OBJ) \
@@ -1160,7 +1160,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o 
utils/ntlm_auth_diagnostics.o
 
 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
../lib/util/asn1.o libsmb/spnego.o libsmb/clikrb5.o 
libads/kerberos.o \
-   $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
+   $(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
$(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index ab26651..73fcfee 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -142,6 +142,149 @@ static int tdbsam_convert_one(struct db_record *rec, void 
*priv)
return 0;
 }
 
+/**
+ Struct and function to backup an old record.
+ */
+
+struct tdbsam_backup_state {
+   struct db_context *new_db;
+   bool success;
+};
+
+static int backup_copy_fn(struct db_record *orig_rec, void *state)
+{
+   struct tdbsam_backup_state *bs = (struct tdbsam_backup_state *)state;
+   struct db_record *new_rec;
+   NTSTATUS status;
+
+   new_rec = bs-new_db-fetch_locked(bs-new_db, talloc_tos(), 
orig_rec-key);
+   if (new_rec == NULL) {
+   bs-success = false;
+   return 1;
+   }
+
+   status = new_rec-store(new_rec, orig_rec-value, TDB_INSERT);
+
+   TALLOC_FREE(new_rec);
+
+   if (!NT_STATUS_IS_OK(status)) {
+   bs-success = false;
+return 1;
+}
+return 0;
+}
+
+/**
+ Make a backup of an old 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-554-gf942cb6

2009-03-18 Thread Jeremy Allison
The branch, master has been updated
   via  f942cb616e981e5370fab122969127de0910b58b (commit)
  from  531af136f9dd5c6050f78948837294aed02de440 (commit)

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


- Log -
commit f942cb616e981e5370fab122969127de0910b58b
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 15:44:13 2009 -0700

Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb 
correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.

---

Summary of changes:
 source3/Makefile.in  |   10 +-
 source3/passdb/pdb_tdb.c |  215 +++---
 2 files changed, 206 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index a393fea..e3b46ad 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -608,7 +608,7 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o 
passdb/pdb_interface.o \
passdb/util_unixsids.o passdb/lookup_sid.o \
passdb/login_cache.o @PDB_STATIC@ \
lib/account_pol.o $(PRIVILEGES_OBJ) \
-   lib/util_nscd.o lib/winbind_util.o
+   lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ)
 
 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
 CP850_OBJ = modules/CP850.o
@@ -712,7 +712,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o 
smbd/connection.o \
   smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
   smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
   smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
-   smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
+   smbd/posix_acls.o lib/sysacls.o \
   smbd/process.o smbd/service.o smbd/error.o \
   printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
   lib/sysquotas_xfs.o lib/sysquotas_4A.o \
@@ -929,7 +929,7 @@ NET_OBJ = $(NET_OBJ1) \
  $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
  $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
  $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
  $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
  $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
@@ -1092,7 +1092,7 @@ WINBINDD_OBJ = \
$(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
$(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
-   $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) \
+   $(LIBADS_SERVER_OBJ) $(LDB_OBJ) \
$(TDB_VALIDATE_OBJ)
 
 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) 
$(LIB_NONSMBD_OBJ) \
@@ -1159,7 +1159,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o 
utils/ntlm_auth_diagnostics.o
 
 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
../lib/util/asn1.o libsmb/spnego.o libsmb/clikrb5.o 
libads/kerberos.o \
-   $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
+   $(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
$(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index ab26651..73fcfee 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -142,6 +142,149 @@ static int tdbsam_convert_one(struct db_record *rec, void 
*priv)
return 0;
 }
 
+/**
+ Struct and function to backup an old record.
+ */
+
+struct tdbsam_backup_state {
+   struct db_context *new_db;
+   bool success;
+};
+
+static int backup_copy_fn(struct db_record *orig_rec, void *state)
+{
+   struct tdbsam_backup_state *bs = (struct tdbsam_backup_state *)state;
+   struct db_record *new_rec;
+   NTSTATUS status;
+
+   new_rec = bs-new_db-fetch_locked(bs-new_db, talloc_tos(), 
orig_rec-key);
+   if (new_rec == NULL) {
+   bs-success = false;
+   return 1;
+   }
+
+   status = new_rec-store(new_rec, orig_rec-value, TDB_INSERT);
+
+   TALLOC_FREE(new_rec);
+
+   if (!NT_STATUS_IS_OK(status)) {
+   bs-success = false;
+return 1;
+}
+return 0;
+}
+
+/**
+ Make a backup of an old 

[SCM] CTDB repository - branch master updated - ctdb-1.0.74-5-g95d8ddb

2009-03-18 Thread Ronnie Sahlberg
The branch, master has been updated
   via  95d8ddbc2dd0b159e8df003502c3c336668d2c41 (commit)
   via  f03bd2b3d906dac9fb876dca54535d22e9cf1b9e (commit)
  from  b6f7cddc68508e52bc65b357b0b77258ae96362a (commit)

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


- Log -
commit 95d8ddbc2dd0b159e8df003502c3c336668d2c41
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Mar 19 10:17:44 2009 +1100

update the natgw eventscript and documentation

commit f03bd2b3d906dac9fb876dca54535d22e9cf1b9e
Author: root r...@rcn1.vsofs1.com
Date:   Wed Mar 18 19:19:49 2009 +1100

redo how the natgw is done. just use a default route with a high metric 
instead of fancy policyrouting

---

Summary of changes:
 config/ctdb.sysconfig|   25 ++--
 config/events.d/11.natgw |   69 --
 doc/ctdbd.1  |   32 +
 doc/ctdbd.1.html |   55 
 doc/ctdbd.1.xml  |   37 ++--
 5 files changed, 95 insertions(+), 123 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.sysconfig b/config/ctdb.sysconfig
index 03b91b6..abb9ea7 100644
--- a/config/ctdb.sysconfig
+++ b/config/ctdb.sysconfig
@@ -147,23 +147,18 @@
 # to use NAT MASQUERADING for all traffic from the internal private network
 # to the external network. This node is the NAT-GW node.
 #
-# All other nodes are set up with policy routing so that all traffic with
-# a source address of the private network and a destination outside of
-# the private network are instead routed through the NAT-GW node.
+# All other nodes are set up with a default rote with a metric of 10 to point
+# to the nat-gw node.
 # 
 # The effect of this is that only when a node does not have a public address
-# or a route to the external network will the node use the private address
-# as the source address and only then will it use the policy routing
-# through the NAT-GW.
-# As long as a node has a public address and can route to the external network
-# the node will always pick the public address as the source address and NAT-GW
-# routing will not be used.
-#NATGW_PUBLIC_IP=10.0.0.227/24
-#NATGW_PUBLIC_IFACE=eth0
-#NATGW_DEFAULT_GATEWAY=10.0.0.1
-#NATGW_PRIVATE_IFACE=eth1
-#NATGW_PRIVATE_NETWORK=10.1.1.0/24
-
+# and thus no proper routes to the external world it will instead
+# route all packets through the nat-gw node.
+#
+# NATGW_PUBLIC_IP=10.0.0.227/24
+# NATGW_PUBLIC_IFACE=eth0
+# NATGW_DEFAULT_GATEWAY=10.0.0.1
+# NATGW_PRIVATE_IFACE=eth1
+# NATGW_PRIVATE_NETWORK=10.1.1.0/24
 
 # where to log messages
 # the default is /var/log/log.ctdb
diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index 23fe4ae..254a8c1 100644
--- a/config/events.d/11.natgw
+++ b/config/events.d/11.natgw
@@ -8,12 +8,24 @@
 . $CTDB_BASE/functions
 loadconfig ctdb
 
-[ -z $NATGW_PUBLIC_INTERFACE ]  exit 0
+[ -z $NATGW_PUBLIC_IFACE ]  exit 0
 
 cmd=$1
 shift
 PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH
 
+delete_all() {
+   ip addr add $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE /dev/null 
2/dev/null
+   ip addr del $NATGW_PUBLIC_IP_HOST dev $NATGW_PRIVATE_IFACE /dev/null 
2/dev/null
+   ip route del 0.0.0.0/0 metric 10 /dev/null 2/dev/null
+
+   # Delete the masquerading setup from a previous iteration where we
+   # were the NAT-GW
+   iptables -D POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! 
$NATGW_PRIVATE_NETWORK -j MASQUERADE /dev/null 2/dev/null
+
+   ip addr del $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE /dev/null 
2/dev/null
+}
+
 case $cmd in 
  recovered)
MYPNN=`ctdb pnn | cut -d: -f2`
@@ -22,19 +34,9 @@ case $cmd in
FIRST=`ctdb status -Y | grep :0:$ | head -1`
FIRSTNODE=`echo $FIRST | cut -d: -f2`
FIRSTIP=`echo $FIRST | cut -d: -f3`
+   NATGW_PUBLIC_IP_HOST=`echo $NATGW_PUBLIC_IP | sed -e s/\/.*/\/32/`
 
-   # Delete everything that might have been set in a previous iteration
-   # when we were not the NAT-GW
-   ip rule del fwmark 11 table 11 /dev/null 2/dev/null
-   iptables -D OUTPUT -t mangle -s $NATGW_PRIVATE_NETWORK -d ! 
$NATGW_PRIVATE_NETWORK -j MARK --set-mark 11 /dev/null 2/dev/null
-   iptables -D OUTPUT -t mangle -s $NATGW_PRIVATE_NETWORK -d ! 
$NATGW_PRIVATE_NETWORK -p tcp --sport 22 -j ACCEPT /dev/null 2/dev/null
-   ip route del $NATGW_PRIVATE_NETWORK dev $NATGW_PRIVATE_IFACE table 11 
/dev/null 2/dev/null
-   ip route del 0.0.0.0/0 dev $NATGW_PRIVATE_IFACE table 11 /dev/null 
2/dev/null
-
-   # Delete the masquerading setup from a previous iteration where we
-   # was the NAT-GW
-   iptables -D POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! 
$NATGW_PRIVATE_NETWORK -j MASQUERADE /dev/null 2/dev/null
-   ip addr del $NATGW_PUBLIC_IP dev 

[SCM] CTDB repository - branch master updated - ctdb-1.0.74-6-gb6e3450

2009-03-18 Thread Ronnie Sahlberg
The branch, master has been updated
   via  b6e34503ac094a274a569a69e3d93d92ad911f4d (commit)
  from  95d8ddbc2dd0b159e8df003502c3c336668d2c41 (commit)

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


- Log -
commit b6e34503ac094a274a569a69e3d93d92ad911f4d
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Thu Mar 19 10:43:57 2009 +1100

The wbinfo --sequence command has been depreciated in favor of the new
--online-status command

---

Summary of changes:
 tools/ctdb_diagnostics |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/ctdb_diagnostics b/tools/ctdb_diagnostics
index 8cf1f9a..a9531d6 100755
--- a/tools/ctdb_diagnostics
+++ b/tools/ctdb_diagnostics
@@ -236,7 +236,7 @@ show_all smbclient -U% -L 127.0.0.1
 WORKGROUP=`testparm -s --parameter-name=WORKGROUP 2 /dev/null`
 show_all id $WORKGROUP/Administrator
 show_all wbinfo -p
-show_all wbinfo --sequence
+show_all wbinfo --online-status
 show_all smbd -b
 
 date


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-555-g710948c

2009-03-18 Thread Tim Prouty
The branch, master has been updated
   via  710948c7885b228afe5e1b3bed005f50c57d519b (commit)
  from  f942cb616e981e5370fab122969127de0910b58b (commit)

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


- Log -
commit 710948c7885b228afe5e1b3bed005f50c57d519b
Author: Tim Prouty tpro...@samba.org
Date:   Wed Mar 18 21:49:50 2009 +

s3 onefs: Correctly error out when the read returns EOF

Also add some more debugging.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index b8b059b..46f3826 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -591,8 +591,8 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T 
offset,
 */
while (total_rbytes  count) {
 
-   DEBUG(0, (shallow recvfile, reading %llu\n,
- count - total_rbytes));
+   DEBUG(0, (shallow recvfile (%s), reading %llu\n,
+ strerror(errno), count - total_rbytes));
 
/*
 * Read the remaining data into the spill buffer.  recvfile
@@ -603,9 +603,13 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T 
offset,
   spill_buffer + (total_rbytes - total_wbytes),
   count - total_rbytes);
 
-   if (ret == -1) {
-   DEBUG(0, (shallow recvfile read failed: %s\n,
- strerror(errno)));
+   if (ret = 0) {
+   if (ret == 0) {
+   DEBUG(0, (shallow recvfile read: EOF\n));
+   } else {
+   DEBUG(0, (shallow recvfile read failed: %s\n,
+ strerror(errno)));
+   }
/* Socket is dead, so treat as if it were drained. */
socket_drained = true;
goto out;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-527-ga398deb

2009-03-18 Thread Tim Prouty
The branch, v3-4-test has been updated
   via  a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28 (commit)
  from  8e1c29a8be7ea21a6998b77e872bcef90160ee83 (commit)

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


- Log -
commit a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28
Author: Tim Prouty tpro...@samba.org
Date:   Wed Mar 18 21:49:50 2009 +

s3 onefs: Correctly error out when the read returns EOF

Also add some more debugging.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index b8b059b..46f3826 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -591,8 +591,8 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T 
offset,
 */
while (total_rbytes  count) {
 
-   DEBUG(0, (shallow recvfile, reading %llu\n,
- count - total_rbytes));
+   DEBUG(0, (shallow recvfile (%s), reading %llu\n,
+ strerror(errno), count - total_rbytes));
 
/*
 * Read the remaining data into the spill buffer.  recvfile
@@ -603,9 +603,13 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T 
offset,
   spill_buffer + (total_rbytes - total_wbytes),
   count - total_rbytes);
 
-   if (ret == -1) {
-   DEBUG(0, (shallow recvfile read failed: %s\n,
- strerror(errno)));
+   if (ret = 0) {
+   if (ret == 0) {
+   DEBUG(0, (shallow recvfile read: EOF\n));
+   } else {
+   DEBUG(0, (shallow recvfile read failed: %s\n,
+ strerror(errno)));
+   }
/* Socket is dead, so treat as if it were drained. */
socket_drained = true;
goto out;


-- 
Samba Shared Repository


Build status as of Thu Mar 19 00:00:02 2009

2009-03-18 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-03-18 
00:00:30.0 +
+++ /home/build/master/cache/broken_results.txt 2009-03-19 00:00:28.0 
+
@@ -1,4 +1,4 @@
-Build status as of Wed Mar 18 00:00:02 2009
+Build status as of Thu Mar 19 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
@@ -6,7 +6,7 @@
 ccache   28 5  0 
 ctdb 0  0  0 
 distcc   0  0  0 
-ldb  27 28 0 
+ldb  28 28 0 
 libreplace   28 9  0 
 lorikeet-heimdal 25 12 0 
 pidl 20 2  0 
@@ -14,10 +14,10 @@
 rsync28 8  0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 27 26 0 
+samba_3_X_devel 27 27 0 
 samba_3_X_test 26 24 0 
-samba_4_0_test 28 27 0 
+samba_4_0_test 28 27 1 
 smb-build27 4  0 
-talloc   28 28 0 
+talloc   27 28 0 
 tdb  28 9  0 
 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-557-gd380c49

2009-03-18 Thread Andrew Tridgell
The branch, master has been updated
   via  d380c49791d1010d759369cab12d93b6fbd48dc7 (commit)
   via  13b6663e23a424473d14324ac229a21e1e90580a (commit)
  from  710948c7885b228afe5e1b3bed005f50c57d519b (commit)

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


- Log -
commit d380c49791d1010d759369cab12d93b6fbd48dc7
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Mar 19 11:23:49 2009 +1100

use the tevent nesting code to avoid the uid problem in the VFS
backend

The vfs_unixuid module changes the uid of the process when executing
operations on behalf of the user. Within the VFS backend we may rely
on semi-async calls, such as winbind calls, which will call the event
loop again. To cope with this we need to ensure that while inside
those calls we revert the uid to root, then revert back to the
connected user when we have finished with the semi-async calls.

commit 13b6663e23a424473d14324ac229a21e1e90580a
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Mar 19 11:21:36 2009 +1100

fixed a logic bug in the tevent nesting code

The event nesting code never triggered as nesting.level was never
greater than 1. The main event loop needs to increase the nesting
level by 1.

I also added a paranoia check to the nesting setup call. The API as
currently written cannot support multiple nesting hooks, so we need to
abort if multiple hooks are tried.

---

Summary of changes:
 lib/tevent/tevent.c |   14 +++-
 source4/ntvfs/unixuid/vfs_unixuid.c |   66 +++
 2 files changed, 79 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index ba2d93f..56fd6ae 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -427,6 +427,14 @@ void tevent_loop_set_nesting_hook(struct tevent_context 
*ev,
  tevent_nesting_hook hook,
  void *private_data)
 {
+   if (ev-nesting.hook_fn  
+   (ev-nesting.hook_fn != hook ||
+ev-nesting.hook_private != private_data)) {
+   /* the way the nesting hook code is currently written
+  we cannot support two different nesting hooks at the
+  same time. */
+   tevent_abort(ev, tevent: Violation of nesting hook rules\n);
+   }
ev-nesting.hook_fn = hook;
ev-nesting.hook_private = private_data;
 }
@@ -593,5 +601,9 @@ int tevent_common_loop_wait(struct tevent_context *ev,
 */
 int _tevent_loop_wait(struct tevent_context *ev, const char *location)
 {
-   return ev-ops-loop_wait(ev, location);
+   int ret;
+   ev-nesting.level++;
+   ret = ev-ops-loop_wait(ev, location);
+   ev-nesting.level--;
+   return ret;
 }
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c 
b/source4/ntvfs/unixuid/vfs_unixuid.c
index db22a85..062fa41 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -26,6 +26,8 @@
 #include auth/auth.h
 #include ntvfs/ntvfs.h
 #include libcli/wbclient/wbclient.h
+#define TEVENT_DEPRECATED
+#include tevent.h
 
 struct unixuid_private {
struct wbc_context *wbc_ctx;
@@ -91,6 +93,64 @@ static NTSTATUS set_unix_security(struct unix_sec_ctx *sec)
return NT_STATUS_OK;
 }
 
+static int unixuid_nesting_level;
+
+/*
+  called at the start and end of a tevent nesting loop. Needs to save/restore
+  unix security context
+ */
+static int unixuid_event_nesting_hook(struct tevent_context *ev,
+ void *private_data,
+ uint32_t level,
+ bool begin,
+ void *stack_ptr,
+ const char *location)
+{
+   struct unix_sec_ctx *sec_ctx;
+
+   if (unixuid_nesting_level == 0) {
+   /* we don't need to do anything unless we are nested
+  inside of a call in this module */
+   return 0;
+   }
+
+   if (begin) {
+   sec_ctx = save_unix_security(ev);
+   if (sec_ctx == NULL) {
+   DEBUG(0,(%s: Failed to save security context\n, 
location));
+   return -1;
+   }
+   *(struct unix_sec_ctx **)stack_ptr = sec_ctx;
+   if (seteuid(0) != 0 || setegid(0) != 0) {
+   DEBUG(0,(%s: Failed to change to root\n, location));
+   return -1;  
+   }
+   } else {
+   /* called when we come out of a nesting level */
+   NTSTATUS status;
+
+   sec_ctx = *(struct unix_sec_ctx **)stack_ptr;
+   if (sec_ctx == 

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

2009-03-18 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  41bf3933b955548c4877e6e3f8fe2768090833c4 (commit)
  from  a549aee12f33dc91f0cc32612516025eb212fb66 (commit)

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


- Log -
commit 41bf3933b955548c4877e6e3f8fe2768090833c4
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 19:59:04 2009 -0700

Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

---

Summary of changes:
 source/smbd/reply.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 499b67f..46653cd 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -76,11 +76,16 @@ static NTSTATUS check_path_syntax_internal(char *path,
}
}
 
-   if (!stream_started  *s == ':') {
+   if (!posix_path  !stream_started  *s == ':') {
if (*p_last_component_contains_wcard) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
-   /* stream names allow more characters than file names */
+   /* Stream names allow more characters than file names.
+  We're overloading posix_path here to allow a wider
+  range of characters. If stream_started is true this
+  is still a Windows path even if posix_path is true.
+  JRA.
+   */
stream_started = true;
start_of_name_component = false;
posix_path = true;


-- 
Samba Shared Repository


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

2009-03-18 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  985ba585207e840caa17c3d87d93ef1ba5f15cbb (commit)
  from  b5d794d5de872bcf757c8021c103b6b3d320b8db (commit)

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


- Log -
commit 985ba585207e840caa17c3d87d93ef1ba5f15cbb
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 19:58:01 2009 -0700

Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

---

Summary of changes:
 source/smbd/reply.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 159c6f4..a374b65 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -78,11 +78,16 @@ static NTSTATUS check_path_syntax_internal(char *path,
}
}
 
-   if (!stream_started  *s == ':') {
+   if (!posix_path  !stream_started  *s == ':') {
if (*p_last_component_contains_wcard) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
-   /* stream names allow more characters than file names */
+   /* Stream names allow more characters than file names.
+  We're overloading posix_path here to allow a wider
+  range of characters. If stream_started is true this
+  is still a Windows path even if posix_path is true.
+  JRA.
+   */
stream_started = true;
start_of_name_component = false;
posix_path = true;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-559-gadd8163

2009-03-18 Thread Jeremy Allison
The branch, master has been updated
   via  add8163c3b301ff153e7b492265fc2dc72784c7e (commit)
   via  a00a9e4e2cc30338b4b44109e384f16f5df76f0b (commit)
  from  d380c49791d1010d759369cab12d93b6fbd48dc7 (commit)

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


- Log -
commit add8163c3b301ff153e7b492265fc2dc72784c7e
Merge: a00a9e4e2cc30338b4b44109e384f16f5df76f0b 
d380c49791d1010d759369cab12d93b6fbd48dc7
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:02:26 2009 -0700

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

commit a00a9e4e2cc30338b4b44109e384f16f5df76f0b
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:00:28 2009 -0700

Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

---

Summary of changes:
 source3/smbd/reply.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a743385..8b560bd 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -72,11 +72,16 @@ static NTSTATUS check_path_syntax_internal(char *path,
}
}
 
-   if (!stream_started  *s == ':') {
+   if (!posix_path  !stream_started  *s == ':') {
if (*p_last_component_contains_wcard) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
-   /* stream names allow more characters than file names */
+   /* Stream names allow more characters than file names.
+  We're overloading posix_path here to allow a wider
+  range of characters. If stream_started is true this
+  is still a Windows path even if posix_path is true.
+  JRA.
+   */
stream_started = true;
start_of_name_component = false;
posix_path = true;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-528-g8d8c25a

2009-03-18 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be (commit)
  from  a398deb3fe71a6c4c237b1f64dd7bbb8cb6bfa28 (commit)

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


- Log -
commit 8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:00:28 2009 -0700

Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

---

Summary of changes:
 source3/smbd/reply.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a743385..8b560bd 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -72,11 +72,16 @@ static NTSTATUS check_path_syntax_internal(char *path,
}
}
 
-   if (!stream_started  *s == ':') {
+   if (!posix_path  !stream_started  *s == ':') {
if (*p_last_component_contains_wcard) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
-   /* stream names allow more characters than file names */
+   /* Stream names allow more characters than file names.
+  We're overloading posix_path here to allow a wider
+  range of characters. If stream_started is true this
+  is still a Windows path even if posix_path is true.
+  JRA.
+   */
stream_started = true;
start_of_name_component = false;
posix_path = true;


-- 
Samba Shared Repository


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

2009-03-18 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  bf1474aee37976f0d7e3cece8f39b0046ee54209 (commit)
  from  41bf3933b955548c4877e6e3f8fe2768090833c4 (commit)

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


- Log -
commit bf1474aee37976f0d7e3cece8f39b0046ee54209
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:54:13 2009 -0700

Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.

---

Summary of changes:
 source/libsmb/clidfs.c |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c
index 9fdc239..5379ff9 100644
--- a/source/libsmb/clidfs.c
+++ b/source/libsmb/clidfs.c
@@ -665,13 +665,23 @@ static char *cli_dfs_make_full_path(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *dir)
 {
+   char path_sep = '\\';
+
/* Ensure the extrapath doesn't start with a separator. */
while (IS_DIRECTORY_SEP(*dir)) {
dir++;
}
 
-   return talloc_asprintf(ctx, \\%s\\%s\\%s,
-   cli-desthost, cli-share, dir);
+   if (cli-posix_capabilities  CIFS_UNIX_POSIX_PATHNAMES_CAP) {
+   path_sep = '/';
+   }
+   return talloc_asprintf(ctx, %c%s%c%s%c%s,
+   path_sep,
+   cli-desthost,
+   path_sep,
+   cli-share,
+   path_sep,
+   dir);
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-529-g913d1f2

2009-03-18 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  913d1f2af87fa449881a6fd2774a9dfdcb198fb4 (commit)
  from  8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be (commit)

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


- Log -
commit 913d1f2af87fa449881a6fd2774a9dfdcb198fb4
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:56:48 2009 -0700

Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 18e7ab1..430807e 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -551,13 +551,23 @@ static char *cli_dfs_make_full_path(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *dir)
 {
+   char path_sep = '\\';
+
/* Ensure the extrapath doesn't start with a separator. */
while (IS_DIRECTORY_SEP(*dir)) {
dir++;
}
 
-   return talloc_asprintf(ctx, \\%s\\%s\\%s,
-   cli-desthost, cli-share, dir);
+   if (cli-posix_capabilities  CIFS_UNIX_POSIX_PATHNAMES_CAP) {
+   path_sep = '/';
+   }
+   return talloc_asprintf(ctx, %c%s%c%s%c%s,
+   path_sep,
+   cli-desthost,
+   path_sep,
+   cli-share,
+   path_sep,
+   dir);
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-560-g28e03f2

2009-03-18 Thread Jeremy Allison
The branch, master has been updated
   via  28e03f2011b331ab01b99f9ff6e049f938ec1a00 (commit)
  from  add8163c3b301ff153e7b492265fc2dc72784c7e (commit)

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


- Log -
commit 28e03f2011b331ab01b99f9ff6e049f938ec1a00
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:56:48 2009 -0700

Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 18e7ab1..430807e 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -551,13 +551,23 @@ static char *cli_dfs_make_full_path(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *dir)
 {
+   char path_sep = '\\';
+
/* Ensure the extrapath doesn't start with a separator. */
while (IS_DIRECTORY_SEP(*dir)) {
dir++;
}
 
-   return talloc_asprintf(ctx, \\%s\\%s\\%s,
-   cli-desthost, cli-share, dir);
+   if (cli-posix_capabilities  CIFS_UNIX_POSIX_PATHNAMES_CAP) {
+   path_sep = '/';
+   }
+   return talloc_asprintf(ctx, %c%s%c%s%c%s,
+   path_sep,
+   cli-desthost,
+   path_sep,
+   cli-share,
+   path_sep,
+   dir);
 }
 
 /


-- 
Samba Shared Repository


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

2009-03-18 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  0c11c2deee7ab9d281df6df91b793b7f1c1764a4 (commit)
  from  985ba585207e840caa17c3d87d93ef1ba5f15cbb (commit)

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


- Log -
commit 0c11c2deee7ab9d281df6df91b793b7f1c1764a4
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 20:54:13 2009 -0700

Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.

---

Summary of changes:
 source/libsmb/clidfs.c |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c
index 9fdc239..5379ff9 100644
--- a/source/libsmb/clidfs.c
+++ b/source/libsmb/clidfs.c
@@ -665,13 +665,23 @@ static char *cli_dfs_make_full_path(TALLOC_CTX *ctx,
struct cli_state *cli,
const char *dir)
 {
+   char path_sep = '\\';
+
/* Ensure the extrapath doesn't start with a separator. */
while (IS_DIRECTORY_SEP(*dir)) {
dir++;
}
 
-   return talloc_asprintf(ctx, \\%s\\%s\\%s,
-   cli-desthost, cli-share, dir);
+   if (cli-posix_capabilities  CIFS_UNIX_POSIX_PATHNAMES_CAP) {
+   path_sep = '/';
+   }
+   return talloc_asprintf(ctx, %c%s%c%s%c%s,
+   path_sep,
+   cli-desthost,
+   path_sep,
+   cli-share,
+   path_sep,
+   dir);
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-561-gc5394cd

2009-03-18 Thread Jeremy Allison
The branch, master has been updated
   via  c5394cd7cfd5a234d9ece5bcdf0166652f69234e (commit)
  from  28e03f2011b331ab01b99f9ff6e049f938ec1a00 (commit)

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


- Log -
commit c5394cd7cfd5a234d9ece5bcdf0166652f69234e
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 21:49:32 2009 -0700

Modify simple POSIX open test to use filenames containing a ':'
character. Should stop regressions of bug #6196.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 19849a8..6029eb0 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4160,8 +4160,8 @@ static bool run_opentest(int dummy)
 static bool run_simple_posix_open_test(int dummy)
 {
static struct cli_state *cli1;
-   const char *fname = \\posix.file;
-   const char *dname = \\posix.dir;
+   const char *fname = \\posix:file;
+   const char *dname = \\posix:dir;
uint16 major, minor;
uint32 caplow, caphigh;
int fnum1 = -1;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-530-g69093de

2009-03-18 Thread Jeremy Allison
The branch, v3-4-test has been updated
   via  69093de0a3ae958c214542bb4f374ed90ff1c82d (commit)
  from  913d1f2af87fa449881a6fd2774a9dfdcb198fb4 (commit)

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


- Log -
commit 69093de0a3ae958c214542bb4f374ed90ff1c82d
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 21:48:20 2009 -0700

Modify simple POSIX open test to use filenames containing a ':'
character. Should stop regressions of bug #6196.
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 19849a8..6029eb0 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4160,8 +4160,8 @@ static bool run_opentest(int dummy)
 static bool run_simple_posix_open_test(int dummy)
 {
static struct cli_state *cli1;
-   const char *fname = \\posix.file;
-   const char *dname = \\posix.dir;
+   const char *fname = \\posix:file;
+   const char *dname = \\posix:dir;
uint16 major, minor;
uint32 caplow, caphigh;
int fnum1 = -1;


-- 
Samba Shared Repository