[Samba] Join AD: no logon server

2008-10-23 Thread Tam McLaughlin
Hello,

I am trying to join my server to a Win2k AD domain.
I have configured kerberos and can get a ticket but when I try to join the
AD I get the error Failed to join domain: No logon servers as detailed
below.

I have searched the archives and google and followed some suggestions to get
my files into the correct format but still have a problem.

I am using Samba version 3.0.32-0.fc8 on Fedora 8, kernel 2.6.25.11-60.fc8

I have detailed my krb5.conf, smb.conf, kinit cmd and debug output from my
net ads join cmd below.

Can anyone offer me any pointers?
Is there anything I can get the windows admin to check?

Thanks

Tam



/etc/krb5.conf

[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = NSUK.NSC.COM
 dns_lookup_realm = false
 dns_lookup_kdc = false
 ticket_lifetime = 24h
 forwardable = yes

[realms]
 NSUK.NSC.COM = {
  kdc= nsuk-ukdc3.nsuk.nsc.com
  admin_server   = nsuk-ukdc3.nsuk.nsc.com
  default_domain = nsuk.nsc.com
 }

[domain_realm]
 .nsuk.nsc.com = NSUK.NSC.COM
 nsuk.nsc.com = NSUK.NSC.COM

[appdefaults]
 pam = {
   debug = false
ticket_lifetime = 36000
   renew_lifetime = 36000
   forwardable = true
   krb4_convert = false
 }


=
/etc/samba/smb.conf
=

[global]
workgroup = NSUK
netbios name = uklnxws01
security = ads
realm = NSUK.NSC.COM
password server = 10.191.2.29
encrypt passwords = yes
domain master = no
domain logons = no
local master = no
preferred master = no


==
kinit
==
#kinit  [EMAIL PROTECTED]
Password for [EMAIL PROTECTED]:
#klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: [EMAIL PROTECTED]

Valid starting ExpiresService principal
10/22/08 16:49:56  10/23/08 02:50:04  krbtgt/[EMAIL PROTECTED]
renew until 10/23/08 16:49:56
Kerberos 4 ticket cache: /tmp/tkt0
klist: You have no tickets cached


=
other
=

cat /etc/hosts
10.191.2.29 nsuk-ukdc3   nsuk-ukdc3.nsuk.nsc.com

cat /etc/resolv.conf
domain nsc.com
nameserver 10.191.2.29
nameserver x.x.x.x
nameserver y.y.y.y


nslookup nsuk-ukdc3.nsuk.nsc.com   10.191.2.29

returns ok

but

nslookup nsuk-ukdc3

does not unless I use nsuk-ukdc.nsuk.nsc.com

=

I have tried using: net ads join in a number of combinations including
without the -S and createcomputer but the debug output is effectively the
same:

# net ads  join  createcomputer=servers/unix -Snsuk-
ukdc3.uk.nsc.com -d10
[2008/10/22 16:51:35, 5] lib/debug.c:debug_dump_status(391)
  INFO: Current debug levels:
all: True/10
tdb: False/0
printdrivers: False/0
lanman: False/0
smb: False/0
rpc_parse: False/0
rpc_srv: False/0
rpc_cli: False/0
passdb: False/0
sam: False/0
auth: False/0
winbind: False/0
vfs: False/0
idmap: False/0
quota: False/0
acls: False/0
locking: False/0
msdfs: False/0
dmapi: False/0

  Processing section [global]
  doing parameter workgroup = NSUK
  doing parameter netbios name = uklnxws01
[2008/10/22 16:51:35, 4] param/loadparm.c:handle_netbios_name(3153)
  handle_netbios_name: set global_myname to: UKLNXWS01
  doing parameter server string = Samba Server Version %v
  doing parameter security = ads
  doing parameter realm = NSUK.NSC.COM
  doing parameter password server = 10.191.2.29
  doing parameter encrypt passwords = yes
  doing parameter domain master = no
  doing parameter domain logons = no
  doing parameter local master = no
  doing parameter preferred master = no

2008/10/22 16:51:35, 4] param/loadparm.c:lp_load(5095)
  pm_process() returned Yes
[2008/10/22 16:51:35, 7] param/loadparm.c:lp_servicenumber(5233)
  lp_servicenumber: couldn't find homes
[2008/10/22 16:51:35, 10] param/loadparm.c:set_server_role(4339)
  set_server_role: role = ROLE_DOMAIN_MEMBER
[2008/10/22 16:51:35, 5] lib/iconv.c:smb_register_charset(105)
  Attempting to register new charset UCS-2LE

  Netbios name list:-
  my_netbios_names[0]=UKLNXWS01
[2008/10/22 16:51:35, 2] lib/interface.c:add_interface(81)
  added interface ip=10.191.164.102 bcast=10.191.164.255 nmask=255.255.255.0
[2008/10/22 16:51:35, 2] lib/interface.c:add_interface(81)
  added interface ip=192.168.122.1 bcast=192.168.122.255 nmask=255.255.255.0
[2008/10/22 16:51:35, 2] lib/interface.c:add_interface(81)
  added interface ip=192.168.87.1 bcast=192.168.87.255 nmask=255.255.255.0
[2008/10/22 16:51:35, 2] lib/interface.c:add_interface(81)
  added interface ip=192.168.104.1 bcast=192.168.104.255 nmask=255.255.255.0
[2008/10/22 16:51:35, 5] lib/gencache.c:gencache_init(61)
  Opening cache file at /var/lib/samba/gencache.tdb
[2008/10/22 16:51:35, 10] lib/gencache.c:gencache_get(212)
  Cache entry with key = AD_SITENAME/DOMAIN/NSUK.NSC.COM 

[Samba] PDA-Logon: mal formed packet

2008-10-23 Thread Bernd Kloss

Debian Lenny
Samba 3.2.3
LOOX N560 with Windows Mobile 5


Hello,

 my PDA LOOX N560 could connect via WLAN to SAMBA under Etch. 

Meanwhile I upgraded to Debian Lenny and now may PDA cannot connect anymore to 
the server. Error 1223 or 1222.  
Connecting to XP-Clients via WLAN is okay.

Connecting to Samba Wireshark tells me: 
malformed packet:


No.     Time        Source                Destination           Protocol Info
     30 34.499685   10.0.0.245            10.0.0.247            SMB      
Session Setup AndX Request, NTLMSSP_NEGOTIATE[Malformed Packet]


The PDA is 10.0.0.245
the server is 10.0.0.247

Any clue, what is going wrong and what to do about it?

Thank you and regards
Bernd Kloss


No.     Time        Source                Destination           Protocol Info
      1 0.00    10.0.0.248            10.0.0.247            SMB      Echo 
Request

Frame 1 (107 bytes on wire, 107 bytes captured)
Ethernet II, Src: GemtekTe_59:ba:87 (00:14:a5:59:ba:87), Dst: 3com_4e:f8:62 
(00:60:08:4e:f8:62)
Internet Protocol, Src: 10.0.0.248 (10.0.0.248), Dst: 10.0.0.247 (10.0.0.247)
Transmission Control Protocol, Src Port: polestar (1060), Dst Port: 
netbios-ssn (139), Seq: 1, Ack: 1, Len: 53
NetBIOS Session Service
SMB (Server Message Block Protocol)

No.     Time        Source                Destination           Protocol Info
      2 0.000151    10.0.0.247            10.0.0.248            SMB      Echo 
Response

Frame 2 (107 bytes on wire, 107 bytes captured)
Ethernet II, Src: 3com_4e:f8:62 (00:60:08:4e:f8:62), Dst: GemtekTe_59:ba:87 
(00:14:a5:59:ba:87)
Internet Protocol, Src: 10.0.0.247 (10.0.0.247), Dst: 10.0.0.248 (10.0.0.248)
Transmission Control Protocol, Src Port: netbios-ssn (139), Dst Port: polestar 
(1060), Seq: 1, Ack: 54, Len: 53
NetBIOS Session Service
SMB (Server Message Block Protocol)

No.     Time        Source                Destination           Protocol Info
      3 0.195274    10.0.0.248            10.0.0.247            TCP      
polestar  netbios-ssn [ACK] Seq=54 Ack=54 Win=16936 Len=0

Frame 3 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: GemtekTe_59:ba:87 (00:14:a5:59:ba:87), Dst: 3com_4e:f8:62 
(00:60:08:4e:f8:62)
Internet Protocol, Src: 10.0.0.248 (10.0.0.248), Dst: 10.0.0.247 (10.0.0.247)
Transmission Control Protocol, Src Port: polestar (1060), Dst Port: 
netbios-ssn (139), Seq: 54, Ack: 54, Len: 0

No.     Time        Source                Destination           Protocol Info
      4 2.900967    10.0.0.245            10.0.0.255            NBNS     Name 
query NB 10.0.0.24720

Frame 4 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: FujitsuS_b6:03:43 (00:30:05:b6:03:43), Dst: Broadcast 
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.0.0.245 (10.0.0.245), Dst: 10.0.0.255 (10.0.0.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
      5 3.152472    10.0.0.245            10.0.0.255            NBNS     Name 
query NB 10.0.0.24720

Frame 5 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: FujitsuS_b6:03:43 (00:30:05:b6:03:43), Dst: Broadcast 
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.0.0.245 (10.0.0.245), Dst: 10.0.0.255 (10.0.0.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
      6 3.404525    10.0.0.245            10.0.0.255            NBNS     Name 
query NB 10.0.0.24720

Frame 6 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: FujitsuS_b6:03:43 (00:30:05:b6:03:43), Dst: Broadcast 
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.0.0.245 (10.0.0.245), Dst: 10.0.0.255 (10.0.0.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
      7 3.656776    10.0.0.245            10.0.0.255            NBNS     Name 
query NB 10.0.0.24720

Frame 7 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: FujitsuS_b6:03:43 (00:30:05:b6:03:43), Dst: Broadcast 
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.0.0.245 (10.0.0.245), Dst: 10.0.0.255 (10.0.0.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
      8 3.909886    10.0.0.245            10.0.0.255            NBNS     Name 
query NB 10.0.0.24720

Frame 8 (92 bytes on wire, 92 bytes captured)
Ethernet II, Src: FujitsuS_b6:03:43 (00:30:05:b6:03:43), Dst: Broadcast 
(ff:ff:ff:ff:ff:ff)
Internet Protocol, Src: 10.0.0.245 (10.0.0.245), Dst: 10.0.0.255 (10.0.0.255)
User Datagram Protocol, Src Port: netbios-ns (137), Dst Port: netbios-ns (137)
NetBIOS Name Service

No.     Time        Source                Destination           Protocol Info
      9 11.160140   10.0.0.247            

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

2008-10-23 Thread Sven Buchstaller
The short answer is that it is a very bad practice to use and poor design to 
use a single DIT across multiple domains.  It is much smarter to design and 
implement a separate DIT per domain

Greets Sven

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

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

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

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

 Andrew Bartlett


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


[Samba] Unable to logon using ssh when changing password server

2008-10-23 Thread Kristof Bruyninckx
Hello @ll,

I'm having the following problem on a RHEL 3 Update 3, with the latest
official release packages for RHEL 3.

samba-common-3.0.9-1.3E.13.2
samba-3.0.9-1.3E.13.2

When changing the ip adress in /etc/krb5.conf to use the W2003 domain
controller for kerberos authentication instead of the current W2000 it
becomes impossible the login to this server using ssh.
The command  $getent passwd still shows all the users.
The command $*wbinfo -t *shows checking the trust secret via RPC calls
succeeded $wbinfo -u still lists me all the users.
The shares are still accessible using explorer, but simply when a user tries
to login using ssh it fails showing the following messages in smdb.log

snip 
2008/10/23 11:29:36, 3] libsmb/clikrb5.c:ads_cleanup_expired_creds(319)
  Ticket in ccache[MEMORY:cliconnect] expiration Thu, 23 Oct 2008 21:29:36
GMT
[2008/10/23 11:29:36, 3] nsswitch/winbindd_ads.c:query_user(391)
  ads: query_user
[2008/10/23 11:29:36, 3] nsswitch/winbindd_ads.c:query_user(437)
  ads query_user gave kristof.bruyninckx
[2008/10/23 11:29:36, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(x

)
[2008/10/23 11:29:36, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(
   )
[2008/10/23 11:29:36, 3] nsswitch/winbindd_group.c:winbindd_getgroups(1003)
  [ 5220]: getgroups kristof.bruyninckx
[2008/10/23 11:29:38, 3] nsswitch/winbindd_user.c:winbindd_getpwnam(126)
  [ 5220]: getpwnam kristof.bruyninckx
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(x

)
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(
   )
[2008/10/23 11:29:38, 3] nsswitch/winbindd_user.c:winbindd_getpwnam(126)
  [ 5220]: getpwnam kristof.bruyninckx
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(x

)
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(
   )
[2008/10/23 11:29:38, 3] nsswitch/winbindd_user.c:winbindd_getpwnam(126)
  [ 5220]: getpwnam kristof.bruyninckx
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(x

)
[2008/10/23 11:29:38, 3] lib/charcnv.c:convert_string_allocate(567)
  convert_string_allocate: Conversion error: Incomplete multibyte sequence(
   )
snip

Is there anything I'm missing to make this version work with a W2003 DC ?

-- 
We are Microsoft.  What you are experiencing is not a problem; it is an
undocumented feature.

Insanity: doing the same thing over and over again and expecting different
results.
 - Albert Einstein
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] PDA-Logon: mal formed packet

2008-10-23 Thread Volker Lendecke
On Thu, Oct 23, 2008 at 10:13:59AM +0200, Bernd Kloss wrote:
 Debian Lenny
 Samba 3.2.3
 LOOX N560 with Windows Mobile 5
 
 
 Hello,
 
  my PDA LOOX N560 could connect via WLAN to SAMBA under Etch. 
 
 Meanwhile I upgraded to Debian Lenny and now may PDA cannot connect anymore 
 to 
 the server. Error 1223 or 1222.  
 Connecting to XP-Clients via WLAN is okay.
 
 Connecting to Samba Wireshark tells me: 
 malformed packet:
 
 
 No.     Time        Source                Destination           Protocol Info
      30 34.499685   10.0.0.245            10.0.0.247            SMB      
 Session Setup AndX Request, NTLMSSP_NEGOTIATE[Malformed Packet]

Can you send the full trace, not just this error message?

Thanks,

Volker


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

RE: [Samba] samba idmap ldap backend

2008-10-23 Thread Johan Hendriks
Well that did it, thank you very very much.

Did I read the documentation wrong or is it the documentation that need to be 
adjusted.

I read this 
http://us1.samba.org/samba/docs/man/Samba-Guide/unixclients.html#adssdm and 
then the section IDMAP Storage in LDAP using Winbind

regards,
Johan Hendriks

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.175 / Virus Database: 270.8.2/1741 - Release Date: 23-10-2008 7:54
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


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

2008-10-23 Thread William Jojo


 Original message 
Date: Wed, 22 Oct 2008 10:12:45 -0700
From: Jeremy Allison [EMAIL PROTECTED]  
Subject: Re: [Samba] Samba 3.2, Samba 3.3 release planning  
To: Christian Perrier [EMAIL PROTECTED]
Cc: samba@lists.samba.org,[EMAIL PROTECTED]

On Wed, Oct 22, 2008 at 06:35:50PM +0200, Christian Perrier wrote:
 Quoting Michael Adam ([EMAIL PROTECTED]):

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

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


Thanks Jeremy. And, of course, thanks to Karolin, Jerry and the rest of the 
Samba team. I think I will attempt a parallel 3.2, 3.3 release for those who 
are not ready to make a jump right away to a new relase.

Many thanks too all!


Cheers,
Bill


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


[Samba] unix password sync not working

2008-10-23 Thread Andrei Mikhailovsky
Hi

I am having problems with synchronisation of samba passwords with unix
passwords. I have set the following in my smb.conf:

unix password sync = Yes
pam password change = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \
passwd:*all*authentication*tokens*updated*successfully*
passwd chat debug = yes


When trying to change the unix password i have the following:

samba # smbpasswd bill
New SMB password:
Retype new SMB password:


The samba password is changed, however, the unix password in /etc/shadow
is not altered. Even though I have set the passwd chat debug option to
Yes, I do not see any entries in the log file when I run smbpasswd. The
log level is set to 10.

What am I missing here?

Many thanks

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


Re: [Samba] Manage password change without windows...

2008-10-23 Thread Marco Gaiarin

I'll come back on this a little.

 There's no a pam module that do what smbpasswd do?

Inspired by:

http://lists.samba.org/archive/samba/2003-February/060959.html

seems really that pam_smbpass works as expected, because are SAM-aware,
but need the availability, locally, of the SAM account database, eg
every client need not only to be a domain workstation, but also a DC,
or at least it is needed to define locally passdb backend, ldap *, and
all scripts.
A little too much for a 'simple' client configuration.


Still i'm confused about the fact that, with a simple smb.conf
configuration (eg, security = domain) i can simply use:

smbpasswd -r invernomuto

and change my password.

Looking at the source (utils/smbpasswd.c and
pam_smbpass/pam_smb_passwd.c) seems that the only difference is that
the first call:

password_change()

and the latter:

local_password_change()


I'm not a real c programmer, and i've not digged around all the code,
but seems that it is a matter to add a new parameter to the pam module
(dc=, eg) and change the function.


Please, say me something...

-- 
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''http://www.sv.lnf.it/
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)sv.lnf.it  tel +39-0434-842711  fax +39-0434-842797

Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Join AD: no logon server

2008-10-23 Thread Ray Van Dolson
On Thu, Oct 23, 2008 at 01:03:56AM -0700, Tam McLaughlin wrote:
 Hello,
 
 I am trying to join my server to a Win2k AD domain.
 I have configured kerberos and can get a ticket but when I try to join the
 AD I get the error Failed to join domain: No logon servers as detailed
 below.
 
 I have searched the archives and google and followed some suggestions to get
 my files into the correct format but still have a problem.
 
 I am using Samba version 3.0.32-0.fc8 on Fedora 8, kernel 2.6.25.11-60.fc8
 
 I have detailed my krb5.conf, smb.conf, kinit cmd and debug output from my
 net ads join cmd below.
 
 Can anyone offer me any pointers?
 Is there anything I can get the windows admin to check?
 
 Thanks
 
 Tam

From looking at the debug info, it doesn't seem that 10.191.2.29 is
answering properly.

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


[Samba] question about smbmount as user

2008-10-23 Thread Alex van den Bogaerdt

Hi,

It has been a while since I used samba so for all purposes I could be seen 
as a newbie.


Recently I installed samba and ran into a problem mounting shares as a user. 
I can work around this, no problem, but I'm curious about the *why*. 
Searching the mailing list (and other resources) did not reveal this 
problem, that's why I ask here.


Samba version 3.2.4
mount.cifs version 1.11-3.2.4


When mounting a share as a normal user, the mountpoint has to be owned by 
the user and needs to have at least u=rwx.


This means I can no longer set the mountpoint like so:
d-  2 root root  4096 Oct 23 14:58 someshare

After modifying line 1255 of mount.cifs.c  if((statbuf.st_uid == 
getuid())  (S_IRWXU == (statbuf.st_mode  S_IRWXU))) {  into  if(1) 
{ , I get what I think I want. A user can mount that share and the 
directory mode allows accessing the directory but only if mounted.



That line is not put in just to show off. This means I'm probably 
overlooking some security issue here. Can someone please enlighten me?



By the way, if a developer reads this:  mount.cifs -V does not show the 
version number. mount.cifs x -V does. Line 1051 prohibits this:  if (argc 
 2) {...} else {mount_cifs_usage();exit(1);}  Removing that else-block does 
not, at a first glance, seem to have unwanted effects.


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


Re: [Samba] unix password sync not working

2008-10-23 Thread Helmut Hullen
Hallo, Andrei,

Du (mlists) meintest am 23.10.08:

 When trying to change the unix password i have the following:

 samba # smbpasswd bill
 New SMB password:
 Retype new SMB password:


 The samba password is changed, however, the unix password in
 /etc/shadow is not altered. Even though I have set the passwd chat
 debug option to Yes, I do not see any entries in the log file when I
 run smbpasswd. The log level is set to 10.

Maybe the Linux password program says password to short; try it on a  
console.

Or try a password like a1B2c3D- with uppercase, numbers etc.

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


[Samba] desktop.ini in startup folder

2008-10-23 Thread Adam Williams

Whenever a person logs into a computer they've never logged into before,
even if they already have a roaming profile, on the new computer,
Windows XP is putting a desktop.ini in the startup folder, so when the
person's desktop loads, notepad pops up with desktop.ini displayed.  is
there a way to prevent XP from creating the desktop.ini in the startup
folder?

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


Re: [Samba] unix password sync not working

2008-10-23 Thread Mac
Howdy,


I am having problems with synchronisation of samba passwords with unix
passwords. I have set the following in my smb.conf:

unix password sync = Yes
pam password change = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \
passwd:*all*authentication*tokens*updated*successfully*
passwd chat debug = yes


When trying to change the unix password i have the following:

samba # smbpasswd bill
New SMB password:
Retype new SMB password:


The samba password is changed, however, the unix password in /etc/shadow
is not altered. Even though I have set the passwd chat debug option to
Yes, I do not see any entries in the log file when I run smbpasswd. The
log level is set to 10.

Password chat debug only appears at  log level 100, as it has the
clear-text of passwords in it. Be very careful who can access those log
files.




   Mac
  Assistant Systems Adminstrator @nibsc.ac.uk
[EMAIL PROTECTED]
   Work: +44 1707 641565  Everything else: +44 7956 237670 (anytime)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Interdomain trust between Samba and W2003 ADS in native mode

2008-10-23 Thread Sébastien Prud'homme
Hi,

I try to setup a two-way interdomain trust relationship between Samba
3.2.4 and W2003 ADS in native mode (not mixed-mode).

I follow this Samba HOWTO without success:
http://us6.samba.org/samba/docs/man/Samba-HOWTO-Collection/InterdomainTrusts.html

All is working fine if i use a Windows NT4 Server instead of W2003 ADS.

Is there something to do on Samba or ADS so that it works ? Security
tunings in Windows registry for instance?

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


[Samba] Sending / Receiving WinPopup on Ubuntu Linux Workstation

2008-10-23 Thread Michael Lueck

Greetings-

Perhaps slightly OT, but still involving the SMB/CIFS protocol:

I am searching for an application which would allow a Linux client (Ubuntu) to 
send/receive WinPopup messages.

The only one I have located thus far is LinPopup. However, it depends on the 
Samba (server) package. I do not want to deploy a bazillion Samba servers!

TIA!

--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

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


Re: [Samba] PDA-Logon: mal formed packet

2008-10-23 Thread Bernd Kloss
Am Donnerstag, 23. Oktober 2008 schrieb Volker Lendecke:
 On Thu, Oct 23, 2008 at 10:13:59AM +0200, Bernd Kloss wrote:
  Debian Lenny
  Samba 3.2.3
  LOOX N560 with Windows Mobile 5
 
 
  Hello,
 
   my PDA LOOX N560 could connect via WLAN to SAMBA under Etch.
 
  Meanwhile I upgraded to Debian Lenny and now may PDA cannot connect
  anymore to the server. Error 1223 or 1222.
  Connecting to XP-Clients via WLAN is okay.
 
  Connecting to Samba Wireshark tells me:
  malformed packet:
 
 
  No.     Time        Source                Destination           Protocol
  Info 30 34.499685   10.0.0.245            10.0.0.247            SMB
  Session Setup AndX Request, NTLMSSP_NEGOTIATE[Malformed Packet]

 Can you send the full trace, not just this error message?

 Thanks,

 Volker

I can only attach the file exported by wireshark, but don't know whether this 
will pass through to the list.
What else could I do?

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

Re: [Samba] PDA-Logon: mal formed packet

2008-10-23 Thread Bernd Kloss
Am Donnerstag, 23. Oktober 2008 schrieb Bernd Kloss:
 Am Donnerstag, 23. Oktober 2008 schrieb Volker Lendecke:
  On Thu, Oct 23, 2008 at 10:13:59AM +0200, Bernd Kloss wrote:
   Debian Lenny
   Samba 3.2.3
   LOOX N560 with Windows Mobile 5
  
  
   Hello,
  
    my PDA LOOX N560 could connect via WLAN to SAMBA under Etch.
  
   Meanwhile I upgraded to Debian Lenny and now may PDA cannot connect
   anymore to the server. Error 1223 or 1222.
   Connecting to XP-Clients via WLAN is okay.
  
   Connecting to Samba Wireshark tells me:
   malformed packet:
  
  
   No.     Time        Source                Destination          
   Protocol Info 30 34.499685   10.0.0.245            10.0.0.247          
    SMB Session Setup AndX Request, NTLMSSP_NEGOTIATE[Malformed Packet]
 
  Can you send the full trace, not just this error message?
 
  Thanks,
 
  Volker

 I can only attach the file exported by wireshark, but don't know whether
 this will pass through to the list.
 What else could I do?

 Thanks
 Bernd

Okay, the attachment did not pass through. How can I publish the information?

The error occurs in the SPNEGO-section. == I tried in smb.conf
[global]
client use spnego = yes and no

No success.
Regards 
Bernd

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


[Samba] recursibve listing of file owner, possible?

2008-10-23 Thread Steve Hanselman
Hi,

I'm writing a utility that needs to smbmount various shares from servers in 
numerous domains (no problem, all working) and then list the contents of the 
directories (no problem again) and obtain the windows file owner in a textual 
form.

Any ideas how I can achieve the last part efficiently?

I see that smbcacls can do it 1 file at a time, I really need  a way of doing 
it recursively.



The information contained in this email is intended for the personal and 
confidential use
of the addressee only. It may also be privileged information. If you are not 
the intended
recipient then you are hereby notified that you have received this document in 
error and
that any review, distribution or copying of this document is strictly 
prohibited. If you have
received  this communication in error, please notify Brendata immediately on:

+44 (0)1268 466100, or email '[EMAIL PROTECTED]'

Brendata (UK) Ltd
Nevendon Hall, Nevendon Road, Basildon, Essex. SS13 1BX  UK
Registered Office as above. Registered in England No. 2764339

See our current vacancies at www.brendata.co.uk
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] high cpu load

2008-10-23 Thread Wayne Cochran

I think I have narrowed down the problem why smbd processes are soaking
up so much CPU on our file server. Here are some selected samples from
strace output as I attached to the offending smbd process:

Culprit #1

I took three sample snapshots, each lasted for several seconds, and I  
took them
minutes apart from each other.  I noticed many lines involved stat'ing  
the

a single file in the 'My Documents' subdirectory:

stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
0744, st_size=0, ...}) = 0
utimes(My Documents/The Picture of Dorian Grey.rtf, {1224548572, 0})  
= 0


To see the frequency of these I grep'ed and use wc -l to get a line  
count:


# grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
qqq.txt | wc -l

462
# grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
rrr.txt | wc -l

1065
s# grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
ppp.txt | wc -l

429

Thousands of times this file is being stat'ed!?!?

Culprit #2 : some small samples from strace:

read(5, \0\0\0H, 4)   = 4
read(5,  
\377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\4\0\230..., 72) = 72
stat64(.windows_settings/Application Data/SolidWorks 2008/Scheduler_2/ 
swbo1.mdb, {st_mode=S_IFREG|0744, st_size=974848, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=25416,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=25416,  
len=1}, 0xbfa355f4) = 0
write(5, \0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0...,  
104) = 104

gettimeofday({1224788202, 767660}, NULL) = 0
select(30, [5 21 29], [], NULL, {60, 0}) = 1 (in [5], left {60, 0})
read(5, \0\0\0), 4)   = 4

tat64(My Documents, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa355f4) = 0
write(5, \0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0...,  
104) = 104

gettimeofday({1224788207, 113052}, NULL) = 0
select(30, [5 21 29], [], NULL, {60, 0}) = 1 (in [5], left {60, 0})
read(5, \0\0\0f, 4)   = 4
read(5, \377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\4\0L...,  
102) = 102

stat64(My Documents, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa355d4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa355f4) = 0
write(5, \0\0\0t\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0...,  
120) = 120

gettimeofday({1224788207, 117652}, NULL) = 0
select(30, [5 21 29], [], NULL, {60, 0}) = 1 (in [5], left {60, 0})
read(5, \0\0\0p, 4)   = 4
read(5, \377SMB\242\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\4...,  
112) = 112

stat64(My Documents, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
gettimeofday({1224788207, 120639}, NULL) = 0
fcntl64(13, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa35ba4) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=17928,  
len=1}, 0xbfa35b34) = 0

stat64(My Documents, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
gettimeofday({1224788207, 122416}, NULL) = 0

Why is My Documents being stat'ed and read so much!?!?!

Lets see what's in this directory:

# pwd
/home/yongffa/My Documents


Almost a gigabyte of stuff?

# ls -l
total 29380
drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-11 15:05 네이트 
온 받은 파일
-rwxr--r-- 1 yongffa Domain Users  3259699 2008-08-14 17:16  
ALZip_eng_632.exe

drwxr-xr-x 2 yongffa Domain Users 4096 2008-01-29 11:38 ansys
drwxr-xr-x 2 yongffa Domain Users 4096 2008-09-29 21:45 conver3k
-rwxr--r-- 1 yongffa Domain Users   109977 2008-09-29 21:45 conver3k.zip
-rwxr--r-- 1 yongffa Domain Users 1658 2008-03-27 16:39 Default.rdp
-rwxr--r-- 1 yongffa Domain Users   78 2008-10-21 10:47 desktop.ini
drwxr-xr-x 3 yongffa Domain Users 4096 2008-04-15 20:06  
fesafe.version.5.3
-rwxr--r-- 1 yongffa Domain Users   824519 2008-09-29 21:35  
free_converter_setup.exe
-rwxr--r-- 1 yongffa Domain Users32768 2008-06-25 12:31  
helium.vancouver.wsu.edu-0001.pst

drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-14 18:26 MATLAB
drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-21 10:48 My Music
drwxr-xr-x 3 yongffa Domain Users 4096 2008-10-21 10:48 My Pictures
drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-25 12:46 My Videos
drwxr-xr-x 2 yongffa Domain Users 4096 2008-04-25 17:54  
Our.Finest.Hour.2008.DVDRip.x264.AC3.iNT-DG

-rwxr--r-- 1 yongffa Domain Users32768 2008-08-04 16:29 outlook.pst
-rwxr--r-- 1 yongffa Domain Users 25739264 2008-06-28 06:01 Personal  
Folders(1).pst

[EMAIL PROTECTED]:/home/yongffa/My Documents# du -sk .
971504  .


# ls -lR | more
total 29380
drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-11 15:05 네이트 
온 받은 파일
-rwxr--r-- 1 yongffa Domain Users  

Re: [Samba] high cpu load

2008-10-23 Thread John Drescher
 Why is My Documents being stat'ed and read so much!?!?!

 Lets see what's in this directory:

 # pwd
 /home/yongffa/My Documents


 Almost a gigabyte of stuff?

 # ls -l
 total 29380
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-11 15:05 네이트온 받은 파일
 -rwxr--r-- 1 yongffa Domain Users  3259699 2008-08-14 17:16
 ALZip_eng_632.exe
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-01-29 11:38 ansys
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-09-29 21:45 conver3k
 -rwxr--r-- 1 yongffa Domain Users   109977 2008-09-29 21:45 conver3k.zip
 -rwxr--r-- 1 yongffa Domain Users 1658 2008-03-27 16:39 Default.rdp
 -rwxr--r-- 1 yongffa Domain Users   78 2008-10-21 10:47 desktop.ini
 drwxr-xr-x 3 yongffa Domain Users 4096 2008-04-15 20:06
 fesafe.version.5.3
 -rwxr--r-- 1 yongffa Domain Users   824519 2008-09-29 21:35
 free_converter_setup.exe
 -rwxr--r-- 1 yongffa Domain Users32768 2008-06-25 12:31
 helium.vancouver.wsu.edu-0001.pst
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-14 18:26 MATLAB
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-21 10:48 My Music
 drwxr-xr-x 3 yongffa Domain Users 4096 2008-10-21 10:48 My Pictures
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-25 12:46 My Videos
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-04-25 17:54
 Our.Finest.Hour.2008.DVDRip.x264.AC3.iNT-DG
 -rwxr--r-- 1 yongffa Domain Users32768 2008-08-04 16:29 outlook.pst
 -rwxr--r-- 1 yongffa Domain Users 25739264 2008-06-28 06:01 Personal
 Folders(1).pst
 [EMAIL PROTECTED]:/home/yongffa/My Documents# du -sk .
 971504  .


 # ls -lR | more
 total 29380
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-11 15:05 네이트온 받은 파일
 -rwxr--r-- 1 yongffa Domain Users  3259699 2008-08-14 17:16
 ALZip_eng_632.exe
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-01-29 11:38 ansys
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-09-29 21:45 conver3k
 -rwxr--r-- 1 yongffa Domain Users   109977 2008-09-29 21:45 conver3k.zip
 -rwxr--r-- 1 yongffa Domain Users 1658 2008-03-27 16:39 Default.rdp
 -rwxr--r-- 1 yongffa Domain Users   78 2008-10-21 10:47 desktop.ini
 drwxr-xr-x 3 yongffa Domain Users 4096 2008-04-15 20:06
 fesafe.version.5.3
 -rwxr--r-- 1 yongffa Domain Users   824519 2008-09-29 21:35
 free_converter_setup.exe
 -rwxr--r-- 1 yongffa Domain Users32768 2008-06-25 12:31
 helium.vancouver.wsu.edu-0001.pst
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-14 18:26 MATLAB
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-10-21 10:48 My Music
 drwxr-xr-x 3 yongffa Domain Users 4096 2008-10-21 10:48 My Pictures
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-06-25 12:46 My Videos
 drwxr-xr-x 2 yongffa Domain Users 4096 2008-04-25 17:54
 Our.Finest.Hour.2008.DVDRip.x264.AC3.iNT-DG
 -rwxr--r-- 1 yongffa Domain Users32768 2008-08-04 16:29 outlook.pst
 -rwxr--r-- 1 yongffa Domain Users 25739264 2008-06-28 06:01 Personal
 Folders(1).pst

 ./네이트온 받은 파일:
 total 848532
 -rwxr--r-- 1 yongffa Domain Users   5035651 2008-01-31 15:05
 loding206mpa-relaxation-ellipse-crack-1mm-06mm-Al2024-0114.inp
 -rwxr--r-- 1 yongffa Domain Users 862866940 2008-01-31 14:08
 relaxation-ellipse-Al2024-comp-bogang-bojo.odb
 -rwxr--r-- 1 yongffa Domain Users125952 2008-01-31 16:25
 SsCx-ellipse-1mm-06mm-al2024-jan23.xls

 ./ansys:
 total 4
 -rwxr--r-- 1 yongffa Domain Users 818 2008-01-29 11:38 STATUS.lis
 snip

 Is this always being read every friggin' time they log in!?!?!

For roaming profiles yes. Unless you set these folders to not sync
(registry or policy settings) the entire 1GB will be transferred when
you logon and logoff.

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

Re: [Samba] high cpu load

2008-10-23 Thread Jeremy Allison
On Thu, Oct 23, 2008 at 02:27:27PM -0700, Wayne Cochran wrote:
 I think I have narrowed down the problem why smbd processes are soaking
 up so much CPU on our file server. Here are some selected samples from
 strace output as I attached to the offending smbd process:

 Culprit #1

 I took three sample snapshots, each lasted for several seconds, and I  
 took them
 minutes apart from each other.  I noticed many lines involved stat'ing  
 the
 a single file in the 'My Documents' subdirectory:

 stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
 0744, st_size=0, ...}) = 0
 utimes(My Documents/The Picture of Dorian Grey.rtf, {1224548572, 0}) = 
 0

 To see the frequency of these I grep'ed and use wc -l to get a line  
 count:

 # grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 qqq.txt | wc -l
 462
 # grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 rrr.txt | wc -l
 1065
 s# grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 ppp.txt | wc -l
 429

 Thousands of times this file is being stat'ed!?!?

What is the client doing at this point ? It's very possible
that this is what the client is requesting.

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


RE: [Samba] high cpu load

2008-10-23 Thread Cochran, Wayne Owen



-Original Message-
From: Jeremy Allison [mailto:[EMAIL PROTECTED]
Sent: Thu 10/23/2008 4:17 PM
To: Cochran, Wayne Owen
Cc: samba@lists.samba.org
Subject: Re: [Samba] high cpu load
 
On Thu, Oct 23, 2008 at 02:27:27PM -0700, Wayne Cochran wrote:
 I think I have narrowed down the problem why smbd processes are soaking
 up so much CPU on our file server. Here are some selected samples from
 strace output as I attached to the offending smbd process:

 Culprit #1

 I took three sample snapshots, each lasted for several seconds, and I  
 took them
 minutes apart from each other.  I noticed many lines involved stat'ing  
 the
 a single file in the 'My Documents' subdirectory:

 stat64(My Documents/The Picture of Dorian Grey.rtf, {st_mode=S_IFREG| 
 0744, st_size=0, ...}) = 0
 utimes(My Documents/The Picture of Dorian Grey.rtf, {1224548572, 0}) = 
 0

 To see the frequency of these I grep'ed and use wc -l to get a line  
 count:

 # grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 qqq.txt | wc -l
 462
 # grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 rrr.txt | wc -l
 1065
 s# grep 'stat64(My Documents/The Picture of Dorian Grey.rtf' /tmp/ 
 ppp.txt | wc -l
 429

 Thousands of times this file is being stat'ed!?!?

What is the client doing at this point ? It's very possible
that this is what the client is requesting.


By client I assume you mean the user is explicitly asking for all
this data to be transferred. This is very unlikely since this is happening
frequently throughout the day -- sometimes 5 or 6 clients simultanously --
so it must be something thats happening automatically.

Of course none of this explains why the RTF file is being stat'ed thousands
of times! 

--w

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


Re: [Samba] high cpu load

2008-10-23 Thread Jeremy Allison
On Thu, Oct 23, 2008 at 04:22:52PM -0700, Cochran, Wayne Owen wrote:

 By client I assume you mean the user is explicitly asking for all
 this data to be transferred. This is very unlikely since this is happening
 frequently throughout the day -- sometimes 5 or 6 clients simultanously --
 so it must be something thats happening automatically.

No I don't mean the user is requesting this, I mean the client
redirector on the Windows box.

 Of course none of this explains why the RTF file is being stat'ed thousands
 of times! 

Turn up the debug level on an affected smbd using 

smbcontrol pid debug 10

and then see if the client is actually requesting
this data transfer. smbd doesn't stat files unless
it's a client request so this may be a client issue,
not a server one.

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


Re: [Samba] recursibve listing of file owner, possible?

2008-10-23 Thread Ryan Bair
You just need the owner of the files? You can do this quite easily
using the find utility with the -printf option.

--Ryan

On Thu, Oct 23, 2008 at 3:21 PM, Steve Hanselman [EMAIL PROTECTED] wrote:
 Hi,

 I'm writing a utility that needs to smbmount various shares from servers in 
 numerous domains (no problem, all working) and then list the contents of the 
 directories (no problem again) and obtain the windows file owner in a textual 
 form.

 Any ideas how I can achieve the last part efficiently?

 I see that smbcacls can do it 1 file at a time, I really need  a way of doing 
 it recursively.



 The information contained in this email is intended for the personal and 
 confidential use
 of the addressee only. It may also be privileged information. If you are not 
 the intended
 recipient then you are hereby notified that you have received this document 
 in error and
 that any review, distribution or copying of this document is strictly 
 prohibited. If you have
 received  this communication in error, please notify Brendata immediately on:

 +44 (0)1268 466100, or email '[EMAIL PROTECTED]'

 Brendata (UK) Ltd
 Nevendon Hall, Nevendon Road, Basildon, Essex. SS13 1BX  UK
 Registered Office as above. Registered in England No. 2764339

 See our current vacancies at www.brendata.co.uk
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/listinfo/samba

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


Re: [Samba] PDA-Logon: mal formed packet

2008-10-23 Thread James Kosin
- Original Message - 
From: Bernd Kloss [EMAIL PROTECTED]

Newsgroups: linux.samba
Sent: Thursday, October 23, 2008 3:40 PM
Subject: Re: [Samba] PDA-Logon: mal formed packet


Am Donnerstag, 23. Oktober 2008 schrieb Bernd Kloss:


 Can you send the full trace, not just this error message?

 Thanks,

 Volker

I can only attach the file exported by wireshark, but don't know whether
this will pass through to the list.
What else could I do?

Thanks
Bernd


Okay, the attachment did not pass through. How can I publish the 
information?




 Reply 
Bernd,

Copy and paste the relavent packets to the email.  They don't need to be 
large attachments.  Just need to see the packets... especially the malformed 
one.  Try to highlight the one that is malformed if possible.


James 


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


Re: [Samba] PDA-Logon: mal formed packet

2008-10-23 Thread Volker Lendecke
On Thu, Oct 23, 2008 at 10:39:09PM -0400, James Kosin wrote:
 I can only attach the file exported by wireshark, but don't know whether
 this will pass through to the list.
 What else could I do?
 
 Thanks
 Bernd
 
 Okay, the attachment did not pass through. How can I publish the 
 information?
 
 
 
  Reply 
 Bernd,
 
 Copy and paste the relavent packets to the email.  They don't need to be 
 large attachments.  Just need to see the packets... especially the 
 malformed one.  Try to highlight the one that is malformed if possible.

Feel free to send the sniff to me (and possibly Jeremy) directly.

Volker


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

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

2008-10-23 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  4c6a72d5e0510472247e49edf341d27a6ecb (commit)
  from  9d325aef4ba694c6adfc0b951baafdee9057ed43 (commit)

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


- Log -
commit 4c6a72d5e0510472247e49edf341d27a6ecb
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Thu Oct 23 09:24:28 2008 +0200

WHATSNEW: Update changes since 3.3.0pre2.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index cd64f6d..1925866 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -180,6 +180,10 @@ o   Jeremy Allison [EMAIL PROTECTED]
 * Correctly fix smbclient to terminate on eof from server.
 * Fix client timeout when searching for a large number of cups printers.
 * Unify access checks for lsa server functions.
+* Remove the requirement for ldap call made as root.
+* Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
+* Fix net rpc vampire, based on an *amazing* piece of debugging work by
+  Cooper S. Blake [EMAIL PROTECTED].
 
 
 o   Gerald (Jerry) Carter [EMAIL PROTECTED]
@@ -189,6 +193,10 @@ o   Gerald (Jerry) Carter [EMAIL PROTECTED]
 
 o   Günther Deschner [EMAIL PROTECTED]
 * Ensure consistency when reporting password complexity.
+* Fix _lsa_GetUserName.
+* Fix access check in _samr_QuerySecurity().
+* _samr_DeleteUser needs to wipe out the user_handle on success.
+* NetGroupEnum_r needs to handle servers with no groups.
 
 
 o   Jeff Layton [EMAIL PROTECTED]
@@ -198,6 +206,7 @@ o   Jeff Layton [EMAIL PROTECTED]
 
 o   Volker Lendecke [EMAIL PROTECTED]
 * BUG 5691: Fig smbd panic on Solaris.
+* BUG 5840: Fix segfault in rpcclient lsaaddacctrights.
 * Fix a potential NULL deref in found by the IBM Checker.
 * Fix an uninitialized variable found by the IBM Checker.
 * Fix an unlikely memleak found by the IBM Checker.
@@ -215,6 +224,10 @@ o   Tim Prouty [EMAIL PROTECTED]
 * Fix several build warnings.
 
 
+o   Andreas Schneider [EMAIL PROTECTED]
+* Delete the krb5 ccname variable from the PAM environment if set.
+
+
 Commit Highlights:
 --
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0pre2-77-gdf97ffb

2008-10-23 Thread Karolin Seeger
The branch, v3-3-stable has been updated
   via  df97ffbaf376ea322b30465332cbba0f2af5ce42 (commit)
   via  ed04743ba9362402fc1d92b649cc06783c1b8bfd (commit)
   via  f9152d58889aacff4529929883e841ab3dc9d165 (commit)
   via  fa1f4c9a26839fdd7305e40df8decc684263bbc9 (commit)
   via  96f461fb5cbc99cb0952fd4e9e39df8fbe23c6b9 (commit)
   via  d104f6b53f36cd8e534714f1a3d02bfe32e25965 (commit)
   via  cdf23296ce7fe2bc060a4ef92517f8d7b30652aa (commit)
   via  7d39ee10d3ba9674819182f8d1436d1ee031836c (commit)
   via  2c259d04eff457884d030637c35623bfd27c9ba6 (commit)
   via  14d009a9fbd94e7acb08d5b209439d46b5589f77 (commit)
  from  271d77cc9d3543276ab88da140392b1bcbdc855d (commit)

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


- Log -
commit df97ffbaf376ea322b30465332cbba0f2af5ce42
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Thu Oct 23 09:24:28 2008 +0200

WHATSNEW: Update changes since 3.3.0pre2.

Karolin
(cherry picked from commit 4c6a72d5e0510472247e49edf341d27a6ecb)

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

netapi: NetGroupEnum_r needs to handle servers with no groups.

Guenther
(cherry picked from commit 9d325aef4ba694c6adfc0b951baafdee9057ed43)

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

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

Guenther
(cherry picked from commit 8a0054c6d273049bea235803db25912f6cf03610)

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

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

Guenther
(cherry picked from commit 7693d853933e1d7ece9261847bab53e2b73dfa50)

commit 96f461fb5cbc99cb0952fd4e9e39df8fbe23c6b9
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Wed Oct 22 13:29:21 2008 -0700

Janitor for Guenther, fix _lsa_GetUserName.
Jeremy.
(cherry picked from commit 5ee3d6c3b1394e705691247b471c4511244a97af)

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

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

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

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

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

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

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

Fix this by removing the rid_crypt parameter.
Jeremy.
(cherry picked from commit 3690f2d87549840b5408771d2596069ff1732fc5)

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

Fix bug 5840: Segfault in rpcclient lsaaddacctrights
(cherry picked from commit da21102b557d809009d59aa7dff3c55e72a3afea)

commit 7d39ee10d3ba9674819182f8d1436d1ee031836c
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   

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

2008-10-23 Thread Karolin Seeger
The branch, v3-2-test has been updated
   via  71de4d58bb2aea6a98e94055387ef6671aa64410 (commit)
  from  40a904ee021e4c9390235f1d476bc37b87ac9b70 (commit)

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


- Log -
commit 71de4d58bb2aea6a98e94055387ef6671aa64410
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Thu Oct 23 12:04:02 2008 +0200

WHATSNEW: Update changes since 3.2.4.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 7011594..a9c4b6f 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -36,6 +36,10 @@ o   Jeremy Allison [EMAIL PROTECTED]
 * Restructure VFS SMB traffic analyzer VFS module.
 * Correctly fix smbclient to terminate on eof from server.
 * Unify access checks for lsa server functions.
+* Remove the requirement for ldap call made as root.
+* Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
+* Fix net rpc vampire, based on an *amazing* piece of debugging work by
+  Cooper S. Blake [EMAIL PROTECTED].
 
 
 o   Gerald (Jerry) Carter [EMAIL PROTECTED]
@@ -47,6 +51,10 @@ o   Guenther Deschner [EMAIL PROTECTED]
 * Fix duplicate installation of cifs.upcall.
 * Fix _srvsvc_NetShareAdd segfault.
 * Ensure consistency when reporting password complexity.
+* Fix _lsa_GetUserName.
+* Fix access check in _samr_QuerySecurity().
+* _samr_DeleteUser needs to wipe out the user_handle on success.
+* NetGroupEnum_r needs to handle servers with no groups.
 
 
 o   Holger Hetterich [EMAIL PROTECTED]
@@ -61,6 +69,7 @@ o   Jeff Layton [EMAIL PROTECTED]
 o   Volker Lendecke [EMAIL PROTECTED]
 * BUG 5691: Fig smbd panic on Solaris.
 * BUG 5778: Check if strlcpy and strlcat are already defined.
+* BUG 5840: Fix segfault in rpcclient lsaaddacctrights.
 * Fix a potential NULL deref in found by the IBM Checker.
 * Fix an uninitialized variable found by the IBM Checker.
 * Fix an unlikely memleak found by the IBM Checker.
@@ -81,6 +90,10 @@ o   Tim Prouty [EMAIL PROTECTED]
 * Fix several build warnings.
 
 
+o   Andreas Schneider [EMAIL PROTECTED]
+* Delete the krb5 ccname variable from the PAM environment if set.
+
+
 o   Andrew Tridgell [EMAIL PROTECTED]
 * Fix segfault on startup with trusted domains.
 * Re-add winbind:ignore domains parameter.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-4-70-gfd93db7

2008-10-23 Thread Karolin Seeger
The branch, v3-2-stable has been updated
   via  fd93db7084fdb5899fb823046b9d6ed1d05221c7 (commit)
   via  96b35c32ae99d74608ad95d063629554fee77979 (commit)
   via  b339f17132b18edad52b4c2f6b348e4b8d789bcb (commit)
   via  ae01a98d49be39c258e479d610fa2e58ea2b6c62 (commit)
   via  61046225de8a4cd77e94d8c5c4a8f510bc11b79e (commit)
   via  369fecaeb2470a1f7e68417ccdddb61334e37d92 (commit)
   via  042e50f8709cfbe45d5b184cb3c4fe1b16bdc3b0 (commit)
   via  ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e (commit)
  from  1d86b5e003effb4bb56ef9b0444da63a909fbc3c (commit)

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


- Log -
commit fd93db7084fdb5899fb823046b9d6ed1d05221c7
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Thu Oct 23 12:04:02 2008 +0200

WHATSNEW: Update changes since 3.2.4.

Karolin
(cherry picked from commit 71de4d58bb2aea6a98e94055387ef6671aa64410)

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

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

Guenther
(cherry picked from commit 25cb282f7042e8192c0bc6d720df0646b74e9a47)

commit b339f17132b18edad52b4c2f6b348e4b8d789bcb
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Oct 20 16:53:05 2008 -0700

Remove the requirement for ldap call made as root. Add in security
checks for all SAMR calls.
Jeremy.
(cherry picked from commit b848f96d747fb41c074dd073f24f186539257d71)

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

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

Guenther
(cherry picked from commit 8a0054c6d273049bea235803db25912f6cf03610)
(cherry picked from commit 40a904ee021e4c9390235f1d476bc37b87ac9b70)

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

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

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

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

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

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

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

Fix this by removing the rid_crypt parameter.
Jeremy.
(cherry picked from commit e38436f731ff09333588cc0751c79029a569f390)

commit 369fecaeb2470a1f7e68417ccdddb61334e37d92
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Wed Oct 22 14:26:05 2008 +0200

Fix bug 5840: Segfault in rpcclient lsaaddacctrights
(cherry picked from commit 79222e476edbccf81e70cf1c0d1f40db0b88e20b)

commit 042e50f8709cfbe45d5b184cb3c4fe1b16bdc3b0
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Tue Oct 21 17:06:53 2008 -0700

Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy.
(cherry picked from commit 82ec832f7edffe2fcfd1bb067e092c159bed2973)

commit ddba89d7713923bfbf1c8492c5dc6c6d5b220f1e
Author: Andreas Schneider [EMAIL PROTECTED]
Date:   Mon 

[SCM] Samba Shared Repository - branch master updated - 8a3bff343a21bc8b4c229bae5830db7462fea25f

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  8a3bff343a21bc8b4c229bae5830db7462fea25f (commit)
   via  b7c38abe27e7f5a0823f8dacff51b1724426314c (commit)
   via  fafa60844151c60e02f5b50e98e2e6e973e56d1d (commit)
   via  6e058e5977c6ca4369d09338d519fdd5f1611ca6 (commit)
   via  3566efede2a77b26615ceef50b89d50c59ce7119 (commit)
   via  29737ab5da4b8fd753e455bf00e1ad2c3ae8d957 (commit)
  from  60164e9002c28911dbfd7115cb9bff05be5aff25 (commit)

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


- Log -
commit 8a3bff343a21bc8b4c229bae5830db7462fea25f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 11:45:41 2008 +0200

s3-build: fix another build warning with the new ASN1 code.

Guenther

commit b7c38abe27e7f5a0823f8dacff51b1724426314c
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:32:38 2008 +0200

netapi: fix add_GROUP_USERS_INFO_X_buffer.

Guenther

commit fafa60844151c60e02f5b50e98e2e6e973e56d1d
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:32:15 2008 +0200

netapi: fix NetUserGetGroups_r returning partial results.

Guenther

commit 6e058e5977c6ca4369d09338d519fdd5f1611ca6
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:31:32 2008 +0200

s3-samr-server: unify callback convention: _samr_UserSetInfo.

Guenther

commit 3566efede2a77b26615ceef50b89d50c59ce7119
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:58 2008 +0200

s3-samr-server: unify callback convention: _samr_QueryDomainInfo.

Guenther

commit 29737ab5da4b8fd753e455bf00e1ad2c3ae8d957
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:14 2008 +0200

s3-samr-server: fix return code in _samr_QueryDisplayInformation.

Guenther

---

Summary of changes:
 source3/lib/netapi/user.c|   21 +--
 source3/libsmb/spnego.c  |7 ++-
 source3/rpc_server/srv_samr_nt.c |  105 ++
 3 files changed, 58 insertions(+), 75 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index fcb87b7..2abc25d 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2787,15 +2787,23 @@ NTSTATUS add_GROUP_USERS_INFO_X_buffer(TALLOC_CTX 
*mem_ctx,
 
switch (level) {
case 0:
-   u0.grui0_name = talloc_strdup(mem_ctx, group_name);
-   NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
+   if (group_name) {
+   u0.grui0_name = talloc_strdup(mem_ctx, 
group_name);
+   NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
+   } else {
+   u0.grui0_name = NULL;
+   }
 
ADD_TO_ARRAY(mem_ctx, struct GROUP_USERS_INFO_0, u0,
 (struct GROUP_USERS_INFO_0 **)buffer, 
num_entries);
break;
case 1:
-   u1.grui1_name = talloc_strdup(mem_ctx, group_name);
-   NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
+   if (group_name) {
+   u1.grui1_name = talloc_strdup(mem_ctx, 
group_name);
+   NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
+   } else {
+   u1.grui1_name = NULL;
+   }
 
u1.grui1_attributes = attributes;
 
@@ -2916,12 +2924,13 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
rids,
names,
types);
-   if (!NT_STATUS_IS_OK(status)) {
+   if (!NT_STATUS_IS_OK(status) 
+   !NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
werr = ntstatus_to_werror(status);
goto done;
}
 
-   for (i=0; i  rid_array-count; i++) {
+   for (i=0; i  names.count; i++) {
status = add_GROUP_USERS_INFO_X_buffer(ctx,
   r-in.level,
   names.names[i].string,
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index 72559cd..ee2c3c3 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -185,10 +185,13 @@ static bool read_negTokenTarg(ASN1_DATA *asn1, 
negTokenTarg_t *token)
asn1_end_tag(asn1);
asn1_end_tag(asn1);
break;
-   case ASN1_CONTEXT(1):
+   case ASN1_CONTEXT(1): {
+   const char *mech = NULL;

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

2008-10-23 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  579732653fc2354575303dbde392eb9c4eb4d62c (commit)
   via  5dfee79e5abd8ffb2a1e474fb17953ca54281103 (commit)
   via  aa301e82d0c44c6a733e8be2546d661ea56512ef (commit)
   via  ac2c35bc379de83091644455dbeba0bea3e5ceb6 (commit)
   via  30fa6c3ba19a8f816043405ba5d9eec84dd1c97b (commit)
  from  4c6a72d5e0510472247e49edf341d27a6ecb (commit)

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


- Log -
commit 579732653fc2354575303dbde392eb9c4eb4d62c
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:32:38 2008 +0200

netapi: fix add_GROUP_USERS_INFO_X_buffer.

Guenther

commit 5dfee79e5abd8ffb2a1e474fb17953ca54281103
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:32:15 2008 +0200

netapi: fix NetUserGetGroups_r returning partial results.

Guenther

commit aa301e82d0c44c6a733e8be2546d661ea56512ef
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:31:32 2008 +0200

s3-samr-server: unify callback convention: _samr_UserSetInfo.

Guenther

commit ac2c35bc379de83091644455dbeba0bea3e5ceb6
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:58 2008 +0200

s3-samr-server: unify callback convention: _samr_QueryDomainInfo.

Guenther

commit 30fa6c3ba19a8f816043405ba5d9eec84dd1c97b
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:14 2008 +0200

s3-samr-server: fix return code in _samr_QueryDisplayInformation.

Guenther

---

Summary of changes:
 source/lib/netapi/user.c|   21 ++--
 source/rpc_server/srv_samr_nt.c |  105 ++-
 2 files changed, 53 insertions(+), 73 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/user.c b/source/lib/netapi/user.c
index 7d0c47f..7edf1ce 100644
--- a/source/lib/netapi/user.c
+++ b/source/lib/netapi/user.c
@@ -2748,15 +2748,23 @@ NTSTATUS add_GROUP_USERS_INFO_X_buffer(TALLOC_CTX 
*mem_ctx,
 
switch (level) {
case 0:
-   u0.grui0_name = talloc_strdup(mem_ctx, group_name);
-   NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
+   if (group_name) {
+   u0.grui0_name = talloc_strdup(mem_ctx, 
group_name);
+   NT_STATUS_HAVE_NO_MEMORY(u0.grui0_name);
+   } else {
+   u0.grui0_name = NULL;
+   }
 
ADD_TO_ARRAY(mem_ctx, struct GROUP_USERS_INFO_0, u0,
 (struct GROUP_USERS_INFO_0 **)buffer, 
num_entries);
break;
case 1:
-   u1.grui1_name = talloc_strdup(mem_ctx, group_name);
-   NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
+   if (group_name) {
+   u1.grui1_name = talloc_strdup(mem_ctx, 
group_name);
+   NT_STATUS_HAVE_NO_MEMORY(u1.grui1_name);
+   } else {
+   u1.grui1_name = NULL;
+   }
 
u1.grui1_attributes = attributes;
 
@@ -2877,12 +2885,13 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
rids,
names,
types);
-   if (!NT_STATUS_IS_OK(status)) {
+   if (!NT_STATUS_IS_OK(status) 
+   !NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
werr = ntstatus_to_werror(status);
goto done;
}
 
-   for (i=0; i  rid_array-count; i++) {
+   for (i=0; i  names.count; i++) {
status = add_GROUP_USERS_INFO_X_buffer(ctx,
   r-in.level,
   names.names[i].string,
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index 86e5d83..ef40aa0 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -1647,7 +1647,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
/* calculate the total size */
total_data_size=num_account*struct_size;
 
-   if (num_account) {
+   if (max_entries = num_account) {
status = STATUS_MORE_ENTRIES;
} else {
status = NT_STATUS_OK;
@@ -2910,14 +2910,11 @@ NTSTATUS _samr_GetGroupsForUser(pipes_struct *p,
 }
 
 /***
- samr_QueryDomainInfo_internal
+ _samr_QueryDomainInfo
  /
 
-static NTSTATUS 

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

2008-10-23 Thread Günther Deschner
The branch, v3-2-test has been updated
   via  dcc40a6adec5d00c29a062164cbc68ff4a7779f8 (commit)
   via  02bc790f209f56cc704566ded46973efc35f4a4f (commit)
   via  0f6a80fb198f3cc4ffc875c77da3ff3d8b8c5ca3 (commit)
  from  71de4d58bb2aea6a98e94055387ef6671aa64410 (commit)

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


- Log -
commit dcc40a6adec5d00c29a062164cbc68ff4a7779f8
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:31:32 2008 +0200

s3-samr-server: unify callback convention: _samr_UserSetInfo.

Guenther
(cherry picked from commit aa301e82d0c44c6a733e8be2546d661ea56512ef)

commit 02bc790f209f56cc704566ded46973efc35f4a4f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:58 2008 +0200

s3-samr-server: unify callback convention: _samr_QueryDomainInfo.

Guenther
(cherry picked from commit ac2c35bc379de83091644455dbeba0bea3e5ceb6)

commit 0f6a80fb198f3cc4ffc875c77da3ff3d8b8c5ca3
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 03:30:14 2008 +0200

s3-samr-server: fix return code in _samr_QueryDisplayInformation.

Guenther
(cherry picked from commit 30fa6c3ba19a8f816043405ba5d9eec84dd1c97b)

---

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


Changeset truncated at 500 lines:

diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index ac3cdfa..a24fb32 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/rpc_server/srv_samr_nt.c
@@ -1648,7 +1648,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
/* calculate the total size */
total_data_size=num_account*struct_size;
 
-   if (num_account) {
+   if (max_entries = num_account) {
status = STATUS_MORE_ENTRIES;
} else {
status = NT_STATUS_OK;
@@ -2911,14 +2911,11 @@ NTSTATUS _samr_GetGroupsForUser(pipes_struct *p,
 }
 
 /***
- samr_QueryDomainInfo_internal
+ _samr_QueryDomainInfo
  /
 
-static NTSTATUS samr_QueryDomainInfo_internal(const char *fn_name,
- pipes_struct *p,
- struct policy_handle *handle,
- uint32_t level,
- union samr_DomainInfo 
**dom_info_ptr)
+NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
+  struct samr_QueryDomainInfo *r)
 {
NTSTATUS status = NT_STATUS_OK;
struct samr_info *info = NULL;
@@ -2940,28 +2937,26 @@ static NTSTATUS samr_QueryDomainInfo_internal(const 
char *fn_name,
 
uint32 num_users=0, num_groups=0, num_aliases=0;
 
-   DEBUG(5,(%s: %d\n, fn_name, __LINE__));
+   DEBUG(5,(_samr_QueryDomainInfo: %d\n, __LINE__));
 
dom_info = TALLOC_ZERO_P(p-mem_ctx, union samr_DomainInfo);
if (!dom_info) {
return NT_STATUS_NO_MEMORY;
}
 
-   *dom_info_ptr = dom_info;
-
/* find the policy handle.  open a policy on it. */
-   if (!find_policy_by_hnd(p, handle, (void **)(void *)info)) {
+   if (!find_policy_by_hnd(p, r-in.domain_handle, (void **)(void 
*)info)) {
return NT_STATUS_INVALID_HANDLE;
}
 
status = access_check_samr_function(info-acc_granted,
SA_RIGHT_SAM_OPEN_DOMAIN,
-   _samr_QueryDomainInfo_internal );
+   _samr_QueryDomainInfo );
 
if ( !NT_STATUS_IS_OK(status) )
return status;
 
-   switch (level) {
+   switch (r-in.level) {
case 0x01:
 
become_root();
@@ -3137,23 +3132,11 @@ static NTSTATUS samr_QueryDomainInfo_internal(const 
char *fn_name,
return NT_STATUS_INVALID_INFO_CLASS;
}
 
-   DEBUG(5,(%s: %d\n, fn_name, __LINE__));
-
-   return status;
-}
+   *r-out.info = dom_info;
 
-/***
- _samr_QueryDomainInfo
- /
+   DEBUG(5,(_samr_QueryDomainInfo: %d\n, __LINE__));
 
-NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
-  struct samr_QueryDomainInfo *r)
-{
-   return samr_QueryDomainInfo_internal(_samr_QueryDomainInfo,
-p,
-r-in.domain_handle,
-r-in.level,
-

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

2008-10-23 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  c69741cf19828ffcb051727029022a319437ee39 (commit)
   via  bf5934ebc7c2207f4813a3019ca109ca3b7c84c0 (commit)
   via  a156ab0597f539aea36cafa3429c7646c9eb5d7f (commit)
   via  b6e11d038a7620b6dfcae157a5cc353f193b6fa6 (commit)
  from  579732653fc2354575303dbde392eb9c4eb4d62c (commit)

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


- Log -
commit c69741cf19828ffcb051727029022a319437ee39
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Oct 20 16:34:56 2008 -0700

Fix warnings. Jeremy.

commit bf5934ebc7c2207f4813a3019ca109ca3b7c84c0
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 12 17:24:37 2008 +0200

netapi: add NetFile testsuite.

Guenther

commit a156ab0597f539aea36cafa3429c7646c9eb5d7f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Mon Sep 22 19:31:44 2008 +0200

netapi: fix case statement in example NetUserSetModals code.

Guenther

commit b6e11d038a7620b6dfcae157a5cc353f193b6fa6
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Sep 16 17:53:06 2008 +0200

netapi: start supporting NetUserSetInfo level 3.

Guenther

---

Summary of changes:
 source/lib/netapi/examples/user/user_modalsset.c   |1 +
 source/lib/netapi/tests/Makefile.in|2 +-
 source/lib/netapi/tests/common.h   |2 +
 source/lib/netapi/tests/netapitest.c   |5 +
 .../{examples/file/file_enum.c = tests/netfile.c} |  137 ++--
 source/lib/netapi/tests/netgroup.c |   10 +-
 source/lib/netapi/tests/netlocalgroup.c|6 +-
 source/lib/netapi/tests/netshare.c |8 +-
 source/lib/netapi/tests/netuser.c  |   20 ++--
 source/lib/netapi/user.c   |   53 +++-
 10 files changed, 145 insertions(+), 99 deletions(-)
 copy source/lib/netapi/{examples/file/file_enum.c = tests/netfile.c} (56%)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/examples/user/user_modalsset.c 
b/source/lib/netapi/examples/user/user_modalsset.c
index 57e1ef7..c6958a9 100644
--- a/source/lib/netapi/examples/user/user_modalsset.c
+++ b/source/lib/netapi/examples/user/user_modalsset.c
@@ -95,6 +95,7 @@ int main(int argc, const char **argv)
case 1:
case 2:
case 3:
+   break;
case 1001:
u1001.usrmod1001_min_passwd_len = 0;
buffer = (uint8_t *)u1001;
diff --git a/source/lib/netapi/tests/Makefile.in 
b/source/lib/netapi/tests/Makefile.in
index d3f0663..339e367 100644
--- a/source/lib/netapi/tests/Makefile.in
+++ b/source/lib/netapi/tests/Makefile.in
@@ -44,7 +44,7 @@ bin/.dummy:
 
 CMDLINE_OBJ = common.o
 NETAPIBUFFER_OBJ = netapibuffer.o
-NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o 
netdisplay.o netshare.o $(CMDLINE_OBJ)
+NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o 
netdisplay.o netshare.o netfile.o $(CMDLINE_OBJ)
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(NETAPITEST_OBJ)
@echo Linking $@
diff --git a/source/lib/netapi/tests/common.h b/source/lib/netapi/tests/common.h
index 5a32032..9320840 100644
--- a/source/lib/netapi/tests/common.h
+++ b/source/lib/netapi/tests/common.h
@@ -41,6 +41,8 @@ NET_API_STATUS netapitest_display(struct libnetapi_ctx *ctx,
  const char *hostname);
 NET_API_STATUS netapitest_share(struct libnetapi_ctx *ctx,
const char *hostname);
+NET_API_STATUS netapitest_file(struct libnetapi_ctx *ctx,
+  const char *hostname);
 
 #ifndef ARRAY_SIZE
 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
diff --git a/source/lib/netapi/tests/netapitest.c 
b/source/lib/netapi/tests/netapitest.c
index 8714402..4a38f72 100644
--- a/source/lib/netapi/tests/netapitest.c
+++ b/source/lib/netapi/tests/netapitest.c
@@ -84,6 +84,11 @@ int main(int argc, const char **argv)
goto out;
}
 
+   status = netapitest_file(ctx, hostname);
+   if (status) {
+   goto out;
+   }
+
  out:
if (status != 0) {
printf(testsuite failed with: %s\n,
diff --git a/source/lib/netapi/examples/file/file_enum.c 
b/source/lib/netapi/tests/netfile.c
similarity index 56%
copy from source/lib/netapi/examples/file/file_enum.c
copy to source/lib/netapi/tests/netfile.c
index 5fbb285..bee3c2e 100644
--- a/source/lib/netapi/examples/file/file_enum.c
+++ b/source/lib/netapi/tests/netfile.c
@@ -1,6 +1,6 @@
 /*
  *  Unix SMB/CIFS implementation.
- *  NetFileEnum query
+ *  NetFile testsuite
  *  Copyright (C) Guenther Deschner 2008
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -27,72 +27,25 @@
 

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

2008-10-23 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  e883898aac38eb865fa7b16a38bff61f0bff9dc1 (commit)
   via  cd6d398c260443106f64beb5c1718e9716e23ac9 (commit)
  from  c69741cf19828ffcb051727029022a319437ee39 (commit)

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


- Log -
commit e883898aac38eb865fa7b16a38bff61f0bff9dc1
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Sep 16 16:04:43 2008 +0200

re-run make idl.

Guenther

commit cd6d398c260443106f64beb5c1718e9716e23ac9
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Sep 16 16:04:31 2008 +0200

netapi: add more fields to USER_INFO_X.

Guenther

---

Summary of changes:
 source/librpc/gen_ndr/libnetapi.h |2 ++
 source/librpc/gen_ndr/ndr_libnetapi.c |6 ++
 source/librpc/idl/libnetapi.idl   |2 ++
 3 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/libnetapi.h 
b/source/librpc/gen_ndr/libnetapi.h
index 98da9e1..ae7acbf 100644
--- a/source/librpc/gen_ndr/libnetapi.h
+++ b/source/librpc/gen_ndr/libnetapi.h
@@ -413,7 +413,9 @@ struct USER_INFO_X {
uint32_t usriX_code_page;
const char * usriX_profile;
const char * usriX_home_dir_drive;
+   uint32_t usriX_user_id;
uint32_t usriX_primary_group_id;
+   uint32_t usriX_password_expired;
 };
 
 struct GROUP_USERS_INFO_0 {
diff --git a/source/librpc/gen_ndr/ndr_libnetapi.c 
b/source/librpc/gen_ndr/ndr_libnetapi.c
index a526682..d7bf63e 100644
--- a/source/librpc/gen_ndr/ndr_libnetapi.c
+++ b/source/librpc/gen_ndr/ndr_libnetapi.c
@@ -1895,7 +1895,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_USER_INFO_X(struct 
ndr_push *ndr, int ndr_fl
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r-usriX_code_page));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r-usriX_profile));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, 
r-usriX_home_dir_drive));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-usriX_user_id));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r-usriX_primary_group_id));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
r-usriX_password_expired));
}
if (ndr_flags  NDR_BUFFERS) {
if (r-usriX_logon_hours) {
@@ -1942,7 +1944,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_USER_INFO_X(struct 
ndr_pull *ndr, int ndr_fl
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
r-usriX_code_page));
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, r-usriX_profile));
NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, 
r-usriX_home_dir_drive));
+   NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r-usriX_user_id));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
r-usriX_primary_group_id));
+   NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, 
r-usriX_password_expired));
}
if (ndr_flags  NDR_BUFFERS) {
if (r-usriX_logon_hours) {
@@ -1990,7 +1994,9 @@ _PUBLIC_ void ndr_print_USER_INFO_X(struct ndr_print 
*ndr, const char *name, con
ndr_print_uint32(ndr, usriX_code_page, r-usriX_code_page);
ndr_print_string(ndr, usriX_profile, r-usriX_profile);
ndr_print_string(ndr, usriX_home_dir_drive, r-usriX_home_dir_drive);
+   ndr_print_uint32(ndr, usriX_user_id, r-usriX_user_id);
ndr_print_uint32(ndr, usriX_primary_group_id, 
r-usriX_primary_group_id);
+   ndr_print_uint32(ndr, usriX_password_expired, 
r-usriX_password_expired);
ndr-depth--;
 }
 
diff --git a/source/librpc/idl/libnetapi.idl b/source/librpc/idl/libnetapi.idl
index 039dcf4..f2f4a16 100644
--- a/source/librpc/idl/libnetapi.idl
+++ b/source/librpc/idl/libnetapi.idl
@@ -517,7 +517,9 @@ interface libnetapi
uint32 usriX_code_page;
string usriX_profile;
string usriX_home_dir_drive;
+   uint32 usriX_user_id;
uint32 usriX_primary_group_id;
+   uint32 usriX_password_expired;
} USER_INFO_X;
 
[nopush,nopull] NET_API_STATUS NetUserAdd(


-- 
Samba Shared Repository


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

2008-10-23 Thread Derrell Lipman
On Wed, Oct 22, 2008 at 10:58 PM, Jelmer Vernooij [EMAIL PROTECTED] wrote:


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

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


Sometimes git merges by adding each commit that was done, while other times,
like here, it adds just a single entry to the git-log showing that a merge
was done, but with no detail.  Is it possible to control that and force a
merge with all commits being merged to be added independently?

Derrell


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

2008-10-23 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  93eca985258a1ee56627704d448a4c0c40d2ec50 (commit)
  from  e883898aac38eb865fa7b16a38bff61f0bff9dc1 (commit)

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


- Log -
commit 93eca985258a1ee56627704d448a4c0c40d2ec50
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 9 11:45:03 2008 +0200

build: add make test_wbpad for checking winbind 32/64bit structure 
padding.

Guenther

---

Summary of changes:
 source/Makefile.in|4 ++
 source/script/tests/wb_pad.sh |   82 +
 2 files changed, 86 insertions(+), 0 deletions(-)
 create mode 100755 source/script/tests/wb_pad.sh


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 5aed254..e6f99f0 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -2761,6 +2761,10 @@ valgrindtest:: all torture timelimit
 VALGRIND=valgrind -q --num-callers=30 
--log-file=${selftest_prefix}/valgrind.log \
 PERL=$(PERL) $(srcdir)/script/tests/selftest.sh ${selftest_prefix} 
all ${smbtorture4_path}
 
+# Check for Winbind struct 32/64bit padding
+test_wbpad:
+   @echo Testing winbind request/response structure for 32/64bit padding
+   @./script/tests/wb_pad.sh || exit 1;
 
 ##
 ## Examples:
diff --git a/source/script/tests/wb_pad.sh b/source/script/tests/wb_pad.sh
new file mode 100755
index 000..28901da
--- /dev/null
+++ b/source/script/tests/wb_pad.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+#
+# Copyright (C) Guenther Deschner 2008
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see http://www.gnu.org/licenses/.
+
+tempdir=`mktemp -d /tmp/wb_padXX`
+test -n $tempdir || exit 1
+cat  $tempdir/wb_pad.c  _EOF
+#include nsswitch/winbind_client.h
+
+int main(int argc, const char **argv)
+{
+   struct winbindd_request req;
+   struct winbindd_response resp;
+
+   if (argc != 2) {
+   printf(usage: %s [req|resp]\n, argv[0]);
+   return 0;
+   }
+
+   if (strcmp(argv[1], req) == 0) {
+   printf(%d\n, (uint32_t)sizeof(req));
+   }
+   if (strcmp(argv[1], resp) == 0) {
+   printf(%d\n, (uint32_t)sizeof(resp));
+   }
+
+   return 0;
+}
+_EOF
+
+cleanup() {
+   rm -f $tempdir/wb_pad_32 $tempdir/wb_pad_64 $tempdir/wb_pad.c
+   rmdir $tempdir
+}
+
+cflags=-I. -I./lib/replace -Iinclude
+${CC:-gcc} -m32 $RPM_OPT_FLAGS $CFLAGS -o $tempdir/wb_pad_32 $cflags 
$tempdir/wb_pad.c
+if [ $? -ne 0 ]; then
+   cleanup
+   exit 1
+fi
+${CC:-gcc} -m64 $RPM_OPT_FLAGS $CFLAGS -o $tempdir/wb_pad_64 $cflags 
$tempdir/wb_pad.c
+if [ $? -ne 0 ]; then
+   cleanup
+   exit 1
+fi
+
+out_64_req=`$tempdir/wb_pad_64 req`
+out_64_resp=`$tempdir/wb_pad_64 resp`
+out_32_req=`$tempdir/wb_pad_32 req`
+out_32_resp=`$tempdir/wb_pad_32 resp`
+
+cleanup
+
+if test $out_64_req != $out_32_req; then
+   echo winbind request size differs!
+   echo 64bit: $out_64_req
+   echo 32bit: $out_32_req
+   exit 1
+fi
+
+if test $out_64_resp != $out_32_resp; then
+   echo winbind response size differs!
+   echo 64bit: $out_64_resp
+   echo 32bit: $out_32_resp
+   exit 1
+fi
+
+exit 0


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 90d3cac55f12b34f69f8f366b044dc6382a1a153

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  90d3cac55f12b34f69f8f366b044dc6382a1a153 (commit)
  from  8a3bff343a21bc8b4c229bae5830db7462fea25f (commit)

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


- Log -
commit 90d3cac55f12b34f69f8f366b044dc6382a1a153
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 16:40:23 2008 +0200

s3-docs: add very basic winbind_krb5_locator.7 manpage.

Guenther

---

Summary of changes:
 docs-xml/manpages-3/winbind_krb5_locator.7.xml |   93 
 1 files changed, 93 insertions(+), 0 deletions(-)
 create mode 100644 docs-xml/manpages-3/winbind_krb5_locator.7.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/winbind_krb5_locator.7.xml 
b/docs-xml/manpages-3/winbind_krb5_locator.7.xml
new file mode 100644
index 000..2135270
--- /dev/null
+++ b/docs-xml/manpages-3/winbind_krb5_locator.7.xml
@@ -0,0 +1,93 @@
+?xml version=1.0 encoding=iso-8859-1?
+!DOCTYPE refentry PUBLIC -//Samba-Team//DTD DocBook V4.2-Based Variant 
V1.0//EN http://www.samba.org/samba/DTD/samba-doc;
+refentry id=winbind_krb5_locator.7
+
+refmeta
+   refentrytitlewinbind_krb5_locator/refentrytitle
+   manvolnum7/manvolnum
+   refmiscinfo class=sourceSamba/refmiscinfo
+   refmiscinfo class=manual7/refmiscinfo
+   refmiscinfo class=version3.3/refmiscinfo
+/refmeta
+
+
+refnamediv
+   refnamewinbind_krb5_locator/refname
+   refpurposeA plugin for MIT and Heimdal Kerberos for detecting KDCs 
using Windows semantics./refpurpose
+/refnamediv
+
+
+refsect1
+   titleDESCRIPTION/title
+
+   para
+   This plugin is part of the 
citerefentryrefentrytitlesamba/refentrytitle
+   manvolnum7/manvolnum/citerefentry suite.
+   /para
+
+   para
+   commandwinbind_krb5_locator/command is a plugin that 
permits MIT and
+   Heimdal Kerberos libraries to detect Kerberos Servers (for the 
KDC and
+   kpasswd service) using the same semantics that other tools of 
the Samba
+   suite use. This include site-aware DNS service record lookups 
and caching
+   of closest dc.
+   The plugin uses the public locator API provided by most modern 
Kerberos
+   implementations.
+   /para
+/refsect1
+refsect1
+   titlePREREQUISITES/title
+   para
+   MIT Kerberos (at least version 1.5) or Heimdal Kerberos (at 
least version
+   1.0) is required.
+   /para
+
+   para
+   The plugin requires the winbindd daemon to be configured and 
started.
+   /para
+
+   para
+   The commandwinbind_krb5_locator/command.so file needs to be 
manually
+   copied to the plugin directory of the system Kerberos library.
+
+   For MIT Kerberos this is often:
+   filename/usr/lib/krb5/plugins/libkrb5//filename.
+   For Heimdal Kerberos this is often:
+   filename/usr/lib/plugin/krb5//filename.
+
+   Please check your local Kerberos installation for the correct
+   paths. No modification in filename/etc/krb5.conf/filename
+   is required to enable the use of this plugin.
+   /para
+   para
+   After copying the locator plugin to the appropriate plugin
+   directory it should immediately be available for use.
+   Users should be able to kinit into their kerberized Windows
+   environment without any modification or servers
+   being put manually into filename/etc/krb5.conf/filename
+   /para
+/refsect1
+
+refsect1
+   titleVERSION/title
+
+   para
+   This man page is correct for version 3 of the Samba suite.
+   /para
+/refsect1
+
+refsect1
+   titleAUTHOR/title
+
+   para
+   The original Samba software and related utilities were created 
by Andrew
+   Tridgell. Samba is now developed by the Samba Team as an Open 
Source
+   project similar to the way the Linux kernel is developed.
+   /para
+
+   para
+   The winbind_krb5_locator manpage page was written by Guenther 
Deschner.
+   /para
+/refsect1
+
+/refentry


-- 
Samba Shared Repository


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

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  ae1abe843a349d55eb8d606f79a7753804a82547 (commit)
  from  90d3cac55f12b34f69f8f366b044dc6382a1a153 (commit)

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


- Log -
commit ae1abe843a349d55eb8d606f79a7753804a82547
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 16:44:29 2008 +0200

s3-docs: fix typos in locator manpage found by metze.

Guenther

---

Summary of changes:
 docs-xml/manpages-3/winbind_krb5_locator.7.xml |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/winbind_krb5_locator.7.xml 
b/docs-xml/manpages-3/winbind_krb5_locator.7.xml
index 2135270..b828116 100644
--- a/docs-xml/manpages-3/winbind_krb5_locator.7.xml
+++ b/docs-xml/manpages-3/winbind_krb5_locator.7.xml
@@ -43,11 +43,13 @@
/para
 
para
-   The plugin requires the winbindd daemon to be configured and 
started.
+   The plugin queries the 
citerefentryrefentrytitlewinbindd/refentrytitle
+   manvolnum8/manvolnum/citerefentry daemon which needs to 
be configured
+   and started separately.
/para
 
para
-   The commandwinbind_krb5_locator/command.so file needs to be 
manually
+   The commandwinbind_krb5_locator.so/command file needs to be 
manually
copied to the plugin directory of the system Kerberos library.
 
For MIT Kerberos this is often:
@@ -64,7 +66,7 @@
directory it should immediately be available for use.
Users should be able to kinit into their kerberized Windows
environment without any modification or servers
-   being put manually into filename/etc/krb5.conf/filename
+   being put manually into filename/etc/krb5.conf/filename.
/para
 /refsect1
 
@@ -86,7 +88,7 @@
/para
 
para
-   The winbind_krb5_locator manpage page was written by Guenther 
Deschner.
+   The winbind_krb5_locator manpage was written by Guenther 
Deschner.
/para
 /refsect1
 


-- 
Samba Shared Repository


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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  d59f476ecdfff5553144bca9f60bec0d0645a930 (commit)
   via  5b5e36085a2c10dda7dbd65b0dfb9cdbe6490f21 (commit)
  from  ae1abe843a349d55eb8d606f79a7753804a82547 (commit)

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


- Log -
commit d59f476ecdfff5553144bca9f60bec0d0645a930
Merge: 5b5e36085a2c10dda7dbd65b0dfb9cdbe6490f21 
ae1abe843a349d55eb8d606f79a7753804a82547
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 17:04:16 2008 +0200

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

commit 5b5e36085a2c10dda7dbd65b0dfb9cdbe6490f21
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 16:58:11 2008 +0200

Share codepages.

---

Summary of changes:
 codepages/lowcase.dat |  Bin 0 - 131072 bytes
 codepages/upcase.dat  |  Bin 0 - 131072 bytes
 codepages/valid.dat   |  Bin 0 - 65536 bytes
 source3/codepages/lowcase.dat |  Bin 131072 - 0 bytes
 source3/codepages/upcase.dat  |  Bin 131072 - 0 bytes
 source3/codepages/valid.dat   |  Bin 65536 - 0 bytes
 source3/script/installdat.sh  |2 +-
 source4/codepages/lowcase.dat |  Bin 131072 - 0 bytes
 source4/codepages/upcase.dat  |  Bin 131072 - 0 bytes
 source4/codepages/valid.dat   |  Bin 65536 - 0 bytes
 source4/script/installdat.sh  |2 +-
 11 files changed, 2 insertions(+), 2 deletions(-)
 create mode 100644 codepages/lowcase.dat
 create mode 100644 codepages/upcase.dat
 create mode 100644 codepages/valid.dat
 delete mode 100644 source3/codepages/lowcase.dat
 delete mode 100644 source3/codepages/upcase.dat
 delete mode 100644 source3/codepages/valid.dat
 delete mode 100644 source4/codepages/lowcase.dat
 delete mode 100644 source4/codepages/upcase.dat
 delete mode 100644 source4/codepages/valid.dat


Changeset truncated at 500 lines:

diff --git a/codepages/lowcase.dat b/codepages/lowcase.dat
new file mode 100644
index 000..62b6e2e
Binary files /dev/null and b/codepages/lowcase.dat differ
diff --git a/codepages/upcase.dat b/codepages/upcase.dat
new file mode 100644
index 000..bb6f9be
Binary files /dev/null and b/codepages/upcase.dat differ
diff --git a/codepages/valid.dat b/codepages/valid.dat
new file mode 100644
index 000..78c14b3
Binary files /dev/null and b/codepages/valid.dat differ
diff --git a/source3/codepages/lowcase.dat b/source3/codepages/lowcase.dat
deleted file mode 100644
index 62b6e2e..000
Binary files a/source3/codepages/lowcase.dat and /dev/null differ
diff --git a/source3/codepages/upcase.dat b/source3/codepages/upcase.dat
deleted file mode 100644
index bb6f9be..000
Binary files a/source3/codepages/upcase.dat and /dev/null differ
diff --git a/source3/codepages/valid.dat b/source3/codepages/valid.dat
deleted file mode 100644
index 78c14b3..000
Binary files a/source3/codepages/valid.dat and /dev/null differ
diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh
index 59bf2f9..2cc3677 100755
--- a/source3/script/installdat.sh
+++ b/source3/script/installdat.sh
@@ -20,7 +20,7 @@ case $0 in
*) mode='install' ;;
 esac
 
-for f in $SRCDIR/codepages/*.dat; do
+for f in $SRCDIR/../codepages/*.dat; do
FNAME=$DESTDIR/$DATDIR/`basename $f`
if test $mode = 'install'; then
echo Installing $f as $FNAME 
diff --git a/source4/codepages/lowcase.dat b/source4/codepages/lowcase.dat
deleted file mode 100644
index 62b6e2e..000
Binary files a/source4/codepages/lowcase.dat and /dev/null differ
diff --git a/source4/codepages/upcase.dat b/source4/codepages/upcase.dat
deleted file mode 100644
index bb6f9be..000
Binary files a/source4/codepages/upcase.dat and /dev/null differ
diff --git a/source4/codepages/valid.dat b/source4/codepages/valid.dat
deleted file mode 100644
index 78c14b3..000
Binary files a/source4/codepages/valid.dat and /dev/null differ
diff --git a/source4/script/installdat.sh b/source4/script/installdat.sh
index 7ff88ac..bea8ad8 100755
--- a/source4/script/installdat.sh
+++ b/source4/script/installdat.sh
@@ -6,7 +6,7 @@ SRCDIR=$2/
 
 echo Installing dat files in $DATDIR
 
-for f in $SRCDIR/codepages/*.dat; do
+for f in $SRCDIR/../codepages/*.dat; do
FNAME=$DATDIR/`basename $f`
echo $FNAME
cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?


-- 
Samba Shared Repository


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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  db65c3374ad337135a7bd4d67abced258c01c5bd (commit)
   via  0e36ffc6750f77018a5201ea9503d53401dda642 (commit)
   via  f9fb9436ae7a6556d3636f732889bae136a81390 (commit)
   via  44b728958ae9a48bb56591532e5db9867311c1b9 (commit)
  from  d59f476ecdfff5553144bca9f60bec0d0645a930 (commit)

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


- Log -
commit db65c3374ad337135a7bd4d67abced258c01c5bd
Merge: 0e36ffc6750f77018a5201ea9503d53401dda642 
d59f476ecdfff5553144bca9f60bec0d0645a930
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 17:12:16 2008 +0200

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

commit 0e36ffc6750f77018a5201ea9503d53401dda642
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 16:42:45 2008 +0200

selftest.pl: Silence verbose tdbsam output.

commit f9fb9436ae7a6556d3636f732889bae136a81390
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 15:37:39 2008 +0200

Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.

commit 44b728958ae9a48bb56591532e5db9867311c1b9
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 15:35:21 2008 +0200

Use common error definitions.

---

Summary of changes:
 lib/util/asn1_proto.h   |8 +-
 libcli/util/errormap.c  | 1403 ---
 libcli/util/nterr.c |  897 --
 libcli/util/ntstatus.h  |4 +
 librpc/ndr/libndr.h |4 +-
 selftest/target/Samba3.pm   |2 +-
 source3/include/doserr.h|  303 
 source3/include/includes.h  |3 +-
 source3/include/nt_status.h |  115 ---
 source3/include/nterr.h |  571 --
 source3/include/proto.h |2 +-
 source3/include/smb.h   |2 +-
 source3/include/util_tdb.h  |2 +-
 source3/lib/smbconf/smbconf.c   |2 +-
 source3/lib/smbconf/smbconf_reg.c   |2 +-
 source3/libsmb/doserr.c |4 +-
 source3/libsmb/nterr.c  |4 +-
 source3/rpc_server/srv_echo_nt.c|1 -
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 source3/rpc_server/srv_srvsvc_nt.c  |2 +-
 source3/utils/net_ads.c |2 +-
 source3/utils/net_rpc.c |2 +-
 source4/libcli/config.mk|2 +-
 source4/libcli/ldap/ldap.h  |6 +-
 source4/libcli/util/errormap.c  | 1403 +++
 source4/libcli/util/nterr.c |  897 ++
 26 files changed, 2328 insertions(+), 3317 deletions(-)
 delete mode 100644 libcli/util/errormap.c
 delete mode 100644 libcli/util/nterr.c
 delete mode 100644 source3/include/doserr.h
 delete mode 100644 source3/include/nt_status.h
 delete mode 100644 source3/include/nterr.h
 create mode 100644 source4/libcli/util/errormap.c
 create mode 100644 source4/libcli/util/nterr.c


Changeset truncated at 500 lines:

diff --git a/lib/util/asn1_proto.h b/lib/util/asn1_proto.h
index 9b7b4d2..972f7a3 100644
--- a/lib/util/asn1_proto.h
+++ b/lib/util/asn1_proto.h
@@ -1,5 +1,5 @@
-#ifndef _LIB_UTIL_ASN1_PROTO_H__
-#define _LIB_UTIL_ASN1_PROTO_H__
+#ifndef ___HOME_JELMER_SAMBA4_GIT_SOURCE3SOURCE4LIB_UTIL_ASN1_PROTO_H__
+#define ___HOME_JELMER_SAMBA4_GIT_SOURCE3SOURCE4LIB_UTIL_ASN1_PROTO_H__
 
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
@@ -10,7 +10,7 @@
  * used outside this particular subsystem! */
 
 
-/* The following definitions come from ../lib/util/asn1.c  */
+/* The following definitions come from 
/home/jelmer/samba4.git/source3/../source4/../lib/util/asn1.c  */
 
 struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx);
 void asn1_free(struct asn1_data *data);
@@ -55,5 +55,5 @@ NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t 
*packet_size);
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)
 
-#endif /* _LIB_UTIL_ASN1_PROTO_H__ */
+#endif /* 
___HOME_JELMER_SAMBA4_GIT_SOURCE3SOURCE4LIB_UTIL_ASN1_PROTO_H__ */
 
diff --git a/libcli/util/errormap.c b/libcli/util/errormap.c
deleted file mode 100644
index 2257955..000
--- a/libcli/util/errormap.c
+++ /dev/null
@@ -1,1403 +0,0 @@
-/* 
- *  Unix SMB/CIFS implementation.
- *  error mapping functions
- *  Copyright (C) Andrew Tridgell 2001
- *  Copyright (C) Andrew Bartlett 2001
- *  Copyright (C) Tim Potter 2000
- *  
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *  
- *  This program is distributed in the hope that it will be 

[SCM] Samba Shared Repository - branch master updated - 097f40249c664cfc76794894440e27496ab82a76

2008-10-23 Thread Volker Lendecke
The branch, master has been updated
   via  097f40249c664cfc76794894440e27496ab82a76 (commit)
   via  3f0406f609899e88f15f90688c0e49beadc72568 (commit)
  from  db65c3374ad337135a7bd4d67abced258c01c5bd (commit)

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


- Log -
commit 097f40249c664cfc76794894440e27496ab82a76
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Thu Oct 23 17:42:45 2008 +0200

Make use of a large buffer for smbclient put command

commit 3f0406f609899e88f15f90688c0e49beadc72568
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Thu Oct 23 15:43:36 2008 +0200

Optimize x_fread to speed up the smbclient put command

---

Summary of changes:
 lib/util/xfile.c|   25 -
 source3/client/client.c |3 +++
 2 files changed, 23 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/xfile.c b/lib/util/xfile.c
index 94b0ee9..cf19570 100644
--- a/lib/util/xfile.c
+++ b/lib/util/xfile.c
@@ -329,12 +329,27 @@ int x_fgetc(XFILE *f)
 /** simulate fread */
 size_t x_fread(void *p, size_t size, size_t nmemb, XFILE *f)
 {
+   size_t remaining = size * nmemb;
size_t total = 0;
-   while (total  size*nmemb) {
-   int c = x_fgetc(f);
-   if (c == EOF) break;
-   (total+(char *)p)[0] = (char)c;
-   total++;
+
+   while (remaining  0) {
+   size_t thistime;
+
+   x_fillbuf(f);
+
+   if (f-bufused == 0) {
+   f-flags |= X_FLAG_EOF;
+   break;
+   }
+
+   thistime = MIN(f-bufused, remaining);
+
+   memcpy((char *)p+total, f-next, thistime);
+
+   f-next += thistime;
+   f-bufused -= thistime;
+   remaining -= thistime;
+   total += thistime;
}
return total/size;
 }
diff --git a/source3/client/client.c b/source3/client/client.c
index 26badc4..39f8f90 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1652,6 +1652,9 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
d_printf(ERROR: Not enough memory!\n);
return 1;
}
+
+   x_setvbuf(f, NULL, X_IOFBF, maxwrite);
+
while (!x_feof(f)) {
int n = maxwrite;
int ret;


-- 
Samba Shared Repository


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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  d805c714bb79a709716ec0373670283bfcd23c3c (commit)
   via  cf659fa4fe7369ac58ef547f744c0ff3f9fb137a (commit)
  from  097f40249c664cfc76794894440e27496ab82a76 (commit)

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


- Log -
commit d805c714bb79a709716ec0373670283bfcd23c3c
Merge: cf659fa4fe7369ac58ef547f744c0ff3f9fb137a 
097f40249c664cfc76794894440e27496ab82a76
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 17:51:30 2008 +0200

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

commit cf659fa4fe7369ac58ef547f744c0ff3f9fb137a
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 17:27:30 2008 +0200

Import talloc_stack into util library.

---

Summary of changes:
 lib/util/config.mk |1 +
 lib/util/talloc_stack.c|  130 
 lib/util/talloc_stack.h|   56 +
 lib/util/util.h|1 +
 source3/Makefile.in|4 +-
 source3/include/includes.h |2 +-
 source3/include/talloc_stack.h |   56 -
 source3/lib/talloc_stack.c |  130 
 8 files changed, 191 insertions(+), 189 deletions(-)
 create mode 100644 lib/util/talloc_stack.c
 create mode 100644 lib/util/talloc_stack.h
 delete mode 100644 source3/include/talloc_stack.h
 delete mode 100644 source3/lib/talloc_stack.c


Changeset truncated at 500 lines:

diff --git a/lib/util/config.mk b/lib/util/config.mk
index 5488534..0eaabbf 100644
--- a/lib/util/config.mk
+++ b/lib/util/config.mk
@@ -26,6 +26,7 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix $(libutilsrcdir)/, \
idtree.o \
become_daemon.o \
rbtree.o \
+   talloc_stack.o \
params.o)
 
 PUBLIC_HEADERS += $(addprefix $(libutilsrcdir)/, util.h \
diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c
new file mode 100644
index 000..2722fb9
--- /dev/null
+++ b/lib/util/talloc_stack.c
@@ -0,0 +1,130 @@
+/*
+   Unix SMB/CIFS implementation.
+   Implement a stack of talloc contexts
+   Copyright (C) Volker Lendecke 2007
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/*
+ * Implement a stack of talloc frames.
+ *
+ * When a new talloc stackframe is allocated with talloc_stackframe(), then
+ * the TALLOC_CTX returned with talloc_tos() is reset to that new
+ * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
+ * happens: The previous talloc_tos() is restored.
+ *
+ * This API is designed to be robust in the sense that if someone forgets to
+ * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
+ * resets the talloc_tos().
+ *
+ * This robustness feature means that we can't rely on a linked list with
+ * talloc destructors because in a hierarchy of talloc destructors the parent
+ * destructor is called before its children destructors. The child destructor
+ * called after the parent would set the talloc_tos() to the wrong value.
+ */
+
+#include includes.h
+
+static int talloc_stacksize;
+static int talloc_stack_arraysize;
+static TALLOC_CTX **talloc_stack;
+
+static int talloc_pop(TALLOC_CTX *frame)
+{
+   int i;
+
+   for (i=talloc_stacksize-1; i0; i--) {
+   if (frame == talloc_stack[i]) {
+   break;
+   }
+   talloc_free(talloc_stack[i]);
+   }
+
+   talloc_stacksize = i;
+   return 0;
+}
+
+/*
+ * Create a new talloc stack frame.
+ *
+ * When free'd, it frees all stack frames that were created after this one and
+ * not explicitly freed.
+ */
+
+static TALLOC_CTX *talloc_stackframe_internal(size_t poolsize)
+{
+   TALLOC_CTX **tmp, *top, *parent;
+
+   if (talloc_stack_arraysize  talloc_stacksize + 1) {
+   tmp = TALLOC_REALLOC_ARRAY(NULL, talloc_stack, TALLOC_CTX *,
+  talloc_stacksize + 1);
+   if (tmp == NULL) {
+   goto fail;
+   }
+   talloc_stack = tmp;
+   talloc_stack_arraysize = talloc_stacksize + 1;
+}
+
+   if 

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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  d70efa57ceae1011a6a55d57d0152fd1bc2bb192 (commit)
   via  2f265feb174de1f743e8102ad34b3bdbcd2897cc (commit)
  from  d805c714bb79a709716ec0373670283bfcd23c3c (commit)

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


- Log -
commit d70efa57ceae1011a6a55d57d0152fd1bc2bb192
Merge: 2f265feb174de1f743e8102ad34b3bdbcd2897cc 
d805c714bb79a709716ec0373670283bfcd23c3c
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:04:16 2008 +0200

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

Conflicts:
lib/util/asn1_proto.h

commit 2f265feb174de1f743e8102ad34b3bdbcd2897cc
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:03:20 2008 +0200

Inline asn1_proto.h since the API is stable and public.

---

Summary of changes:
 lib/util/asn1.h   |   41 +-
 lib/util/asn1_proto.h |   59 -
 lib/util/config.mk|2 -
 3 files changed, 40 insertions(+), 62 deletions(-)
 delete mode 100644 lib/util/asn1_proto.h


Changeset truncated at 500 lines:

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

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

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  f36ffa768129f01b0c12d30bff5e4e205dd3676c (commit)
   via  c1e5f284569d7c9aece4fba0a2101305b16cae91 (commit)
  from  d70efa57ceae1011a6a55d57d0152fd1bc2bb192 (commit)

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


- Log -
commit f36ffa768129f01b0c12d30bff5e4e205dd3676c
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 18:34:28 2008 +0200

s3-build: remove duplicate svcctl bits and re-run make samba3-idl.

Guenther

commit c1e5f284569d7c9aece4fba0a2101305b16cae91
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 18:33:49 2008 +0200

idl: add svcctl specific access bits.

Guenther

---

Summary of changes:
 librpc/idl/svcctl.idl   |   47 +-
 source3/include/rpc_secdes.h|   70 ---
 source3/librpc/gen_ndr/svcctl.h |8 
 3 files changed, 54 insertions(+), 71 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl
index 3eb686f..fa8e109 100644
--- a/librpc/idl/svcctl.idl
+++ b/librpc/idl/svcctl.idl
@@ -4,7 +4,7 @@
   svcctl interface definitions
 */
 
-import misc.idl;
+import misc.idl, security.idl;
 [ uuid(367abb81-9844-35f1-ad32-98f038001003),
   version(2.0),
   pointer_default(unique),
@@ -227,6 +227,9 @@ import misc.idl;
 
/*/
/* Function 0x0f */
+
+   /* Service Control Manager Bits */
+
typedef [bitmap32bit] bitmap {
SC_RIGHT_MGR_CONNECT= 0x0001,
SC_RIGHT_MGR_CREATE_SERVICE = 0x0002,
@@ -236,6 +239,23 @@ import misc.idl;
SC_RIGHT_MGR_MODIFY_BOOT_CONFIG = 0x0020
} svcctl_MgrAccessMask;
 
+   const int SC_MANAGER_READ_ACCESS =
+   (SEC_STD_READ_CONTROL   |
+SC_RIGHT_MGR_CONNECT   |
+SC_RIGHT_MGR_ENUMERATE_SERVICE |
+SC_RIGHT_MGR_QUERY_LOCK_STATUS);
+
+   const int SC_MANAGER_EXECUTE_ACCESS = SC_MANAGER_READ_ACCESS;
+
+   const int SC_MANAGER_WRITE_ACCESS =
+   (SEC_STD_REQUIRED   |
+SC_MANAGER_READ_ACCESS |
+SC_RIGHT_MGR_CREATE_SERVICE|
+SC_RIGHT_MGR_LOCK  |
+SC_RIGHT_MGR_MODIFY_BOOT_CONFIG);
+
+   const int SC_MANAGER_ALL_ACCESS = SC_MANAGER_WRITE_ACCESS;
+
WERROR svcctl_OpenSCManagerW(
[in,unique] [string,charset(UTF16)] uint16 *MachineName,
[in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
@@ -245,6 +265,9 @@ import misc.idl;
 
/*/
/* Function 0x10 */
+
+   /* Service Object Bits */
+
typedef [bitmap32bit] bitmap {
SC_RIGHT_SVC_QUERY_CONFIG   = 0x0001,
SC_RIGHT_SVC_CHANGE_CONFIG  = 0x0002,
@@ -257,6 +280,28 @@ import misc.idl;
SC_RIGHT_SVC_USER_DEFINED_CONTROL   = 0x0100
} svcctl_ServiceAccessMask;
 
+   const int SERVICE_READ_ACCESS =
+   (SEC_STD_READ_CONTROL   |
+SC_RIGHT_SVC_ENUMERATE_DEPENDENTS  |
+SC_RIGHT_SVC_INTERROGATE   |
+SC_RIGHT_SVC_QUERY_CONFIG  |
+SC_RIGHT_SVC_QUERY_STATUS  |
+SC_RIGHT_SVC_USER_DEFINED_CONTROL);
+
+   const int SERVICE_EXECUTE_ACCESS =
+   (SERVICE_READ_ACCESS|
+SC_RIGHT_SVC_START |
+SC_RIGHT_SVC_STOP  |
+SC_RIGHT_SVC_PAUSE_CONTINUE);
+
+   const int SERVICE_WRITE_ACCESS =
+   (SEC_STD_REQUIRED   |
+SERVICE_READ_ACCESS|
+SERVICE_EXECUTE_ACCESS |
+SC_RIGHT_SVC_CHANGE_CONFIG);
+
+   const int SERVICE_ALL_ACCESS = SERVICE_WRITE_ACCESS;
+
WERROR svcctl_OpenServiceW(
[in,ref] policy_handle *scmanager_handle,
[in] [string,charset(UTF16)] uint16 ServiceName[],
diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h
index 71fba41..fb73498 100644
--- a/source3/include/rpc_secdes.h
+++ b/source3/include/rpc_secdes.h
@@ -386,76 +386,6 @@ struct standard_mapping {
SA_RIGHT_ALIAS_LOOKUP_INFO )/* 0x00020008 */
 
 /*
- * Acces bits for the svcctl objects
- */
-
-/* Service Control Manager Bits */ 
-
-#if 0
-#define SC_RIGHT_MGR_CONNECT   0x0001
-#define SC_RIGHT_MGR_CREATE_SERVICE0x0002
-#define SC_RIGHT_MGR_ENUMERATE_SERVICE 0x0004
-#define SC_RIGHT_MGR_LOCK 

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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  c17898db4e2e1ac342ce9dfb0991d58dbd6ea4af (commit)
   via  81fabeff2dc51c043da19cd095175c4951f527b6 (commit)
  from  f36ffa768129f01b0c12d30bff5e4e205dd3676c (commit)

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


- Log -
commit c17898db4e2e1ac342ce9dfb0991d58dbd6ea4af
Merge: 81fabeff2dc51c043da19cd095175c4951f527b6 
f36ffa768129f01b0c12d30bff5e4e205dd3676c
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:50:34 2008 +0200

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

commit 81fabeff2dc51c043da19cd095175c4951f527b6
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:46:35 2008 +0200

Use libutil genrand.

---

Summary of changes:
 source3/Makefile.in  |5 +-
 source3/include/proto.h  |2 +-
 source3/lib/genrand.c|  220 --
 source3/passdb/secrets.c |4 +-
 4 files changed, 6 insertions(+), 225 deletions(-)
 delete mode 100644 source3/lib/genrand.c


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 120b980..dad046f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -320,7 +320,8 @@ UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o 
../lib/util/time.o \
   ../lib/util/xfile.o ../lib/util/util_strlist.o  \
   ../lib/util/util_file.o ../lib/util/data_blob.o \
   ../lib/util/util.o ../lib/util/fsusage.o \
-  ../lib/util/params.o ../lib/util/talloc_stack.o
+  ../lib/util/params.o ../lib/util/talloc_stack.o \
+  ../lib/util/genrand.o 
 
 CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
 ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
@@ -336,7 +337,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
  $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
  lib/interface.o lib/pidfile.o \
  lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
- lib/genrand.o lib/username.o \
+ lib/username.o \
  lib/util_pw.o lib/access.o lib/smbrun.o \
  lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
  lib/wins_srv.o \
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 966ddb9..37f934a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -575,7 +575,7 @@ void gencache_unlock_entry( const char *key );
 
 /* The following definitions come from lib/genrand.c  */
 
-void set_rand_reseed_callback(void (*fn)(int *));
+void set_rand_reseed_callback(void (*fn)(void *, int *), void *userdata);
 void set_need_random_reseed(void);
 void generate_random_buffer(uint8_t *out, int len);
 char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c
deleted file mode 100644
index 076a2fd..000
--- a/source3/lib/genrand.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   Functions to create reasonable random numbers for crypto use.
-
-   Copyright (C) Jeremy Allison 2001
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see http://www.gnu.org/licenses/.
-*/
-
-#include includes.h
-
-static struct arcfour_state smb_arc4_state;
-static uint32 counter;
-
-static bool done_reseed = False;
-static void (*reseed_callback)(int *newseed);
-
-/ 
- Copy any user given reseed data.
-*/
-
-void set_rand_reseed_callback(void (*fn)(int *))
-{
-   reseed_callback = fn;
-   set_need_random_reseed();
-}
-
-void set_need_random_reseed(void)
-{
-   done_reseed = False;
-}
-
-static void get_rand_reseed_data(int *reseed_data)
-{
-   if (reseed_callback) {
-   reseed_callback(reseed_data);
-   } else {
-   *reseed_data = 0;
-   }
-}
-
-/
- Get a 16 byte hash from the contents of a file.
- Note that the hash is not initialised.
-*/
-
-static void do_filehash(const char *fname, unsigned char *the_hash)
-{
-   

[SCM] Samba Shared Repository - branch master updated - 27c4cf4e7b2ba042b4caace7bab19f9e37510d86

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  27c4cf4e7b2ba042b4caace7bab19f9e37510d86 (commit)
  from  c17898db4e2e1ac342ce9dfb0991d58dbd6ea4af (commit)

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


- Log -
commit 27c4cf4e7b2ba042b4caace7bab19f9e37510d86
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 19:26:44 2008 +0200

s3-build: add missing generated svcctl changes.

Guenther

---

Summary of changes:
 source3/librpc/gen_ndr/ndr_svcctl.c |1 +
 source3/librpc/gen_ndr/svcctl.h |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c 
b/source3/librpc/gen_ndr/ndr_svcctl.c
index e897ef3..d04c89b 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.c
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -4,6 +4,7 @@
 #include librpc/gen_ndr/ndr_svcctl.h
 
 #include librpc/gen_ndr/ndr_misc.h
+#include librpc/gen_ndr/ndr_security.h
 static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, 
int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
 {
if (ndr_flags  NDR_SCALARS) {
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
index 5da6979..b098eb1 100644
--- a/source3/librpc/gen_ndr/svcctl.h
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -3,6 +3,7 @@
 #include stdint.h
 
 #include librpc/gen_ndr/misc.h
+#include librpc/gen_ndr/security.h
 #ifndef _HEADER_svcctl
 #define _HEADER_svcctl
 
@@ -18,13 +19,13 @@
 #define SERVICE_STATE_INACTIVE ( 0x02 )
 #define SERVICE_STATE_ALL  ( 0x03 )
 #define SV_TYPE_ALL( 0x )
-#define SC_MANAGER_READ_ACCESS ( 
(STANDARD_RIGHTS_READ_ACCESS|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS)
 )
+#define SC_MANAGER_READ_ACCESS ( 
(SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS)
 )
 #define SC_MANAGER_EXECUTE_ACCESS  ( SC_MANAGER_READ_ACCESS )
-#define SC_MANAGER_WRITE_ACCESS( 
(STANDARD_RIGHTS_REQUIRED_ACCESS|SC_MANAGER_READ_ACCESS|SC_RIGHT_MGR_CREATE_SERVICE|SC_RIGHT_MGR_LOCK|SC_RIGHT_MGR_MODIFY_BOOT_CONFIG)
 )
+#define SC_MANAGER_WRITE_ACCESS( 
(SEC_STD_REQUIRED|SC_MANAGER_READ_ACCESS|SC_RIGHT_MGR_CREATE_SERVICE|SC_RIGHT_MGR_LOCK|SC_RIGHT_MGR_MODIFY_BOOT_CONFIG)
 )
 #define SC_MANAGER_ALL_ACCESS  ( SC_MANAGER_WRITE_ACCESS )
-#define SERVICE_READ_ACCESS( 
(STANDARD_RIGHTS_READ_ACCESS|SC_RIGHT_SVC_ENUMERATE_DEPENDENTS|SC_RIGHT_SVC_INTERROGATE|SC_RIGHT_SVC_QUERY_CONFIG|SC_RIGHT_SVC_QUERY_STATUS|SC_RIGHT_SVC_USER_DEFINED_CONTROL)
 )
+#define SERVICE_READ_ACCESS( 
(SEC_STD_READ_CONTROL|SC_RIGHT_SVC_ENUMERATE_DEPENDENTS|SC_RIGHT_SVC_INTERROGATE|SC_RIGHT_SVC_QUERY_CONFIG|SC_RIGHT_SVC_QUERY_STATUS|SC_RIGHT_SVC_USER_DEFINED_CONTROL)
 )
 #define SERVICE_EXECUTE_ACCESS ( 
(SERVICE_READ_ACCESS|SC_RIGHT_SVC_START|SC_RIGHT_SVC_STOP|SC_RIGHT_SVC_PAUSE_CONTINUE)
 )
-#define SERVICE_WRITE_ACCESS   ( 
(STANDARD_RIGHTS_REQUIRED_ACCESS|SERVICE_READ_ACCESS|SERVICE_EXECUTE_ACCESS|SC_RIGHT_SVC_CHANGE_CONFIG)
 )
+#define SERVICE_WRITE_ACCESS   ( 
(SEC_STD_REQUIRED|SERVICE_READ_ACCESS|SERVICE_EXECUTE_ACCESS|SC_RIGHT_SVC_CHANGE_CONFIG)
 )
 #define SERVICE_ALL_ACCESS ( SERVICE_WRITE_ACCESS )
 struct SERVICE_LOCK_STATUS {
uint32_t is_locked;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 7577d9ebf06fcdb630b2cdaab8772a6da9e37b70

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  7577d9ebf06fcdb630b2cdaab8772a6da9e37b70 (commit)
   via  fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0 (commit)
   via  d1bc7e56d0584ef4f1051e39cd1a81182d63f096 (commit)
   via  d6a5476ee7af464a381bbeeec576ee58f3650a43 (commit)
   via  55fd6b125c3e5ac135d124c291f5ae6102fcbb2f (commit)
  from  27c4cf4e7b2ba042b4caace7bab19f9e37510d86 (commit)

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


- Log -
commit 7577d9ebf06fcdb630b2cdaab8772a6da9e37b70
Merge: fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0 
27c4cf4e7b2ba042b4caace7bab19f9e37510d86
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 20:42:30 2008 +0200

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

commit fe36fe8c3e76e3dd7c66ecdf7254dc01c5d065c0
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 20:41:15 2008 +0200

Use common net utility code (address and sockaddr manipulation).

commit d1bc7e56d0584ef4f1051e39cd1a81182d63f096
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 19:56:09 2008 +0200

Rename same_net to same_net_v4 for consistency with Samba 3.

commit d6a5476ee7af464a381bbeeec576ee58f3650a43
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 19:53:15 2008 +0200

Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).

commit 55fd6b125c3e5ac135d124c291f5ae6102fcbb2f
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:56:37 2008 +0200

Remove support for obsolete data type ipv4address

---

Summary of changes:
 lib/util/talloc_stack.c |2 +-
 lib/util/util.h |6 +-
 lib/util/util_net.c |  367 ++
 source3/Makefile.in |2 +-
 source3/auth/auth_server.c  |2 +-
 source3/include/proto.h |   32 ++--
 source3/lib/access.c|2 +-
 source3/lib/interface.c |   41 ++--
 source3/lib/util_sock.c |  428 ++-
 source3/lib/wins_srv.c  |4 +-
 source3/libads/kerberos.c   |9 +-
 source3/libsmb/cliconnect.c |2 +-
 source3/libsmb/dsgetdcname.c|2 +-
 source3/libsmb/namequery.c  |   36 ++--
 source3/libsmb/namequery_dc.c   |2 +-
 source3/nmbd/nmbd.c |4 +-
 source3/nmbd/nmbd_mynames.c |3 +-
 source3/nmbd/nmbd_packets.c |2 +-
 source3/nmbd/nmbd_processlogon.c|2 +-
 source3/nmbd/nmbd_sendannounce.c|4 +-
 source3/nmbd/nmbd_subnetdb.c|2 +-
 source3/nmbd/nmbd_winsserver.c  |   16 +-
 source3/rpc_server/srv_spoolss_nt.c |4 +-
 source3/utils/net_util.c|4 +-
 source3/utils/nmblookup.c   |2 +-
 source3/utils/smbcontrol.c  |2 +-
 source3/winbindd/winbindd_cm.c  |2 +-
 source4/client/smbmount.c   |2 +-
 source4/lib/socket/interface.c  |8 +-
 source4/lib/tdr/tdr.c   |   34 ---
 30 files changed, 445 insertions(+), 583 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c
index 2722fb9..2f3ea11 100644
--- a/lib/util/talloc_stack.c
+++ b/lib/util/talloc_stack.c
@@ -69,7 +69,7 @@ static TALLOC_CTX *talloc_stackframe_internal(size_t poolsize)
TALLOC_CTX **tmp, *top, *parent;
 
if (talloc_stack_arraysize  talloc_stacksize + 1) {
-   tmp = TALLOC_REALLOC_ARRAY(NULL, talloc_stack, TALLOC_CTX *,
+   tmp = talloc_realloc(NULL, talloc_stack, TALLOC_CTX *,
   talloc_stacksize + 1);
if (tmp == NULL) {
goto fail;
diff --git a/lib/util/util.h b/lib/util/util.h
index e72df02..c2407ae 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -541,12 +541,14 @@ _PUBLIC_ struct in_addr interpret_addr2(const char *str);
 /**
  Check if an IP is the 0.0.0.0.
 **/
-_PUBLIC_ bool is_zero_ip(struct in_addr ip);
+_PUBLIC_ bool is_zero_ip_v4(struct in_addr ip);
 
 /**
  Are two IPs on the same subnet?
 **/
-_PUBLIC_ bool same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr 
mask);
+_PUBLIC_ bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr 
mask);
+
+_PUBLIC_ bool is_ipaddress_v4(const char *str);
 
 /**
  Check if a process exists. Does this work on all unixes?
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index ee57e9d..eb5e225 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -3,7 +3,7 @@
Samba utility functions
Copyright (C) Jelmer Vernooij [EMAIL PROTECTED] 2008
Copyright (C) Andrew Tridgell 1992-1998
-   Copyright (C) Jeremy Allison 

[SCM] Samba Shared Repository - branch master updated - 215b84903ed202e69241d9fd9494fdc95e911efc

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  215b84903ed202e69241d9fd9494fdc95e911efc (commit)
   via  09065795d6e5c48a8b3b536224552f18d68cfb84 (commit)
  from  7577d9ebf06fcdb630b2cdaab8772a6da9e37b70 (commit)

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


- Log -
commit 215b84903ed202e69241d9fd9494fdc95e911efc
Merge: 09065795d6e5c48a8b3b536224552f18d68cfb84 
7577d9ebf06fcdb630b2cdaab8772a6da9e37b70
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 20:50:59 2008 +0200

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

commit 09065795d6e5c48a8b3b536224552f18d68cfb84
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 18:13:25 2008 +0200

Remove unused constants from local.h.

---

Summary of changes:
 source4/client/client.c  |2 +-
 source4/include/local.h  |   13 ++---
 source4/param/loadparm.c |3 ++-
 3 files changed, 5 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/client/client.c b/source4/client/client.c
index 3213c89..1865d8d 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -934,7 +934,7 @@ static int cmd_more(struct smbclient_context *ctx, const 
char **args)
 
pager=getenv(PAGER);
 
-   pager_cmd = talloc_asprintf(ctx, %s %s,(pager? pager:PAGER), lname);
+   pager_cmd = talloc_asprintf(ctx, %s %s,(pager? pager:DEFAULT_PAGER), 
lname);
system(pager_cmd);
unlink(lname);

diff --git a/source4/include/local.h b/source4/include/local.h
index efffacd..5036f54 100644
--- a/source4/include/local.h
+++ b/source4/include/local.h
@@ -34,19 +34,10 @@
 /* separators for lists */
 #define LIST_SEP  \t,\n\r
 
-/* what default type of filesystem do we want this to show up as in a
-   NT file manager window? */
-#define FSTYPE_STRING NTFS
-
-/* user to test password server with as invalid in security=server mode. */
-#ifndef INVALID_USER_PREFIX
-#define INVALID_USER_PREFIX sambatest
-#endif
-
 /* the default pager to use for the client more command. Users can
override this with the PAGER environment variable */
-#ifndef PAGER
-#define PAGER more
+#ifndef DEFAULT_PAGER
+#define DEFAULT_PAGER more
 #endif
 
 /*
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index e626cdf..0c29de6 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2295,7 +2295,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX 
*mem_ctx)
SAFE_FREE(myname);
lp_do_global_parameter(lp_ctx, name resolve order, wins host bcast);
 
-   lp_do_global_parameter(lp_ctx, fstype, FSTYPE_STRING);
+   lp_do_global_parameter(lp_ctx, fstype, NTFS);
+
lp_do_global_parameter(lp_ctx, ntvfs handler, unixuid default);
lp_do_global_parameter(lp_ctx, max connections, -1);
 


-- 
Samba Shared Repository


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

2008-10-23 Thread Tim Prouty
The branch, master has been updated
   via  0b68762af7055bb3f60e28ab543dcad2736028e9 (commit)
  from  215b84903ed202e69241d9fd9494fdc95e911efc (commit)

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


- Log -
commit 0b68762af7055bb3f60e28ab543dcad2736028e9
Author: Tim Prouty [EMAIL PROTECTED]
Date:   Thu Oct 23 11:15:13 2008 -0700

Fix parameter has incomplete type build warning.

When libcli-util was moved to the top level
(3be0f6ea56ed8e43cd287ed020e942efb675b87b) it introduced a build
warning.  Since ndr_map_error2ntstatus depends on the definition of
enum ndr_err_code and libndr.h can't be easily included in error.h, I
moved the definition of enum ndr_err_code to libndr.h.

This also eliminates the need for the duplicate definition in proto.h

---

Summary of changes:
 libcli/util/error.h |7 ---
 librpc/ndr/libndr.h |5 +
 source3/include/proto.h |1 -
 3 files changed, 5 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/util/error.h b/libcli/util/error.h
index 8425544..5a7cc1b 100644
--- a/libcli/util/error.h
+++ b/libcli/util/error.h
@@ -46,11 +46,4 @@ WERROR ntstatus_to_werror(NTSTATUS error);
 */
 NTSTATUS map_nt_error_from_unix(int unix_error);
 
-enum ndr_err_code;
-
-/*
- Map an NT error code from a NDR error code.
-*/
-NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
-
 #endif /* _SAMBA_ERROR_H */
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index bedf41e..05455da 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -337,6 +337,11 @@ struct ndr_interface_list {
const struct ndr_interface_table *table;
 };
 
+/*
+ Map an NT error code from a NDR error code.
+*/
+NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
+
 /* FIXME: Use represent_as instead */
 struct dom_sid;
 enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const 
struct dom_sid *sid);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 61f864d..7a5cd3b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2418,7 +2418,6 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 
 /* The following definitions come from librpc/ndr/util.c  */
 
-NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
 enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, 
const struct server_id *r);
 enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, 
struct server_id *r);
 void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct 
server_id *r);


-- 
Samba Shared Repository


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

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  f18296151d1d8774b861ef6bd751b48ef9ee2f92 (commit)
   via  9d2d66610947a78c33616b7df7e9bf0c224b73e6 (commit)
   via  6b5d0b32b68a65121b05ca4f250807576a9ff23e (commit)
   via  22f566c39b564c39eca40a76bf1dfece96d7ece5 (commit)
  from  0b68762af7055bb3f60e28ab543dcad2736028e9 (commit)

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


- Log -
commit f18296151d1d8774b861ef6bd751b48ef9ee2f92
Merge: 9d2d66610947a78c33616b7df7e9bf0c224b73e6 
0b68762af7055bb3f60e28ab543dcad2736028e9
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 21:59:15 2008 +0200

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

commit 9d2d66610947a78c33616b7df7e9bf0c224b73e6
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 21:49:40 2008 +0200

Make lp_tls_* return absolute paths.

commit 6b5d0b32b68a65121b05ca4f250807576a9ff23e
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 21:30:41 2008 +0200

Move subunit ui ops out of smbtorture to the torture library.

commit 22f566c39b564c39eca40a76bf1dfece96d7ece5
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 21:08:13 2008 +0200

Move set_sockaddr_port to libutil.

---

Summary of changes:
 lib/util/util_net.c   |   14 ++
 source3/lib/util_sock.c   |   12 -
 source4/lib/tls/tls.c |   10 ++--
 source4/lib/torture/config.mk |2 +-
 source4/lib/torture/subunit.c |   96 +
 source4/lib/torture/torture.c |   37 ++-
 source4/lib/torture/torture.h |2 +
 source4/param/loadparm.c  |   31 +++--
 source4/param/param.h |   10 ++--
 source4/torture/smbtorture.c  |   76 +
 10 files changed, 184 insertions(+), 106 deletions(-)
 create mode 100644 source4/lib/torture/subunit.c


Changeset truncated at 500 lines:

diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index eb5e225..228393a 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -408,3 +408,17 @@ bool is_address_any(const struct sockaddr *psa)
}
return false;
 }
+
+void set_sockaddr_port(struct sockaddr *psa, uint16_t port)
+{
+#if defined(HAVE_IPV6)
+   if (psa-sa_family == AF_INET6) {
+   ((struct sockaddr_in6 *)psa)-sin6_port = htons(port);
+   }
+#endif
+   if (psa-sa_family == AF_INET) {
+   ((struct sockaddr_in *)psa)-sin_port = htons(port);
+   }
+}
+
+
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 667dbf6..5721f41 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -241,18 +241,6 @@ static int get_socket_port(int fd)
 }
 #endif
 
-void set_sockaddr_port(struct sockaddr_storage *psa, uint16 port)
-{
-#if defined(HAVE_IPV6)
-   if (psa-ss_family == AF_INET6) {
-   ((struct sockaddr_in6 *)psa)-sin6_port = htons(port);
-   }
-#endif
-   if (psa-ss_family == AF_INET) {
-   ((struct sockaddr_in *)psa)-sin_port = htons(port);
-   }
-}
-
 const char *client_name(int fd)
 {
return get_peer_name(fd,false);
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index f72aafe..24e4632 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -357,11 +357,11 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, 
struct loadparm_context *
struct tls_params *params;
int ret;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
-   const char *keyfile = private_path(tmp_ctx, lp_ctx, 
lp_tls_keyfile(lp_ctx));
-   const char *certfile = private_path(tmp_ctx, lp_ctx, 
lp_tls_certfile(lp_ctx));
-   const char *cafile = private_path(tmp_ctx, lp_ctx, 
lp_tls_cafile(lp_ctx));
-   const char *crlfile = private_path(tmp_ctx, lp_ctx, 
lp_tls_crlfile(lp_ctx));
-   const char *dhpfile = private_path(tmp_ctx, lp_ctx, 
lp_tls_dhpfile(lp_ctx));
+   const char *keyfile = lp_tls_keyfile(tmp_ctx, lp_ctx);
+   const char *certfile = lp_tls_certfile(tmp_ctx, lp_ctx);
+   const char *cafile = lp_tls_cafile(tmp_ctx, lp_ctx);
+   const char *crlfile = lp_tls_crlfile(tmp_ctx, lp_ctx);
+   const char *dhpfile = lp_tls_dhpfile(tmp_ctx, lp_ctx);
void tls_cert_generate(TALLOC_CTX *, const char *, const char *, const 
char *);
params = talloc(mem_ctx, struct tls_params);
if (params == NULL) {
diff --git a/source4/lib/torture/config.mk b/source4/lib/torture/config.mk
index 49e7b1a..8a7f2a3 100644
--- a/source4/lib/torture/config.mk
+++ b/source4/lib/torture/config.mk
@@ -9,6 +9,6 @@ torture_VERSION = 0.0.1
 torture_SOVERSION = 0
 
 PC_FILES += $(libtorturesrcdir)/torture.pc
-torture_OBJ_FILES = $(addprefix $(libtorturesrcdir)/, torture.o)
+torture_OBJ_FILES = $(addprefix $(libtorturesrcdir)/, torture.o subunit.o)
 
 PUBLIC_HEADERS += 

[SCM] Samba Shared Repository - branch master updated - 8baf1695492300fd8c2ce7e4f106a14f510357e5

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  8baf1695492300fd8c2ce7e4f106a14f510357e5 (commit)
  from  f18296151d1d8774b861ef6bd751b48ef9ee2f92 (commit)

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


- Log -
commit 8baf1695492300fd8c2ce7e4f106a14f510357e5
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 22:10:08 2008 +0200

Fix function parameters.

---

Summary of changes:
 source4/libcli/ldap/ldap_client.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/ldap/ldap_client.c 
b/source4/libcli/ldap/ldap_client.c
index a593567..7f43e16 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -401,7 +401,7 @@ static void ldap_connect_got_sock(struct composite_context 
*ctx,
if (conn-ldaps) {
struct socket_context *tls_socket;
struct socket_context *tmp_socket;
-   char *cafile = private_path(conn-sock, conn-lp_ctx, 
lp_tls_cafile(conn-lp_ctx));
+   char *cafile = lp_tls_cafile(conn-sock, conn-lp_ctx);
 
if (!cafile || !*cafile) {
talloc_free(conn-sock);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 25988f13696547e70b5e3155cb5bcea2f0786312

2008-10-23 Thread Jelmer Vernooij
The branch, master has been updated
   via  25988f13696547e70b5e3155cb5bcea2f0786312 (commit)
   via  ce0ac322b4a673e59e6e04467b2ceaf7a9637a68 (commit)
  from  8baf1695492300fd8c2ce7e4f106a14f510357e5 (commit)

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


- Log -
commit 25988f13696547e70b5e3155cb5bcea2f0786312
Merge: ce0ac322b4a673e59e6e04467b2ceaf7a9637a68 
8baf1695492300fd8c2ce7e4f106a14f510357e5
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 23:21:16 2008 +0200

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

commit ce0ac322b4a673e59e6e04467b2ceaf7a9637a68
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Thu Oct 23 23:20:50 2008 +0200

Fix prototype for set_sockaddr_port.

---

Summary of changes:
 source3/include/proto.h |2 +-
 source3/lib/interface.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7a5cd3b..83cd740 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1507,7 +1507,7 @@ char *print_sockaddr(char *dest,
const struct sockaddr_storage *psa);
 char *print_canonical_sockaddr(TALLOC_CTX *ctx,
const struct sockaddr_storage *pss);
-void set_sockaddr_port(struct sockaddr_storage *psa, uint16 port);
+void set_sockaddr_port(struct sockaddr *psa, uint16_t port);
 const char *client_name(int fd);
 const char *client_addr(int fd, char *addr, size_t addrlen);
 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index 4536990..f533ec9 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -289,7 +289,7 @@ const struct sockaddr_storage *iface_ip(const struct 
sockaddr *ip)
 
 bool iface_local(const struct sockaddr *ip)
 {
-   return iface_find(ip, True) ? true : false;
+   return iface_find(ip, true) ? true : false;
 }
 
 /


-- 
Samba Shared Repository


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

2008-10-23 Thread Günther Deschner
The branch, master has been updated
   via  0bfbae0f50df01ff058a23419173fd0553281fab (commit)
   via  d27bc7377aaea09652d14d06ce70c98d8f618ca7 (commit)
   via  3971492301d84d41942c4986eccebf1aa6557b46 (commit)
   via  2b364550a91555031548603608251026c15369de (commit)
   via  78a85f9e96e4c1d5a99e328e8ca07b1f75a79467 (commit)
  from  25988f13696547e70b5e3155cb5bcea2f0786312 (commit)

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


- Log -
commit 0bfbae0f50df01ff058a23419173fd0553281fab
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Oct 24 00:05:05 2008 +0200

netapi: make sure to always cleanup after testing NetUser calls.

Guenther

commit d27bc7377aaea09652d14d06ce70c98d8f618ca7
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 23:13:09 2008 +0200

netapi: add more group tests to netapitest.

Guenther

commit 3971492301d84d41942c4986eccebf1aa6557b46
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 23:11:50 2008 +0200

s3-samr-server: return NT_STATUS_NOT_SUPPORTED for group rename.

Guenther

commit 2b364550a91555031548603608251026c15369de
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 22:26:21 2008 +0200

s3-samr-server: remove unused historic code.

Guenther

commit 78a85f9e96e4c1d5a99e328e8ca07b1f75a79467
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Oct 23 20:43:11 2008 +0200

svcctl: move some non-rpc related bits out of rpc_svcctl.h.

Guenther

---

Summary of changes:
 source3/include/includes.h  |1 +
 source3/include/rpc_svcctl.h|   23 
 source3/include/services.h  |   48 
 source3/lib/netapi/tests/netgroup.c |  223 ++-
 source3/lib/netapi/tests/netuser.c  |4 +
 source3/rpc_server/srv_samr_nt.c|   63 +--
 6 files changed, 276 insertions(+), 86 deletions(-)
 create mode 100644 source3/include/services.h


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 035d46f..24e33c1 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -659,6 +659,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void 
*lp_ctx);
 #include async_req.h
 #include async_smb.h
 #include async_sock.h
+#include services.h
 
 #include lib/smbconf/smbconf.h
 
diff --git a/source3/include/rpc_svcctl.h b/source3/include/rpc_svcctl.h
index 0e31a53..2785840 100644
--- a/source3/include/rpc_svcctl.h
+++ b/source3/include/rpc_svcctl.h
@@ -117,9 +117,6 @@
 
 #define SVC_STATUS_PROCESS_INFO 0x
 
-/* where we assume the location of the service control scripts */
-#define SVCCTL_SCRIPT_DIR  svcctl
-
 /* utility structures for RPCs */
 
 /*
@@ -159,26 +156,6 @@ typedef struct {
 SC_ACTION *actions;
 } SERVICE_FAILURE_ACTIONS;
 
-/* 
- * dispatch table of functions to handle the =ServiceControl API
- */ 
- 
-typedef struct {
-   /* functions for enumerating subkeys and values */  
-   WERROR  (*stop_service)( const char *service, SERVICE_STATUS *status );
-   WERROR  (*start_service) ( const char *service );
-   WERROR  (*service_status)( const char *service, SERVICE_STATUS *status 
);
-} SERVICE_CONTROL_OPS;
-
-/* structure to store the service handle information  */
-
-typedef struct _ServiceInfo {
-   uint8   type;
-   char*name;
-   uint32  access_granted;
-   SERVICE_CONTROL_OPS *ops;
-} SERVICE_INFO;
-
 
 /* rpc structures */
 
diff --git a/source3/include/services.h b/source3/include/services.h
new file mode 100644
index 000..8c2a0cc
--- /dev/null
+++ b/source3/include/services.h
@@ -0,0 +1,48 @@
+/*
+   Unix SMB/CIFS implementation.
+   SMB parameters and setup
+   Copyright (C) Andrew Tridgell  1992-1997,
+   Copyright (C) Gerald (Jerry) Carter2005
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#ifndef _SERVICES_H /* _SERVICES_H */
+#define _SERVICES_H
+
+/* where we assume the location of the service control scripts */
+#define SVCCTL_SCRIPT_DIR  svcctl
+
+/*
+ * dispatch table of functions to handle the =ServiceControl API
+ */
+

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

2008-10-23 Thread Tim Prouty
The branch, master has been updated
   via  1b42152454279d0df1a1e0aba0aac807abcea7ab (commit)
  from  0bfbae0f50df01ff058a23419173fd0553281fab (commit)

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


- Log -
commit 1b42152454279d0df1a1e0aba0aac807abcea7ab
Author: Tim Prouty [EMAIL PROTECTED]
Date:   Thu Oct 23 13:41:44 2008 -0700

Fix ndr_size_PAC_LOGON_INFO defined but not used build warning

This patch removes the gensize option from krb5pac.idl because it
generates an unused function that has been causing warnings during the
s3 build.  I re-ran 'make samba3-idl' to update the generated files
for s3.  For s4 I ran a full build with no problems.

---

Summary of changes:
 librpc/idl/krb5pac.idl   |2 +-
 source3/librpc/gen_ndr/krb5pac.h |2 +-
 source3/librpc/gen_ndr/ndr_krb5pac.c |5 -
 3 files changed, 2 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/krb5pac.idl b/librpc/idl/krb5pac.idl
index a498b79..24c55b8 100644
--- a/librpc/idl/krb5pac.idl
+++ b/librpc/idl/krb5pac.idl
@@ -25,7 +25,7 @@ interface krb5pac
[flag(NDR_REMAINING)] DATA_BLOB signature;
} PAC_SIGNATURE_DATA;
 
-   typedef [gensize] struct {
+   typedef struct {
netr_SamInfo3 info3;
dom_sid2 *res_group_dom_sid;
samr_RidWithAttributeArray res_groups;
diff --git a/source3/librpc/gen_ndr/krb5pac.h b/source3/librpc/gen_ndr/krb5pac.h
index 7ec3e95..73bd0d9 100644
--- a/source3/librpc/gen_ndr/krb5pac.h
+++ b/source3/librpc/gen_ndr/krb5pac.h
@@ -24,7 +24,7 @@ struct PAC_LOGON_INFO {
struct netr_SamInfo3 info3;
struct dom_sid2 *res_group_dom_sid;/* [unique] */
struct samr_RidWithAttributeArray res_groups;
-}/* [gensize] */;
+};
 
 struct PAC_UNKNOWN_12 {
uint16_t upn_size;/* [value(2*strlen_m(upn_name))] */
diff --git a/source3/librpc/gen_ndr/ndr_krb5pac.c 
b/source3/librpc/gen_ndr/ndr_krb5pac.c
index f9e93e5..125fb7e 100644
--- a/source3/librpc/gen_ndr/ndr_krb5pac.c
+++ b/source3/librpc/gen_ndr/ndr_krb5pac.c
@@ -161,11 +161,6 @@ _PUBLIC_ void ndr_print_PAC_LOGON_INFO(struct ndr_print 
*ndr, const char *name,
ndr-depth--;
 }
 
-static size_t ndr_size_PAC_LOGON_INFO(const struct PAC_LOGON_INFO *r, int 
flags)
-{
-   return ndr_size_struct(r, flags, 
(ndr_push_flags_fn_t)ndr_push_PAC_LOGON_INFO);
-}
-
 _PUBLIC_ enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, 
int ndr_flags, const struct PAC_LOGON_INFO_CTR *r)
 {
if (ndr_flags  NDR_SCALARS) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 0058176ae32eff7acb07c013d48cca294bd4bf82

2008-10-23 Thread Tim Prouty
The branch, master has been updated
   via  0058176ae32eff7acb07c013d48cca294bd4bf82 (commit)
  from  1b42152454279d0df1a1e0aba0aac807abcea7ab (commit)

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


- Log -
commit 0058176ae32eff7acb07c013d48cca294bd4bf82
Author: Tim Prouty [EMAIL PROTECTED]
Date:   Thu Oct 23 16:35:53 2008 -0700

s3: fix simple incompatible pointer type build warning

---

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


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 05c39f8..9268542 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1064,7 +1064,7 @@ static bool add_sockaddr_to_array(TALLOC_CTX *mem_ctx,
}
 
(*addrs)[*num] = *pss;
-   set_sockaddr_port((*addrs)[*num], port);
+   set_sockaddr_port((struct sockaddr *)(*addrs)[*num], port);
 
*num += 1;
return True;


-- 
Samba Shared Repository


Build status as of Fri Oct 24 00:00:02 2008

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

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