Re: [Samba] Bizarre - How did windows user setfacl for a file??

2008-11-21 Thread David C. Rankin
Jeremy Allison wrote:
 On Thu, Nov 20, 2008 at 02:51:08AM -0600, David C. Rankin wrote:
 very bad. It causes errors in the backup where the files acl tell the backup
 that it doesn't have permission to access the files, even though based on the
 linux file permissions it does. So it is kind of  mess.
 
 You can always mount the filesystem without the acl flag,
 then Samba will fall back to only allowing u/g/o permissions.
 
 Jeremy.
 

That's what I've done until I find out what applications is setting the acls --
#$%^%#$windows..

Thanks

-- 
David C. Rankin, J.D.,P.E.  |
Rankin Law Firm, PLLC   | Countdown for openSuSE 11.1
510 Ochiltree Street|http://counter.opensuse.org/11.1/small
Nacogdoches, Texas 75961|
Telephone: (936) 715-9333   |  openSoftware und SystemEntwicklung
Facsimile: (936) 715-9339   |  http://www.opensuse.org/
www.rankinlawfirm.com   |
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Failed to join domain

2008-11-21 Thread Thomas Sondag
hi all,
I've got an issue during a machine join, my kerberos setup seem to be
good (tested with kinit), my current version of samba is : samba
2:3.2.3-1ubuntu3

Example :
net ads join -U adm-tsondag
Enter adm-tsondag's password:
Failed to join domain: failed to set machine spn: Out of memory

We've got a very complex AD setup with something like 16 AD servers on
distant sites, if you have a look to the detailed log at the this
mail, you could spot that the join is performed on the server DC05
rather than on the server DC01.

I would like to know how and why this server have been chosen, and If
I could restrict the join on the DC01 server ?

Any help would be appreciated.


#
smb.conf

[global]
workgroup  = MY
realm  = MY.REALM
encrypt passwords = yes

password server= DC01.my.domain
security   = ads
allow trusted domains  = no
socket options = TCP_NODELAY IPTOS_LOWDELAY
SO_RCVBUF=8576 SO_SNDBUF=8576
template shell = /bin/bash
template homedir   = /home/%D/%U
restrict anonymous = 2
use kerberos keytab= yes

winbind use default domain = yes
winbind enum users = no
winbind enum groups= no
winbind nested groups  = yes
winbind cache time = 172800
winbind refresh tickets= yes
#   winbind offline logon  = yes

log level = 16


idmap domains = MY

idmap config EP:backend= rid
idmap config EP:base_rid   = 0
idmap config EP:range  = 5000-1000
idmap config EP:readonly   = yes
idmap uid  = 5000-1000
idmap gid  = 5000-1000
idmap negative cache time  = 5
idmap cache time   = 172800

printing = cups
printcap name = cups
load printers = yes

###
krb5.conf

[logging]
default = FILE:/var/log/krb5libs.log

[libdefaults]
default_realm=  MY.REALM
default_tkt_enctypes = des-cbc-md5
default_tgs_enctypes = des-cbc-md5
renew_lifetime   = 7d
forwardable  = true


[appdefaults]
pam = {
minimum_uid = 1000
ignore_root = true
}

[realms]
MY.REALM = {
kdc = DC01.my.domain:88
}

   REALM = {
kdc = DC01.my.domain:88
}

[domain_realm]
.my.domain = MY.REALM
my.domain  =  MY.REALM

###
 debug :
[2008/11/21 14:03:26,  5] libads/ldap.c:ads_try_connect(188)
  ads_try_connect: sending CLDAP request to dc05.my.domain (realm: my.domain)
  r: union nbt_cldap_netlogon(case 6)
  logon5: struct nbt_cldap_netlogon_5
  type : NETLOGON_RESPONSE_FROM_PDC2 (23)
  sbz  : 0x (0)
  server_type  : 0x01fd (509)
 1: NBT_SERVER_PDC
 1: NBT_SERVER_GC
 1: NBT_SERVER_LDAP
 1: NBT_SERVER_DS
 1: NBT_SERVER_KDC
 1: NBT_SERVER_TIMESERV
 1: NBT_SERVER_CLOSEST
 1: NBT_SERVER_WRITABLE
 0: NBT_SERVER_GOOD_TIMESERV
 0: NBT_SERVER_NDNC
 0: NBT_SERVER_SELECT_SECRET_DOMAIN_6
 0: NBT_SERVER_FULL_SECRET_DOMAIN_6
  domain_uuid  : 38e84847-17c8-4c72-a3ff-9c11911f7637
  forest   : 'parl.union.eu'
  dns_domain   : 'my.domain'
  pdc_dns_name : 'epluxsdc05.my.domain'
  domain   : 'MY'
  pdc_name : 'DC05'
  user_name: ''
  server_site  : 'Luxembourg'
  client_site  : 'Luxembourg'
  nt_version   : 0x0005 (5)
 1: NETLOGON_VERSION_1
 0: NETLOGON_VERSION_5
 1: NETLOGON_VERSION_5EX
 0: NETLOGON_VERSION_5EX_WITH_IP
 0: NETLOGON_VERSION_WITH_CLOSEST_SITE
 0: NETLOGON_VERSION_AVOID_NT4_EMUL
 0: NETLOGON_VERSION_PDC
 0: NETLOGON_VERSION_IP
 0: NETLOGON_VERSION_LOCAL
 0: NETLOGON_VERSION_GC
  lmnt_token   : 0x (65535)
  lm20_token   : 0x (65535)
[2008/11/21 14:03:26, 10] libads/dns.c:sitename_store(778)
  sitename_store: realm = [MY], sitename = [Luxembourg], expire = [2147483647]
[2008/11/21 14:03:26, 10] lib/gencache.c:gencache_set(131)
  Adding cache entry with key = AD_SITENAME/DOMAIN/MY; value =

[Samba] empty directory with samba 2.0.24 and vista?

2008-11-21 Thread Shaochun Wang
Hi all,

When I connect the samba-3.0.24 server on a Windows Vista machine, I
always got empty directory. I mean that I can't see any files in the
directory although they really exist there.

But from the same Window Vista machine, everything works fine when I
connect another samba-3.0.32 server.

After searching the Google, I find that the same problem has been
reported before, But unfortunately, there is still no answer to it! So
I reiterate it here.

Any hints?

-- 
Shaochun Wang [EMAIL PROTECTED]

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


Re: [Samba] empty directory with samba 2.0.24 and vista?

2008-11-21 Thread Volker Lendecke
On Fri, Nov 21, 2008 at 09:50:12PM +0800, Shaochun Wang wrote:
 Hi all,
 
 When I connect the samba-3.0.24 server on a Windows Vista machine, I
 always got empty directory. I mean that I can't see any files in the
 directory although they really exist there.
 
 But from the same Window Vista machine, everything works fine when I
 connect another samba-3.0.32 server.
 
 After searching the Google, I find that the same problem has been
 reported before, But unfortunately, there is still no answer to it! So
 I reiterate it here.
 
 Any hints?

If you need the required patches backported to 3.0.24, you
might want to consult http://samba.org/samba/support/ for
companies providing commercial Samba support. Alternatively,
upgrade the 3.0.24 box to 3.0.32.

Volker


pgpdCCL1Mbola.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] Failed to join domain

2008-11-21 Thread Jelmer Jaarsma
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Thomas,


Thomas Sondag wrote:
 I would like to know how and why this server have been chosen, and If
 I could restrict the join on the DC01 server ?

No idea how the selection proces works, but by specifying -S DC01 you
can force it to DC01 if I'm not mistaken.
Regards,

Jelmer Jaarsma
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkmxH8ACgkQ3bV1+S5veEjECgCfYfHK6kTpVUxIcW4MH93GMAMm
64kAmwWbNujQu4KnueaRJMU/nSf1KaD0
=a9ac
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] mount problem (cifs)

2008-11-21 Thread Pol Hallen
Hi folks :-)
upgrading kernel from 2.6.22 to 2.6.27.7 and mount the share of samba..

mount //ip/share1 /home/user1/share1 -o user=user,pass=pass

I tried:
touch /home/user1/share1/tmp
touch: setting times of `/home/user1/share1/tmp': No such file or directory

or:
echo tmp  /home/user1/share1/tmp
-bash: /home/user1/share1/tmp: No such file or directory

I can write on share of samba, but I can't editing a file on share of samba.

I using cifs: is there a LinuxPermission problem or other?

There aren't permission problem on the directory because with windows clients 
everything is ok - with oldkernel (2.6.22) there were not these problems :-/

(using konqueror smb://ip/share I can correctly write on share of samba)

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


[Samba] Accessing shares from 2 domains

2008-11-21 Thread Jason x

We are splitting our users into 2 domains(DOMAINA and DOMAINB (changed for 
security reason)). I am having problems getting users who log into their 
workstation on DOMAINA to access a samba share on DOMAINB. We are using W2K3 
servers as our AD with LDAP. Samba shares on are CentOS5.1 servers. I Can 
anyone point me to some docs on how to set this up? I have been rumbling 
through google for the past 2 weeks and haven't found very many links that have 
been helpful.

We have set up interdomain trusts on the Windows side. 

When I try to access a samba share from a windows box on DOMAINA to a samba 
share on DOMAINB I get this in the samba log:

[2008/11/20 09:53:18, 1] auth/auth.c:check_domain_match(172)
  check_domain_match: Attempt to connect as user username from domain DOMAINA 
denied


When I do a wbinfo -m both domains are listed.
 wbinfo -m
DOMAINA
DOMAINB


wbinfo --sequence
DOMAINA : DISCONNECTED
DOMAINB : 82408



smb.conf
workgroup = DOMAINB

security = ads

realm = DOMAINB.COM

allow trusted domains = no
rid:DOMAINB=1-1idmap uid = 1-1
idmap gid = 1-1
winbind enum users = yes
winbind enum groups = yes
winbind nested groups = no
winbind use default domain = yes
winbind separator = +
template shell = /bin/bash
template homedir = /home/%U



krb5.conf
[libdefaults]
default_realm = DOMAINB.COM

[realms]
DOMAINB.COM = {
admin_server = servername.domainb.com
kdc = servername.domainb.com
}

DOMAINA.COM = {
admin_server = servername.domaina.com
kdc = servername.domaina.com
kdc = servername2.domaina.com
}
[domain_realms]
.domainb.com = DOMAINB.COM
domainb.com = DOMAINB.COM

.domaina = DOMAINA.COM
domaina.com = DOMAINA.COM
.kerberos.server = DOMAINA.COM




nsswitch.conf

passwd: files winbind
shadow: files winbind
group: files winbind
protocols: files winbind
services: files winbind
netgroup: files winbind
automount: files winbind


hosts:  files dns wins



Thanks in advanced!

j



_
Windows Live Hotmail now works up to 70% faster.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Why does the server want to connect to a client

2008-11-21 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc Muehlfeld wrote:
 Hi,
 
 I have 5 of 140 Windows XP SP2/SP3 machines that make problems when
 printing. The client open the printer dialog and it takes a long time
 (up to 1 minute) before it appears. Printing is slow, too. Meanwhile I
 see the following messages (repeating several times) in the client log:
 
 [2008/11/21 08:17:28, 1] lib/util_sock.c:open_socket_out(888)
   timeout connecting to 10.1.0.253:445
 [2008/11/21 08:17:37, 1] lib/util_sock.c:open_socket_out(888)
   timeout connecting to 10.1.0.253:139
 [2008/11/21 08:17:37, 1] libsmb/cliconnect.c:cli_connect(1505)
   Error connecting to 10.1.0.253 (Operation already in progress)
 [2008/11/21 08:17:37, 1] libsmb/cliconnect.c:cli_start_connection(1568)
   cli_start_connection: failed to connect to IT-0920 (10.1.0.253).
 Error NT_STATUS_ACCESS_DENIED
 
 Why does the server tries to open a connection to these clients? On one
 of the 5 PCs if I disable the XP firewall, the problem disappers. The
 log entries above are from a client with enabled XP firewall (unchanged
 standard settings), but there are no changes when I disable it. Some of
 problem clients only show the timeout connection to... messages.
 
 I used samba 3.0.22 until yesterday, but the problem still exist after
 upgrading to 3.0.32.

It's how MS designed the WINdows print notification mechanism.
Set your firewall to reject instead of drop those packets.




cheers, jerry
- --
=
Samba--- http://www.samba.org
Likewise Software  -  http://www.likewisesoftware.com
What man is a man who does not make the world better?  --Balian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJJvktIR7qMdg1EfYRAkCqAKDPXNU0bHAKMPpf0pYKnv48SFTm9ACg4zpv
rL7Wd7dJAouz8vJbSwrnF/s=
=oLf8
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Assistance needed on using mount.smbfs (cifs) to authenticate to samba server with encrypt passwords = No.

2008-11-21 Thread Richard Nelson
On Thu, Nov 20, 2008 at 9:51 PM, Günter Kukkukk [EMAIL PROTECTED] wrote:
 Am Mittwoch, 19. November 2008 schrieb Richard Nelson:
 Greetings,

 I am working on getting mount.cifs version: 1.11-3.2.4 on debian to
 mount a share on a samba server Version 3.0.13-1.1-SUSE on SuSe. This
 was working on older debian systems, but upon upgrading some of the
 systems to Lenny I am now having trouble mounting shares.  Again, this
 was working and I have smbfs installed on the systems (which is what I
 used before).

 The samba server is set to have encrypt passwords = No and I am
 basically authenticating from /etc/passwd+shadow (no smbpasswd file).
 The setup is still working fine on non upgraded systems. Only on the
 newly upgraded systems is the mounting not working.

 The kernel on the clients do have CONFIG_CIFS_WEAK_PW_HASH=y

 Below is some dmesg info after running the mount.cifs with various /
 proc/fs/cifs/SecurityFlags:
 mount.smbfs //172.16.0.8/tech ./mymount -ouser=tech


SNIP


 Any thoughts welcome. Many thanks.


Greetings,


 I'm not sure whether the following hints will also work with older cifs
 versions, it worked here with the recent git tree.

 1.) use 'modprobe cifs' to load the kernel module

Yes it is loaded.

 2.) use 'echo 0x20  /proc/fs/cifs/SecurityFlags' (also try 0x27)

Ok I have output below.

 3.) mount by using the sec=lanman option,
e.g. mount -t cifs //server/share /mount/point -o 
 cred=/path/to/creds_file,sec=lanman


With mount -t cifs //172.16.0.8/tech ./mymount -ouser=tech,sec=lanman

[698499.794951]  fs/cifs/cifs_debug.c: sec flags 0x20
[698499.794958]  fs/cifs/cifs_debug.c: packet signing disabled

[698534.544307]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
[698534.544316]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 4
with uid: 0
[698534.544325]  fs/cifs/connect.c: Username: tech
[698534.544328]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
[698534.544339]  fs/cifs/connect.c: Socket created
[698534.545059]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
0x7fff
[698534.545066]  fs/cifs/transport.c: Sending smb of length 68
[698534.552075]  fs/cifs/connect.c: Existing smb sess not found
[698534.552088]  fs/cifs/cifssmb.c: secFlags 0x10
[698534.552093]  fs/cifs/transport.c: For smb_command 114
[698534.552096]  fs/cifs/transport.c: Sending smb of length 78
[698534.552325]  fs/cifs/connect.c: Demultiplex PID: 7365
[698534.552337]  fs/cifs/connect.c: rfc1002 length 0x8204
[698534.552339]  fs/cifs/connect.c: Good RFC 1002 session rsp
[698534.552804]  fs/cifs/connect.c: rfc1002 length 0x55
[698534.552820]  fs/cifs/cifssmb.c: Dialect: 2
[698534.552822]  CIFS VFS: Server requests plain text password but
client support disabled
[698534.552826]  fs/cifs/cifssmb.c: Signing disabled
[698534.552828]  fs/cifs/cifssmb.c: negprot rc 0
[698534.552830]  fs/cifs/connect.c: Security Mode: 0x1 Capabilities:
0xe3fd TimeAdjust: 21600
[698534.552833]  fs/cifs/sess.c: sess setup type 1
[698534.552838]  fs/cifs/sess.c: Negotiating LANMAN setting up strings
[698534.552842]  fs/cifs/transport.c: For smb_command 115
[698534.552845]  fs/cifs/transport.c: Sending smb:  total_len 142
[698534.558690]  fs/cifs/connect.c: rfc1002 length 0x27
[698534.558690]  fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
[698534.558690]  fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[698534.558690]  fs/cifs/sess.c: ssetup rc from sendrecv2 is -13
[698534.558690]  fs/cifs/sess.c: ssetup freeing small buf f6e9c740
[698534.558690]  CIFS VFS: Send error in SessSetup = -13
[698534.688079]  fs/cifs/connect.c: No session or bad tcon
[698534.688088]  fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid
= 4) rc = -13
[698534.688091]  CIFS VFS: cifs_mount failed w/return code = -13



And

[698790.654395]  fs/cifs/cifs_debug.c: sec flags 0x27
[698790.654395]  fs/cifs/cifs_debug.c: packet signing now required

[698799.968300]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
[698799.968300]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 5
with uid: 0
[698799.968300]  fs/cifs/connect.c: Username: tech
[698799.968300]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
[698799.968300]  fs/cifs/connect.c: Socket created
[698799.968603]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
0x7fff
[698799.968603]  fs/cifs/transport.c: Sending smb of length 68
[698799.976084]  fs/cifs/connect.c: Existing smb sess not found
[698799.976097]  fs/cifs/cifssmb.c: secFlags 0x10
[698799.976103]  fs/cifs/transport.c: For smb_command 114
[698799.976106]  fs/cifs/transport.c: Sending smb of length 78
[698799.976387]  fs/cifs/connect.c: Demultiplex PID: 7371
[698799.976401]  fs/cifs/connect.c: rfc1002 length 0x8204
[698799.976403]  fs/cifs/connect.c: Good RFC 1002 session rsp
[698799.976786]  fs/cifs/connect.c: rfc1002 length 0x55
[698799.976802]  fs/cifs/cifssmb.c: Dialect: 2
[698799.976804]  CIFS VFS: Server requests plain text password but
client 

FW: [Samba] Closing sessions and smbstatus

2008-11-21 Thread Rippl, Steve
Perhaps I can ask a slightly different question?  Is there some kind of
test I can do on a hung process so I can determine whether it's active
or not, in a script?  The output of strace is below but it doesn't mean
much to me I'm afraid.  Is there a straight forward difference between
strace for a real connection and one of my hung ones that I can use to
manually kill them?

Many thanks,

Steve Rippl
Woodland School District



 -Original Message-
 From: Rippl, Steve
 Sent: Tuesday, October 21, 2008 10:26 PM
 To: 'Jeremy Allison'
 Cc: samba@lists.samba.org
 Subject: RE: [Samba] Closing sessions and smbstatus
 
  On Mon, Oct 20, 2008 at 12:52:57PM -0700, Steve Rippl wrote:
 
   But checking our server I find that the processes DO still exist!
So
   I'm getting a user session in smbstatus with a specific PID and
when I
   ps -ef | grep PID there is the smbd process still running, yet the
 user
   has long since logged out (days ago)?!  It's not just that the
.tbd
 file
   hasn't been updated, it's that the /usr/local/bin/smbd process is
 still
   running.  A restart of Samba clears them all up immediately, but
why
 are
   they hanging around when the client is gone?  Is this just
happening
 to
   me on our particular setup or is this normal behavior?
 
  No, that's not normal behavior, but it does explain why
  the session id's are hanging around. Once the client
  terminates the TCP session the smbd should die (and
  clean up all resources such as session id's etc.).
 
  When you find a process in this state attach using
  strace -p pid (on Linux) to see what it's up to.
 
  Jeremy.
 
 So after one day I have ~50 left-over sessions.  Running strace as
above I
 seem to usually get...
 
 select(32, [5 23 31], [], NULL, {43, 45}) = 0 (Timeout)
 gettimeofday({1224652458, 61107}, NULL) = 0
 geteuid()   = 0
 getegid()   = 0
 setgroups(0, [])= 0
 setresgid(4294967295, 0, 4294967295)= 0
 getegid()   = 0
 setresuid(0, 0, 4294967295) = 0
 geteuid()   = 0
 write(23, \205\0\0\0, 4)  = 4
 gettimeofday({1224652458, 61549}, NULL) = 0
 geteuid()   = 0
 fstat(25, {st_mode=S_IFREG|0644, st_size=894111, ...}) = 0
 gettimeofday({1224652458, 61698}, NULL) = 0
 select(32, [5 23 31], [], NULL, {60, 0} unfinished ...
 
 although a couple of time I got more go by...
 
 ...[cut-off]...
 getegid()   = 0
 setgroups(0, [])= 0
 setresgid(4294967295, 0, 4294967295)= 0
 getegid()   = 0
 setresuid(0, 0, 4294967295) = 0
 geteuid()   = 0
 fcntl(8, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=244, len=1})
= 0
 fcntl(8, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=244, len=1})
= 0
 stat(/etc/pam.d, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 open(/etc/pam.d/samba, O_RDONLY)  = 25
 fstat(25, {st_mode=S_IFREG|0644, st_size=69, ...}) = 0
 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) =
 0x7f2f8db98000
 read(25, @include [EMAIL PROTECTED] co..., 4096) = 69
 stat(/etc/pam.d, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
 open(/etc/pam.d/common-auth, O_RDONLY) = 29
 fstat(29, {st_mode=S_IFREG|0644, st_size=484, ...}) = 0
 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) =
 0x7f2f8db97000
 read(29, #\n# /etc/pam.d/common-auth - aut..., 4096) = 484
 open(/lib/security/pam_unix.so, O_RDONLY) = 30
 read(30, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\260*\0\0...,
 832) = 832
 fstat(30, {st_mode=S_IFREG|0644, st_size=50568, ...}) = 0
 mmap(NULL, 2195080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
30, 0)
 = 0x7f2f892fd000
 mprotect(0x7f2f89309000, 2093056, PROT_NONE) = 0
 mmap(0x7f2f89508000, 4096, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 30, 0xb000) = 0x7f2f89508000
 mmap(0x7f2f89509000, 48776, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2f89509000
 close(30)   = 0
 open(/etc/ld.so.cache, O_RDONLY)  = 30
 fstat(30, {st_mode=S_IFREG|0644, st_size=45774, ...}) = 0
 mmap(NULL, 45774, PROT_READ, MAP_PRIVATE, 30, 0) = 0x7f2f8db8b000
 close(30)   = 0
 access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or
 directory)
 open(/lib/libselinux.so.1, O_RDONLY)  = 30
 read(30, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\240Q\0\0...,
 832) = 832
 fstat(30, {st_mode=S_IFREG|0644, st_size=109368, ...}) = 0
 mmap(NULL, 2209176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
30, 0)
 = 0x7f2f888d4000
 mprotect(0x7f2f888ed000, 2097152, PROT_NONE) = 0
 mmap(0x7f2f88aed000, 8192, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 30, 0x19000) = 0x7f2f88aed000
 mmap(0x7f2f88aef000, 1432, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) 

[Samba] Cups Automatigcally printing with Vista

2008-11-21 Thread Adam McCarthy
I have followed the various guides online for setting up Cups and
Samba, to where you can just right click a print and choice connect
and the printer just works but then it does not work with Vista. It
seems to print out tons of junk.

Is there a way to make Vista work with Cups + Samba?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Assistance needed on using mount.smbfs (cifs) to authenticate to samba server with encrypt passwords = No.

2008-11-21 Thread Günter Kukkukk
Am Freitag, 21. November 2008 schrieb Richard Nelson:
 On Thu, Nov 20, 2008 at 9:51 PM, Günter Kukkukk [EMAIL PROTECTED] wrote:
  Am Mittwoch, 19. November 2008 schrieb Richard Nelson:
  Greetings,
 
  I am working on getting mount.cifs version: 1.11-3.2.4 on debian to
  mount a share on a samba server Version 3.0.13-1.1-SUSE on SuSe. This
  was working on older debian systems, but upon upgrading some of the
  systems to Lenny I am now having trouble mounting shares.  Again, this
  was working and I have smbfs installed on the systems (which is what I
  used before).
 
  The samba server is set to have encrypt passwords = No and I am
  basically authenticating from /etc/passwd+shadow (no smbpasswd file).
  The setup is still working fine on non upgraded systems. Only on the
  newly upgraded systems is the mounting not working.
 
  The kernel on the clients do have CONFIG_CIFS_WEAK_PW_HASH=y
 
  Below is some dmesg info after running the mount.cifs with various /
  proc/fs/cifs/SecurityFlags:
  mount.smbfs //172.16.0.8/tech ./mymount -ouser=tech
 
 
 SNIP
 
 
  Any thoughts welcome. Many thanks.
 
 
 Greetings,
 
 
  I'm not sure whether the following hints will also work with older cifs
  versions, it worked here with the recent git tree.
 
  1.) use 'modprobe cifs' to load the kernel module
 
 Yes it is loaded.
 
  2.) use 'echo 0x20  /proc/fs/cifs/SecurityFlags' (also try 0x27)
 
 Ok I have output below.
 
  3.) mount by using the sec=lanman option,
 e.g. mount -t cifs //server/share /mount/point -o 
  cred=/path/to/creds_file,sec=lanman
 
 
 With mount -t cifs //172.16.0.8/tech ./mymount -ouser=tech,sec=lanman
 
 [698499.794951]  fs/cifs/cifs_debug.c: sec flags 0x20
 [698499.794958]  fs/cifs/cifs_debug.c: packet signing disabled
 
 [698534.544307]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
 [698534.544316]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 4
 with uid: 0
 [698534.544325]  fs/cifs/connect.c: Username: tech
 [698534.544328]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
 [698534.544339]  fs/cifs/connect.c: Socket created
 [698534.545059]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
 0x7fff
 [698534.545066]  fs/cifs/transport.c: Sending smb of length 68
 [698534.552075]  fs/cifs/connect.c: Existing smb sess not found
 [698534.552088]  fs/cifs/cifssmb.c: secFlags 0x10
 [698534.552093]  fs/cifs/transport.c: For smb_command 114
 [698534.552096]  fs/cifs/transport.c: Sending smb of length 78
 [698534.552325]  fs/cifs/connect.c: Demultiplex PID: 7365
 [698534.552337]  fs/cifs/connect.c: rfc1002 length 0x8204
 [698534.552339]  fs/cifs/connect.c: Good RFC 1002 session rsp
 [698534.552804]  fs/cifs/connect.c: rfc1002 length 0x55
 [698534.552820]  fs/cifs/cifssmb.c: Dialect: 2
 [698534.552822]  CIFS VFS: Server requests plain text password but
 client support disabled
 [698534.552826]  fs/cifs/cifssmb.c: Signing disabled
 [698534.552828]  fs/cifs/cifssmb.c: negprot rc 0
 [698534.552830]  fs/cifs/connect.c: Security Mode: 0x1 Capabilities:
 0xe3fd TimeAdjust: 21600
 [698534.552833]  fs/cifs/sess.c: sess setup type 1
 [698534.552838]  fs/cifs/sess.c: Negotiating LANMAN setting up strings
 [698534.552842]  fs/cifs/transport.c: For smb_command 115
 [698534.552845]  fs/cifs/transport.c: Sending smb:  total_len 142
 [698534.558690]  fs/cifs/connect.c: rfc1002 length 0x27
 [698534.558690]  fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
 [698534.558690]  fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
 [698534.558690]  fs/cifs/sess.c: ssetup rc from sendrecv2 is -13
 [698534.558690]  fs/cifs/sess.c: ssetup freeing small buf f6e9c740
 [698534.558690]  CIFS VFS: Send error in SessSetup = -13
 [698534.688079]  fs/cifs/connect.c: No session or bad tcon
 [698534.688088]  fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid
 = 4) rc = -13
 [698534.688091]  CIFS VFS: cifs_mount failed w/return code = -13
 
 
 
 And
 
 [698790.654395]  fs/cifs/cifs_debug.c: sec flags 0x27
 [698790.654395]  fs/cifs/cifs_debug.c: packet signing now required
 
 [698799.968300]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
 [698799.968300]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 5
 with uid: 0
 [698799.968300]  fs/cifs/connect.c: Username: tech
 [698799.968300]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
 [698799.968300]  fs/cifs/connect.c: Socket created
 [698799.968603]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
 0x7fff
 [698799.968603]  fs/cifs/transport.c: Sending smb of length 68
 [698799.976084]  fs/cifs/connect.c: Existing smb sess not found
 [698799.976097]  fs/cifs/cifssmb.c: secFlags 0x10
 [698799.976103]  fs/cifs/transport.c: For smb_command 114
 [698799.976106]  fs/cifs/transport.c: Sending smb of length 78
 [698799.976387]  fs/cifs/connect.c: Demultiplex PID: 7371
 [698799.976401]  fs/cifs/connect.c: rfc1002 length 0x8204
 [698799.976403]  fs/cifs/connect.c: Good RFC 1002 session rsp
 

Re: [Samba] Assistance needed on using mount.smbfs (cifs) to authenticate to samba server with encrypt passwords = No.

2008-11-21 Thread Richard Nelson
On Fri, Nov 21, 2008 at 8:27 PM, Günter Kukkukk [EMAIL PROTECTED] wrote:
 Am Freitag, 21. November 2008 schrieb Richard Nelson:
 On Thu, Nov 20, 2008 at 9:51 PM, Günter Kukkukk [EMAIL PROTECTED] wrote:
  Am Mittwoch, 19. November 2008 schrieb Richard Nelson:
  Greetings,
 
  I am working on getting mount.cifs version: 1.11-3.2.4 on debian to
  mount a share on a samba server Version 3.0.13-1.1-SUSE on SuSe. This
  was working on older debian systems, but upon upgrading some of the
  systems to Lenny I am now having trouble mounting shares.  Again, this
  was working and I have smbfs installed on the systems (which is what I
  used before).
 
  The samba server is set to have encrypt passwords = No and I am
  basically authenticating from /etc/passwd+shadow (no smbpasswd file).
  The setup is still working fine on non upgraded systems. Only on the
  newly upgraded systems is the mounting not working.
 
  The kernel on the clients do have CONFIG_CIFS_WEAK_PW_HASH=y
 
  Below is some dmesg info after running the mount.cifs with various /
  proc/fs/cifs/SecurityFlags:
  mount.smbfs //172.16.0.8/tech ./mymount -ouser=tech
 

 SNIP

 
  Any thoughts welcome. Many thanks.
 

 Greetings,


  I'm not sure whether the following hints will also work with older cifs
  versions, it worked here with the recent git tree.
 
  1.) use 'modprobe cifs' to load the kernel module

 Yes it is loaded.

  2.) use 'echo 0x20  /proc/fs/cifs/SecurityFlags' (also try 0x27)

 Ok I have output below.

  3.) mount by using the sec=lanman option,
 e.g. mount -t cifs //server/share /mount/point -o 
  cred=/path/to/creds_file,sec=lanman
 

 With mount -t cifs //172.16.0.8/tech ./mymount -ouser=tech,sec=lanman

 [698499.794951]  fs/cifs/cifs_debug.c: sec flags 0x20
 [698499.794958]  fs/cifs/cifs_debug.c: packet signing disabled

 [698534.544307]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
 [698534.544316]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 4
 with uid: 0
 [698534.544325]  fs/cifs/connect.c: Username: tech
 [698534.544328]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
 [698534.544339]  fs/cifs/connect.c: Socket created
 [698534.545059]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
 0x7fff
 [698534.545066]  fs/cifs/transport.c: Sending smb of length 68
 [698534.552075]  fs/cifs/connect.c: Existing smb sess not found
 [698534.552088]  fs/cifs/cifssmb.c: secFlags 0x10
 [698534.552093]  fs/cifs/transport.c: For smb_command 114
 [698534.552096]  fs/cifs/transport.c: Sending smb of length 78
 [698534.552325]  fs/cifs/connect.c: Demultiplex PID: 7365
 [698534.552337]  fs/cifs/connect.c: rfc1002 length 0x8204
 [698534.552339]  fs/cifs/connect.c: Good RFC 1002 session rsp
 [698534.552804]  fs/cifs/connect.c: rfc1002 length 0x55
 [698534.552820]  fs/cifs/cifssmb.c: Dialect: 2
 [698534.552822]  CIFS VFS: Server requests plain text password but
 client support disabled
 [698534.552826]  fs/cifs/cifssmb.c: Signing disabled
 [698534.552828]  fs/cifs/cifssmb.c: negprot rc 0
 [698534.552830]  fs/cifs/connect.c: Security Mode: 0x1 Capabilities:
 0xe3fd TimeAdjust: 21600
 [698534.552833]  fs/cifs/sess.c: sess setup type 1
 [698534.552838]  fs/cifs/sess.c: Negotiating LANMAN setting up strings
 [698534.552842]  fs/cifs/transport.c: For smb_command 115
 [698534.552845]  fs/cifs/transport.c: Sending smb:  total_len 142
 [698534.558690]  fs/cifs/connect.c: rfc1002 length 0x27
 [698534.558690]  fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
 [698534.558690]  fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
 [698534.558690]  fs/cifs/sess.c: ssetup rc from sendrecv2 is -13
 [698534.558690]  fs/cifs/sess.c: ssetup freeing small buf f6e9c740
 [698534.558690]  CIFS VFS: Send error in SessSetup = -13
 [698534.688079]  fs/cifs/connect.c: No session or bad tcon
 [698534.688088]  fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid
 = 4) rc = -13
 [698534.688091]  CIFS VFS: cifs_mount failed w/return code = -13



 And

 [698790.654395]  fs/cifs/cifs_debug.c: sec flags 0x27
 [698790.654395]  fs/cifs/cifs_debug.c: packet signing now required

 [698799.968300]  fs/cifs/cifsfs.c: Devname: //172.16.0.8/tech flags: 64
 [698799.968300]  fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 5
 with uid: 0
 [698799.968300]  fs/cifs/connect.c: Username: tech
 [698799.968300]  fs/cifs/connect.c: UNC: \\172.16.0.8\tech ip: 172.16.0.8
 [698799.968300]  fs/cifs/connect.c: Socket created
 [698799.968603]  fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo
 0x7fff
 [698799.968603]  fs/cifs/transport.c: Sending smb of length 68
 [698799.976084]  fs/cifs/connect.c: Existing smb sess not found
 [698799.976097]  fs/cifs/cifssmb.c: secFlags 0x10
 [698799.976103]  fs/cifs/transport.c: For smb_command 114
 [698799.976106]  fs/cifs/transport.c: Sending smb of length 78
 [698799.976387]  fs/cifs/connect.c: Demultiplex PID: 7371
 [698799.976401]  fs/cifs/connect.c: rfc1002 length 0x8204
 

Re: [Samba] smbtorture : Unknown operation mkdir

2008-11-21 Thread Francis Giraldeau
Francis Giraldeau a écrit :
 Hi,

 I got problem while using smbtorture with the NBENCH test. The error
 happens on the Mkdir operation.

 I'm using the file client.txt from dbench-3.04.

Hello,

I have been able to make work smbtorture NBENCH test as expected with
client_oplocks.txt from dbench-2.1 only. This file disapeared from
dbench-3.0

http://samba.org/ftp/tridge/dbench/dbench-2.1.tar.gz

Cheer,

Francis


-- 
Francis Giraldeau, Ing jr.
Analyste Infrastructure
Directeur Qualité
Téléphone : (819) 780-8955 poste 
Sans frais : 1-800-996-8955
Télécopieur : (819) 780-8871

Revolution Linux Inc.
2100 King ouest - bureau 260
Sherbrooke (Québec)
J1J 2E8 CANADA

http://www.revolutionlinux.com

Toutes les opinions et les prises de position exprimees dans ce courriel
sont celles de son auteur et ne representent pas necessairement celles
de Revolution Linux

Any views and opinions expressed in this email are solely those of the
author and do not necessarily represent those of Revolution Linux


-- 
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-4491-gf84fe8b

2008-11-21 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  f84fe8b0025850b31560f149ebaa27cf5a504694 (commit)
   via  e451daf4c2e1a6de6c109e88243b535d7e15cb35 (commit)
   via  b656b672a3216829f3488734b058dd9f86409e5b (commit)
   via  458a65b409f25f913a8122b320b38d1669137f06 (commit)
   via  69109cd0b896ce7dfbe04b713367c8f1c933dc98 (commit)
   via  6a2d15f1de9fb7b93a31129139dea667303393db (commit)
   via  e878e876b5ebc46536d83995c5bccd11c8f23b82 (commit)
   via  4e8e29174146e324ae0fb5af6799b256d49e05ab (commit)
   via  47a32ce25b29e189ce424f860bb4f624e6f39147 (commit)
   via  69fd76d15bb8acdb1cc452ab68e1c4e65adbedcb (commit)
   via  26ca8d5504f1ef56355eb5ece88b1ac728869737 (commit)
   via  18f1585539bb306101f3471103a2936c2dfd0aa3 (commit)
   via  a820f7c960c12f924c60fb9978543106e286e27f (commit)
   via  252715060fca9fd75b899a6df3ff65b67aad4ec8 (commit)
   via  9c11f1a9d174d800696640671894e7071292444f (commit)
   via  d1821ad64960308bae9ad34ab53f565be4f5c967 (commit)
   via  1bf5777bf2f45c44e2e53617a01ebbffc05c330e (commit)
   via  6e0f91ad93e75f0f00f157c1e8eaab5b4f0f54f3 (commit)
   via  b779820cabf0e2885526a72cae62e775588a6bab (commit)
   via  3b93b9d65b0cb057887e8d286fc6c3bb06e1e7d1 (commit)
   via  76be70a7190327f1bcd2ea240591a139830d580f (commit)
  from  72a2b9615025c249c7cf1376ebeeb6a29537504f (commit)

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


- Log -
commit f84fe8b0025850b31560f149ebaa27cf5a504694
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Wed Nov 12 14:27:51 2008 +0100

pam_winbind: fix some invalid blob handling.

Guenther

commit e451daf4c2e1a6de6c109e88243b535d7e15cb35
Author: Andreas Schneider [EMAIL PROTECTED]
Date:   Fri Nov 21 11:39:01 2008 +0100

Create a function out of pam_sm_close_session to delete the credentials.

This is the way the creds should be deleted. Now we have back a
close_session function which can be used for other things.

commit b656b672a3216829f3488734b058dd9f86409e5b
Author: Andreas Schneider [EMAIL PROTECTED]
Date:   Mon Oct 20 14:54:11 2008 +0200

Delete the krb5 ccname variable from the PAM environment if set.

If winbind sets the KRB5CCNAME variable it should unset it when
the cache gets destroyed.

commit 458a65b409f25f913a8122b320b38d1669137f06
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 11:34:52 2008 +0100

Set the right return value if wbc_status is set to an error.

Guenther

commit 69109cd0b896ce7dfbe04b713367c8f1c933dc98
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Aug 14 14:41:50 2008 +0200

pam_winbind: document mkhomedir option.

Guenther

commit 6a2d15f1de9fb7b93a31129139dea667303393db
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 11:33:52 2008 +0100

pam_winbind: re-add mkhomedir option.

Guenther

commit e878e876b5ebc46536d83995c5bccd11c8f23b82
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Aug 29 16:12:04 2008 +0200

pam_winbind: remove unused pam_winbind_request().

Guenther

commit 4e8e29174146e324ae0fb5af6799b256d49e05ab
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Aug 19 14:52:24 2008 +0200

pam_winbind: fix wbc_auth_error_to_pam_error().

Guenther

commit 47a32ce25b29e189ce424f860bb4f624e6f39147
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Mon Aug 25 14:35:42 2008 +0200

pam_winbind: remove some unused macros.

Guenther

commit 69fd76d15bb8acdb1cc452ab68e1c4e65adbedcb
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Aug 19 14:48:23 2008 +0200

pam_winbind: use wbclient equivalents for ACB_PWNOEXP and some NETLOGON 
flags.

Guenther

commit 26ca8d5504f1ef56355eb5ece88b1ac728869737
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Tue Aug 19 11:07:59 2008 +0200

pam_winbind: use libwbclient for WINBINDD_PAM_AUTH.

Guenther

commit 18f1585539bb306101f3471103a2936c2dfd0aa3
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 11:31:01 2008 +0100

pam_winbind: use libwbclient for WINBINDD_PAM_LOGOFF.

Guenther

commit a820f7c960c12f924c60fb9978543106e286e27f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 11:22:07 2008 +0100

pam_winbind: use libwbclient for WINBINDD_PAM_CHAUTHTOK.

Guenther

commit 252715060fca9fd75b899a6df3ff65b67aad4ec8
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Aug 14 23:33:12 2008 +0200

pam_winbind: use libwbclient for WINBINDD_LOOKUPNAME/LOOKUPSID.

Guenther

commit 9c11f1a9d174d800696640671894e7071292444f
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Aug 14 18:17:00 2008 +0200

pam_winbind: use libwbclient for WINBINDD_INFO.

Guenther

commit d1821ad64960308bae9ad34ab53f565be4f5c967
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Aug 14 

[SCM] Samba Shared Repository - branch master updated - 35ac6236bdf560f8ea3e4c2e268cdb0c9c71e1cd

2008-11-21 Thread Günther Deschner
The branch, master has been updated
   via  35ac6236bdf560f8ea3e4c2e268cdb0c9c71e1cd (commit)
  from  363fe115368639225673d628a2ccc067928f4289 (commit)

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


- Log -
commit 35ac6236bdf560f8ea3e4c2e268cdb0c9c71e1cd
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Nov 6 13:37:03 2008 +0100

s3-libnetjoin: try to show a better error message upon invalid 
configuration.

Guenther

---

Summary of changes:
 source3/libnet/libnet_join.c |   61 ++---
 1 files changed, 50 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 6935e00..bb59a2b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1638,24 +1638,31 @@ WERROR libnet_init_UnjoinCtx(TALLOC_CTX *mem_ctx,
 static WERROR libnet_join_check_config(TALLOC_CTX *mem_ctx,
   struct libnet_JoinCtx *r)
 {
+   bool valid_security = false;
+   bool valid_workgroup = false;
+   bool valid_realm = false;
+
/* check if configuration is already set correctly */
 
+   valid_workgroup = strequal(lp_workgroup(), r-out.netbios_domain_name);
+
switch (r-out.domain_is_ad) {
case false:
-   if ((strequal(lp_workgroup(),
- r-out.netbios_domain_name)) 
-   (lp_security() == SEC_DOMAIN)) {
+   valid_security = (lp_security() == SEC_DOMAIN);
+   if (valid_workgroup  valid_security) {
/* nothing to be done */
return WERR_OK;
}
break;
case true:
-   if ((strequal(lp_workgroup(),
- r-out.netbios_domain_name)) 
-   (strequal(lp_realm(),
- r-out.dns_domain_name)) 
-   ((lp_security() == SEC_ADS) ||
-(lp_security() == SEC_DOMAIN))) {
+   valid_realm = strequal(lp_realm(), 
r-out.dns_domain_name);
+   switch (lp_security()) {
+   case SEC_DOMAIN:
+   case SEC_ADS:
+   valid_security = true;
+   }
+
+   if (valid_workgroup  valid_realm  valid_security) {
/* nothing to be done */
return WERR_OK;
}
@@ -1665,9 +1672,41 @@ static WERROR libnet_join_check_config(TALLOC_CTX 
*mem_ctx,
/* check if we are supposed to manipulate configuration */
 
if (!r-in.modify_config) {
+
+   char *wrong_conf = talloc_strdup(mem_ctx, );
+
+   if (!valid_workgroup) {
+   wrong_conf = talloc_asprintf_append(wrong_conf,
+   \workgroup\ set to '%s', should be '%s',
+   lp_workgroup(), r-out.netbios_domain_name);
+   W_ERROR_HAVE_NO_MEMORY(wrong_conf);
+   }
+
+   if (!valid_realm) {
+   wrong_conf = talloc_asprintf_append(wrong_conf,
+   \realm\ set to '%s', should be '%s',
+   lp_realm(), r-out.dns_domain_name);
+   W_ERROR_HAVE_NO_MEMORY(wrong_conf);
+   }
+
+   if (!valid_security) {
+   const char *sec;
+   switch (lp_security()) {
+   case SEC_SHARE: sec = share; break;
+   case SEC_USER:  sec = user; break;
+   case SEC_DOMAIN: sec = domain; break;
+   case SEC_ADS: sec = ads; break;
+   }
+   wrong_conf = talloc_asprintf_append(wrong_conf,
+   \security\ set to '%s', should be %s,
+   sec, r-out.domain_is_ad ?
+   either 'domain' or 'ads' : 'domain');
+   W_ERROR_HAVE_NO_MEMORY(wrong_conf);
+   }
+
libnet_join_set_error_string(mem_ctx, r,
-   Invalid configuration and configuration modification 
-   was not requested);
+   Invalid configuration (%s) and configuration 
modification 
+   was not requested, wrong_conf);
return WERR_CAN_NOT_COMPLETE;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 98e1dd64ab5a5a0f9298684e09ab4637606b5b7c

2008-11-21 Thread Günther Deschner
The branch, master has been updated
   via  98e1dd64ab5a5a0f9298684e09ab4637606b5b7c (commit)
  from  35ac6236bdf560f8ea3e4c2e268cdb0c9c71e1cd (commit)

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


- Log -
commit 98e1dd64ab5a5a0f9298684e09ab4637606b5b7c
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 15:56:30 2008 +0100

s3-libnetjoin: fix build warning.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index bb59a2b..bd127f8 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1690,7 +1690,7 @@ static WERROR libnet_join_check_config(TALLOC_CTX 
*mem_ctx,
}
 
if (!valid_security) {
-   const char *sec;
+   const char *sec = NULL;
switch (lp_security()) {
case SEC_SHARE: sec = share; break;
case SEC_USER:  sec = user; break;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 9164b14a9fb1fee9ddec275032bb911d34b683d5

2008-11-21 Thread Jelmer Vernooij
The branch, master has been updated
   via  9164b14a9fb1fee9ddec275032bb911d34b683d5 (commit)
  from  98e1dd64ab5a5a0f9298684e09ab4637606b5b7c (commit)

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


- Log -
commit 9164b14a9fb1fee9ddec275032bb911d34b683d5
Author: Jelmer Vernooij [EMAIL PROTECTED]
Date:   Fri Nov 21 17:57:44 2008 +0100

Fix include path for installation.

---

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


Changeset truncated at 500 lines:

diff --git a/source4/torture/smbtorture.h b/source4/torture/smbtorture.h
index 28e82f3..c1363fd 100644
--- a/source4/torture/smbtorture.h
+++ b/source4/torture/smbtorture.h
@@ -21,7 +21,7 @@
 #ifndef __SMBTORTURE_H__
 #define __SMBTORTURE_H__
 
-#include lib/torture/torture.h
+#include ../lib/torture/torture.h
 
 struct smbcli_state;
 


-- 
Samba Shared Repository


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

2008-11-21 Thread Günther Deschner
The branch, v3-3-test has been updated
   via  b63b4028ed8823626a956bb437e275a1b1432483 (commit)
   via  df554493c74ea611bfc5d890a4c2eca6eb3106d1 (commit)
  from  f84fe8b0025850b31560f149ebaa27cf5a504694 (commit)

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


- Log -
commit b63b4028ed8823626a956bb437e275a1b1432483
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Nov 21 17:33:22 2008 +0100

krb5_locator: use wbcLookupDomainControllerEx() for query.

Guenther

commit df554493c74ea611bfc5d890a4c2eca6eb3106d1
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Sat Sep 27 03:09:07 2008 +0200

s3-winbindd: use new, richer structures in WINBINDD_DSGETDCNAME 
implementation.

Guenther

---

Summary of changes:
 source/Makefile.in |6 ++--
 source/nsswitch/winbind_krb5_locator.c |   39 +---
 source/winbindd/winbindd_locator.c |   61 +---
 3 files changed, 61 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 6d8cc81..a25efb5 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -1083,7 +1083,7 @@ LDBDEL_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbdel.o
 LDBMODIFY_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbmodify.o
 
 WINBIND_KRB5_LOCATOR_OBJ1 = nsswitch/winbind_krb5_locator.o
-WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(WBCOMMON_OBJ) 
$(LIBREPLACE_OBJ)
+WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
 
 POPT_OBJ=popt/findme.o popt/popt.o popt/poptconfig.o \
   popt/popthelp.o popt/poptparse.o
@@ -2192,9 +2192,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VLP_OBJ) 
@LIBTALLOC_SHARED@ @LIBTDB_SHARED@
$(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) 
$(LIBTDB_LIBS) \
@[EMAIL PROTECTED] [EMAIL PROTECTED]@NSSSONAMEVERSIONSUFFIX@
 
-bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ)
+bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) 
@LIBWBCLIENT_SHARED@
@echo Linking $@
-   @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) \
+   @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(WINBIND_LIBS) 
\
@[EMAIL PROTECTED] [EMAIL PROTECTED]
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) 
@LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@
diff --git a/source/nsswitch/winbind_krb5_locator.c 
b/source/nsswitch/winbind_krb5_locator.c
index 7eecd13..b9e35bd 100644
--- a/source/nsswitch/winbind_krb5_locator.c
+++ b/source/nsswitch/winbind_krb5_locator.c
@@ -18,6 +18,7 @@
 */
 
 #include nsswitch/winbind_client.h
+#include libwbclient/wbclient.h
 
 #ifndef DEBUG_KRB5
 #undef DEBUG_KRB5
@@ -244,54 +245,50 @@ static void smb_krb5_locator_close(void *private_data)
 
 static bool ask_winbind(const char *realm, char **dcname)
 {
-   NSS_STATUS status;
-   struct winbindd_request request;
-   struct winbindd_response response;
+   wbcErr wbc_status;
const char *dc = NULL;
+   struct wbcDomainControllerInfoEx *dc_info = NULL;
+   uint32_t flags;
 
-   ZERO_STRUCT(request);
-   ZERO_STRUCT(response);
+   flags = WBC_LOOKUP_DC_KDC_REQUIRED |
+   WBC_LOOKUP_DC_IS_DNS_NAME |
+   WBC_LOOKUP_DC_RETURN_DNS_NAME |
+   WBC_LOOKUP_DC_IP_REQUIRED;
 
-   request.data.dsgetdcname.flags = 0x40020600;
-   /* DS_KDC_REQUIRED |
-   DS_IS_DNS_NAME |
-   DS_RETURN_DNS_NAME |
-   DS_IP_REQUIRED */
+   wbc_status = wbcLookupDomainControllerEx(realm, NULL, NULL, flags, 
dc_info);
 
-   strncpy(request.data.dsgetdcname.domain_name, realm,
-   sizeof(request.data.dsgetdcname.domain_name)-1);
-
-   status = winbindd_request_response(WINBINDD_DSGETDCNAME,
-  request, response);
-   if (status != NSS_STATUS_SUCCESS) {
+   if (!WBC_ERROR_IS_OK(wbc_status)) {
 #ifdef DEBUG_KRB5
fprintf(stderr,[%5u]: smb_krb5_locator_lookup: failed with: 
%s\n,
-   (unsigned int)getpid(), nss_err_str(status));
+   (unsigned int)getpid(), wbcErrorString(wbc_status));
 #endif
return false;
}
 
-   if (response.data.dsgetdcname.dc_address[0] != '\0') {
-   dc = response.data.dsgetdcname.dc_address;
+   if (dc_info-dc_address) {
+   dc = dc_info-dc_address;
if (dc[0] == '\\') dc++;
if (dc[0] == '\\') dc++;
}
 
-   if (!dc  response.data.dsgetdcname.dc_unc[0] != '\0') {
-   dc = response.data.dsgetdcname.dc_unc;
+   if (!dc  dc_info-dc_unc) {
+   dc = dc_info-dc_unc;

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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  b2626032626dcccd660c047f91130e81e380ae17 (commit)
  from  b63b4028ed8823626a956bb437e275a1b1432483 (commit)

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


- Log -
commit b2626032626dcccd660c047f91130e81e380ae17
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 10:57:20 2008 -0800

First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the 
file.
Restructures parts of open code so that fsp must be allocated before calling
open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c.
Jeremy.

---

Summary of changes:
 source/include/proto.h |6 +-
 source/printing/printfsp.c |   15 +-
 source/smbd/close.c|8 +--
 source/smbd/fake_file.c|1 -
 source/smbd/files.c|   72 --
 source/smbd/open.c |  118 +--
 source/smbd/reply.c|   11 +++-
 7 files changed, 119 insertions(+), 112 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/proto.h b/source/include/proto.h
index 508c96e..cb2588b 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -6623,7 +6623,7 @@ bool sysv_cache_reload(void);
 /* The following definitions come from printing/printfsp.c  */
 
 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
-   uint16_t current_vuid, files_struct **result);
+   uint16_t current_vuid, files_struct *fsp);
 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
 
 /* The following definitions come from printing/printing.c  */
@@ -9633,11 +9633,11 @@ void file_free(files_struct *fsp);
 files_struct *file_fnum(uint16 fnum);
 files_struct *file_fsp(uint16 fid);
 void file_chain_reset(void);
-NTSTATUS dup_file_fsp(files_struct *fsp,
+void dup_file_fsp(files_struct *from,
uint32 access_mask,
uint32 share_access,
uint32 create_options,
-   files_struct **result);
+   files_struct *to);
 
 /* The following definitions come from smbd/ipc.c  */
 
diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c
index c674922..324af18 100644
--- a/source/printing/printfsp.c
+++ b/source/printing/printfsp.c
@@ -26,19 +26,13 @@ print_job_start().
 ***/
 
 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
-   uint16_t current_vuid, files_struct **result)
+   uint16_t current_vuid, files_struct *fsp)
 {
int jobid;
SMB_STRUCT_STAT sbuf;
-   files_struct *fsp;
fstring name;
NTSTATUS status;
 
-   status = file_new(conn, fsp);
-   if(!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
-
fstrcpy( name, Remote Downlevel Document);
if (fname) {
const char *p = strrchr(fname, '/');
@@ -52,7 +46,6 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
jobid = print_job_start(conn-server_info, SNUM(conn), name, NULL);
if (jobid == -1) {
status = map_nt_error_from_unix(errno);
-   file_free(fsp);
return status;
}
 
@@ -61,7 +54,6 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
if (fsp-rap_print_jobid == 0) {
/* We need to delete the entry in the tdb. */
pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
-   file_free(fsp);
return NT_STATUS_ACCESS_DENIED; /* No errno around here */
}
 
@@ -80,14 +72,11 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
fsp-sent_oplock_break = NO_BREAK_SENT;
fsp-is_directory = False;

string_set(fsp-fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid));
-   fsp-wcp = NULL; 
+   fsp-wcp = NULL;
SMB_VFS_FSTAT(fsp, sbuf);
fsp-mode = sbuf.st_mode;
fsp-file_id = vfs_file_id_from_sbuf(conn, sbuf);
 
-   conn-num_files_open++;
-
-   *result = fsp;
return NT_STATUS_OK;
 }
 
diff --git a/source/smbd/close.c b/source/smbd/close.c
index 818b4c7..32231f4 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -106,8 +106,7 @@ static void check_magic(struct files_struct *fsp)
 static NTSTATUS close_filestruct(files_struct *fsp)
 {
NTSTATUS status = NT_STATUS_OK;
-   connection_struct *conn = fsp-conn;
-
+
if (fsp-fh-fd != -1) {
if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) {
status = map_nt_error_from_unix(errno);
@@ 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  1f36db34d7483614e1a4d6d5f3437205bcb20541 (commit)
  from  cae1717f58c89faaf68502c72124ecd1728d3374 (commit)

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


- Log -
commit 1f36db34d7483614e1a4d6d5f3437205bcb20541
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 10:46:31 2008 -0800

First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the 
file.
Restructures parts of open code so that fsp must be allocated before calling
open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c.
Jeremy.

---

Summary of changes:
 source/printing/printfsp.c |   15 +-
 source/smbd/close.c|8 +--
 source/smbd/fake_file.c|1 -
 source/smbd/files.c|   82 +
 source/smbd/open.c |  121 +--
 source/smbd/reply.c|9 +++-
 6 files changed, 120 insertions(+), 116 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c
index 1fde16b..c665224 100644
--- a/source/printing/printfsp.c
+++ b/source/printing/printfsp.c
@@ -28,19 +28,13 @@ print_job_start().
 ***/
 
 NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
-   files_struct **result)
+   files_struct *fsp)
 {
int jobid;
SMB_STRUCT_STAT sbuf;
-   files_struct *fsp;
fstring name;
NTSTATUS status;
 
-   status = file_new(conn, fsp);
-   if(!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
-
fstrcpy( name, Remote Downlevel Document);
if (fname) {
const char *p = strrchr(fname, '/');
@@ -54,7 +48,6 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
jobid = print_job_start(current_user, SNUM(conn), name, NULL);
if (jobid == -1) {
status = map_nt_error_from_unix(errno);
-   file_free(fsp);
return status;
}
 
@@ -63,7 +56,6 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
if (fsp-rap_print_jobid == 0) {
/* We need to delete the entry in the tdb. */
pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
-   file_free(fsp);
return NT_STATUS_ACCESS_DENIED; /* No errno around here */
}
 
@@ -82,14 +74,11 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char 
*fname,
fsp-sent_oplock_break = NO_BREAK_SENT;
fsp-is_directory = False;

string_set(fsp-fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid));
-   fsp-wcp = NULL; 
+   fsp-wcp = NULL;
SMB_VFS_FSTAT(fsp, sbuf);
fsp-mode = sbuf.st_mode;
fsp-file_id = vfs_file_id_from_sbuf(conn, sbuf);
 
-   conn-num_files_open++;
-
-   *result = fsp;
return NT_STATUS_OK;
 }
 
diff --git a/source/smbd/close.c b/source/smbd/close.c
index 3d3c4cf..8c0fa99 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -106,8 +106,7 @@ static void check_magic(struct files_struct *fsp)
 static NTSTATUS close_filestruct(files_struct *fsp)
 {
NTSTATUS status = NT_STATUS_OK;
-   connection_struct *conn = fsp-conn;
-
+
if (fsp-fh-fd != -1) {
if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) {
status = map_nt_error_from_unix(errno);
@@ -115,9 +114,8 @@ static NTSTATUS close_filestruct(files_struct *fsp)
delete_write_cache(fsp);
}
 
-   conn-num_files_open--;
return status;
-}
+}
 
 /
  If any deferred opens are waiting on this close, notify them.
@@ -582,7 +580,7 @@ static NTSTATUS close_normal_file(files_struct *fsp, enum 
file_close_type close_
 
DEBUG(2,(%s closed file %s (numopen=%d) %s\n,
conn-user,fsp-fsp_name,
-   conn-num_files_open,
+   conn-num_files_open - 1,
nt_errstr(status) ));
 
file_free(fsp);
diff --git a/source/smbd/fake_file.c b/source/smbd/fake_file.c
index 31fe030..0f571ac 100644
--- a/source/smbd/fake_file.c
+++ b/source/smbd/fake_file.c
@@ -141,7 +141,6 @@ NTSTATUS open_fake_file(connection_struct *conn,
return NT_STATUS_NO_MEMORY;
}
 
-   conn-num_files_open++;
*result = fsp;
return NT_STATUS_OK;
 }
diff --git a/source/smbd/files.c b/source/smbd/files.c
index b7ac58d..8ed8eaf 100644
--- a/source/smbd/files.c
+++ b/source/smbd/files.c
@@ -129,6 +129,8 @@ NTSTATUS file_new(connection_struct *conn, files_struct 
**result)
 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  e2f699a5d1a2415ce37c052bf24bbecf0d41bae7 (commit)
  from  1f36db34d7483614e1a4d6d5f3437205bcb20541 (commit)

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


- Log -
commit e2f699a5d1a2415ce37c052bf24bbecf0d41bae7
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 11:06:33 2008 -0800

Ensure we always reply in reply_printopen().
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index f78e8bd..9538a72 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -4599,7 +4599,7 @@ void reply_printopen(struct smb_request *req)
connection_struct *conn = req-conn;
files_struct *fsp;
NTSTATUS status;
-   
+
START_PROFILE(SMBsplopen);
 
if (req-wct  2) {
@@ -4616,6 +4616,7 @@ void reply_printopen(struct smb_request *req)
 
status = file_new(conn, fsp);
if(!NT_STATUS_IS_OK(status)) {
+   reply_nterror(req, status);
END_PROFILE(SMBsplopen);
return;
}
@@ -4632,7 +4633,7 @@ void reply_printopen(struct smb_request *req)
 
reply_outbuf(req, 1, 0);
SSVAL(req-outbuf,smb_vwv0,fsp-fnum);
-  
+
DEBUG(3,(openprint fd=%d fnum=%d\n,
 fsp-fh-fd, fsp-fnum));
 


-- 
Samba Shared Repository


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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  e0744713f2959446c918f817f0c602ba370eed77 (commit)
  from  b2626032626dcccd660c047f91130e81e380ae17 (commit)

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


- Log -
commit e0744713f2959446c918f817f0c602ba370eed77
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 11:09:02 2008 -0800

Ensure we always reply in reply_printopen().
Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index fd31814..1ca2712 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -4642,12 +4642,13 @@ void reply_printopen(struct smb_request *req)
 
status = file_new(conn, fsp);
if(!NT_STATUS_IS_OK(status)) {
+   reply_nterror(req, status);
END_PROFILE(SMBsplopen);
return;
}
 
/* Open for exclusive use, write only. */
-   status = print_fsp_open(conn, NULL, req-vuid, fsp);
+   status = print_fsp_open(conn, NULL, req-vuid, fsp);
 
if (!NT_STATUS_IS_OK(status)) {
file_free(fsp);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012

2008-11-21 Thread Jeremy Allison
The branch, master has been updated
   via  97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012 (commit)
  from  9164b14a9fb1fee9ddec275032bb911d34b683d5 (commit)

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


- Log -
commit 97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 12:14:53 2008 -0800

First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the 
file.
Restructures parts of open code so that fsp must be allocated before calling
open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c.
Jeremy.

---

Summary of changes:
 source3/include/proto.h |6 +-
 source3/printing/printfsp.c |   15 +
 source3/smbd/close.c|8 +--
 source3/smbd/fake_file.c|1 -
 source3/smbd/files.c|   74 ++
 source3/smbd/open.c |  143 --
 source3/smbd/reply.c|9 +++-
 7 files changed, 131 insertions(+), 125 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index dd4b9d1..2cf1a96 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4866,7 +4866,7 @@ bool sysv_cache_reload(void);
 
 NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
const char *fname,
-   uint16_t current_vuid, files_struct **result);
+   uint16_t current_vuid, files_struct *fsp);
 void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
 
 /* The following definitions come from printing/printing.c  */
@@ -7860,9 +7860,9 @@ void file_sync_all(connection_struct *conn);
 void file_free(struct smb_request *req, files_struct *fsp);
 files_struct *file_fnum(uint16 fnum);
 files_struct *file_fsp(struct smb_request *req, uint16 fid);
-NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *fsp,
+void dup_file_fsp(struct smb_request *req, files_struct *from,
  uint32 access_mask, uint32 share_access,
- uint32 create_options, files_struct **result);
+ uint32 create_options, files_struct *to);
 
 /* The following definitions come from smbd/ipc.c  */
 
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index a247cd8..5481d95 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -27,19 +27,13 @@ print_job_start().
 
 NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
const char *fname,
-   uint16_t current_vuid, files_struct **result)
+   uint16_t current_vuid, files_struct *fsp)
 {
int jobid;
SMB_STRUCT_STAT sbuf;
-   files_struct *fsp;
fstring name;
NTSTATUS status;
 
-   status = file_new(req, conn, fsp);
-   if(!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
-
fstrcpy( name, Remote Downlevel Document);
if (fname) {
const char *p = strrchr(fname, '/');
@@ -53,7 +47,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, 
connection_struct *conn,
jobid = print_job_start(conn-server_info, SNUM(conn), name, NULL);
if (jobid == -1) {
status = map_nt_error_from_unix(errno);
-   file_free(req, fsp);
return status;
}
 
@@ -62,7 +55,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, 
connection_struct *conn,
if (fsp-rap_print_jobid == 0) {
/* We need to delete the entry in the tdb. */
pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
-   file_free(req, fsp);
return NT_STATUS_ACCESS_DENIED; /* No errno around here */
}
 
@@ -81,14 +73,11 @@ NTSTATUS print_fsp_open(struct smb_request *req, 
connection_struct *conn,
fsp-sent_oplock_break = NO_BREAK_SENT;
fsp-is_directory = False;

string_set(fsp-fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid));
-   fsp-wcp = NULL; 
+   fsp-wcp = NULL;
SMB_VFS_FSTAT(fsp, sbuf);
fsp-mode = sbuf.st_mode;
fsp-file_id = vfs_file_id_from_sbuf(conn, sbuf);
 
-   conn-num_files_open++;
-
-   *result = fsp;
return NT_STATUS_OK;
 }
 
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index d4c531a..ce918ab 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -106,8 +106,7 @@ static void check_magic(struct files_struct *fsp)
 static NTSTATUS close_filestruct(files_struct *fsp)
 {
NTSTATUS status = NT_STATUS_OK;
-   connection_struct *conn = fsp-conn;
-
+
if (fsp-fh-fd != -1) {
if(flush_write_cache(fsp, CLOSE_FLUSH) == -1) {

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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  d4481329438d27a23ded85f01f5cf06725221d0e (commit)
  from  e2f699a5d1a2415ce37c052bf24bbecf0d41bae7 (commit)

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


- Log -
commit d4481329438d27a23ded85f01f5cf06725221d0e
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 12:32:11 2008 -0800

Second part of the fix for bug #5903 - vfs_streams_xattr breaks contents of 
the file
Jeremy.

---

Summary of changes:
 source/configure.in|2 +-
 source/modules/vfs_streams_xattr.c |   61 +++-
 source/smbd/open.c |   59 ++
 3 files changed, 106 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 64a4681..733c31e 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -404,7 +404,7 @@ dnl These have to be built static:
 default_static_modules=pdb_smbpasswd pdb_tdbsam rpc_lsarpc rpc_samr 
rpc_winreg rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl2 rpc_ntsvcs2 
rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog2 auth_sam auth_unix 
auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template
 
 dnl These are preferably build shared, and static if dlopen() is not available
-default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit 
vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap 
vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 
auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr 
vfs_smb_traffic_analyzer
+default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit 
vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap 
vfs_expand_msdfs vfs_shadow_copy vfs_shadow_copy2 charset_CP850 charset_CP437 
auth_script vfs_readahead vfs_xattr_tdb vfs_streams_xattr vfs_streams_depot 
vfs_smb_traffic_analyzer
 
 if test x$developer = xyes; then
default_static_modules=$default_static_modules rpc_rpcecho
diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index b74c4f7..9df88e5 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -624,7 +624,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
struct ea_struct ea;
NTSTATUS status;
-size_t length, overlap;
+   size_t length, overlap;
 
if (sio == NULL) {
return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
@@ -651,6 +651,63 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
 return overlap;
 }
 
+static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
+   struct files_struct *fsp,
+   SMB_OFF_T offset)
+{
+   int ret;
+   uint8 *tmp;
+   struct ea_struct ea;
+   NTSTATUS status;
+struct stream_io *sio =
+   (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
+
+   DEBUG(10, (streams_xattr_ftruncate called for file %s offset %.0f\n,
+   fsp-fsp_name,
+   (double)offset ));
+
+   if (sio == NULL) {
+   return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
+   }
+
+   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
+ sio-base, sio-xattr_name, ea);
+   if (!NT_STATUS_IS_OK(status)) {
+   return -1;
+   }
+
+   tmp = TALLOC_REALLOC_ARRAY(talloc_tos(), ea.value.data, uint8,
+  offset + 1);
+
+   if (tmp == NULL) {
+   TALLOC_FREE(ea.value.data);
+   errno = ENOMEM;
+   return -1;
+   }
+
+   /* Did we expand ? */
+   if (ea.value.length  offset + 1) {
+   memset(tmp[ea.value.length], '\0',
+   offset + 1 - ea.value.length);
+   }
+
+   ea.value.data = tmp;
+   ea.value.length = offset + 1;
+   ea.value.data[offset] = 0;
+
+   ret = SMB_VFS_SETXATTR(fsp-conn, fsp-base_fsp-fsp_name,
+   sio-xattr_name,
+   ea.value.data, ea.value.length, 0);
+
+   TALLOC_FREE(ea.value.data);
+
+   if (ret == -1) {
+   return -1;
+   }
+
+   return 0;
+}
+
 /* VFS operations structure */
 
 static vfs_op_tuple streams_xattr_ops[] = {
@@ -672,6 +729,8 @@ static vfs_op_tuple streams_xattr_ops[] = {
 SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(streams_xattr_unlink), SMB_VFS_OP_UNLINK,
 SMB_VFS_LAYER_TRANSPARENT},
+{SMB_VFS_OP(streams_xattr_ftruncate),  SMB_VFS_OP_FTRUNCATE,
+

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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  019dcf49572404b1cb3c12aca4e7eaa052aeeedd (commit)
  from  e0744713f2959446c918f817f0c602ba370eed77 (commit)

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


- Log -
commit 019dcf49572404b1cb3c12aca4e7eaa052aeeedd
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 12:53:53 2008 -0800

Second part of the fix for bug #5903 - vfs_streams_xattr breaks contents of 
the file
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   61 +++-
 source/smbd/open.c |   59 ++
 2 files changed, 105 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index b74c4f7..9df88e5 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -624,7 +624,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
struct ea_struct ea;
NTSTATUS status;
-size_t length, overlap;
+   size_t length, overlap;
 
if (sio == NULL) {
return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
@@ -651,6 +651,63 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
 return overlap;
 }
 
+static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
+   struct files_struct *fsp,
+   SMB_OFF_T offset)
+{
+   int ret;
+   uint8 *tmp;
+   struct ea_struct ea;
+   NTSTATUS status;
+struct stream_io *sio =
+   (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
+
+   DEBUG(10, (streams_xattr_ftruncate called for file %s offset %.0f\n,
+   fsp-fsp_name,
+   (double)offset ));
+
+   if (sio == NULL) {
+   return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
+   }
+
+   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
+ sio-base, sio-xattr_name, ea);
+   if (!NT_STATUS_IS_OK(status)) {
+   return -1;
+   }
+
+   tmp = TALLOC_REALLOC_ARRAY(talloc_tos(), ea.value.data, uint8,
+  offset + 1);
+
+   if (tmp == NULL) {
+   TALLOC_FREE(ea.value.data);
+   errno = ENOMEM;
+   return -1;
+   }
+
+   /* Did we expand ? */
+   if (ea.value.length  offset + 1) {
+   memset(tmp[ea.value.length], '\0',
+   offset + 1 - ea.value.length);
+   }
+
+   ea.value.data = tmp;
+   ea.value.length = offset + 1;
+   ea.value.data[offset] = 0;
+
+   ret = SMB_VFS_SETXATTR(fsp-conn, fsp-base_fsp-fsp_name,
+   sio-xattr_name,
+   ea.value.data, ea.value.length, 0);
+
+   TALLOC_FREE(ea.value.data);
+
+   if (ret == -1) {
+   return -1;
+   }
+
+   return 0;
+}
+
 /* VFS operations structure */
 
 static vfs_op_tuple streams_xattr_ops[] = {
@@ -672,6 +729,8 @@ static vfs_op_tuple streams_xattr_ops[] = {
 SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(streams_xattr_unlink), SMB_VFS_OP_UNLINK,
 SMB_VFS_LAYER_TRANSPARENT},
+{SMB_VFS_OP(streams_xattr_ftruncate),  SMB_VFS_OP_FTRUNCATE,
+ SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(streams_xattr_streaminfo), SMB_VFS_OP_STREAMINFO,
 SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 678ace2..83e14f5 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -2875,10 +2875,42 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
 * Ordinary file case.
 */
 
-   status = open_file_ntcreate(
-   conn, req, fname, sbuf, access_mask, share_access,
-   create_disposition, create_options, file_attributes,
-   oplock_request, info, fsp);
+   if (base_fsp) {
+   /*
+* We're opening the stream element of a base_fsp
+* we already opened. We need to initialize
+* the fsp first, and set up the base_fsp pointer.
+*/
+   status = file_new(conn, fsp);
+   if(!NT_STATUS_IS_OK(status)) {
+   goto fail;
+   }
+
+   fsp-base_fsp = base_fsp;
+
+   status = open_file_ntcreate_internal(conn,
+

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

2008-11-21 Thread Michael Adam
The branch, master has been updated
   via  dd54e680143675698330f49b9aed7188f37bec65 (commit)
   via  e179c41718d4d92a825dbcaea0120a0bd3befc43 (commit)
   via  fa60e4e97d7e1f208b6a8e8a363ec3c96e40b2d8 (commit)
  from  97fb05c2c0d0b08f3ed5aa7358a4d6d8c1725012 (commit)

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


- Log -
commit dd54e680143675698330f49b9aed7188f37bec65
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Nov 21 23:17:05 2008 +0100

s3-winbindd: make all winbind rpc-methods static.

Now that the methods are no longer needed in winbindd_ads,
we can make them static again.

Michael

commit e179c41718d4d92a825dbcaea0120a0bd3befc43
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Nov 21 02:26:50 2008 +0100

s3-winbindd_ads: use the reconnect methods instead of the rpc methods 
directly

Some of the ads methods just point to the rpc methods.
This makes winbindd_ads use the reconnect methods instead of
calling the rpc methods directly in order to prevent
negative cache entries for e.g. name_to_sid, when the dc
has closed the connection without sending a reset.

Michael

commit fa60e4e97d7e1f208b6a8e8a363ec3c96e40b2d8
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Nov 20 16:57:44 2008 +0100

s3-winbindd_ads: prevent negative GM/ cache entries due to broken 
connections

The ads lookup_groupmem() function calls lda_lookupsids to resolve sids
to names. This is tried only once. So in case the connection was broken,
e.g. closed by the server (without a reset packet), there will be an empty
GM/ cache entry for the requested group which will prevent proper working
of access checks among other checks for the expiry period.

This patch works around this problem by retrying once if the lsa_lookupsids
call fails, re-establishing the dc-connection, as we already do in many 
other
places (e.g. the winbindd retry methods for the rpc layer).

Michael

---

Summary of changes:
 source3/winbindd/winbindd_ads.c   |  104 ++--
 source3/winbindd/winbindd_proto.h |   34 
 source3/winbindd/winbindd_rpc.c   |   63 +++---
 3 files changed, 130 insertions(+), 71 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 18cc1cb..5c7d491 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -401,6 +401,47 @@ static NTSTATUS enum_local_groups(struct winbindd_domain 
*domain,
return NT_STATUS_OK;
 }
 
+/* convert a single name to a sid in a domain - use rpc methods */
+static NTSTATUS name_to_sid(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   enum winbindd_cmd orig_cmd,
+   const char *domain_name,
+   const char *name,
+   DOM_SID *sid,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.name_to_sid(domain, mem_ctx, orig_cmd,
+domain_name, name,
+sid, type);
+}
+
+/* convert a domain SID to a user or group name - use rpc methods */
+static NTSTATUS sid_to_name(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   const DOM_SID *sid,
+   char **domain_name,
+   char **name,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.sid_to_name(domain, mem_ctx, sid,
+domain_name, name, type);
+}
+
+/* convert a list of rids to names - use rpc methods */
+static NTSTATUS rids_to_names(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ const DOM_SID *sid,
+ uint32 *rids,
+ size_t num_rids,
+ char **domain_name,
+ char ***names,
+ enum lsa_SidType **types)
+{
+   return reconnect_methods.rids_to_names(domain, mem_ctx, sid,
+  rids, num_rids,
+  domain_name, names, types);
+}
+
 /* If you are looking for dn_lookup: Yes, it used to be here!
  * It has gone now since it was a major speed bottleneck in
  * lookup_groupmem (its only use). It has been replaced by
@@ -903,6 +944,18 @@ done:
return status;
 }
 
+/* Lookup aliases a user is member of - use rpc methods */
+static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
+  

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

2008-11-21 Thread Michael Adam
The branch, v3-2-test has been updated
   via  fc82807659cf4ab23df8ae7b98edfc715b54f591 (commit)
   via  afd1cba6c18cb56ec13659cec7c86b32de2fda39 (commit)
   via  9d5af844c53ff2b25904c96d28546271a249debb (commit)
  from  d4481329438d27a23ded85f01f5cf06725221d0e (commit)

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


- Log -
commit fc82807659cf4ab23df8ae7b98edfc715b54f591
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Nov 21 23:28:08 2008 +0100

winbindd: make all winbind rpc-methods static.

Now that the methods are no longer needed in winbindd_ads,
we can make them static again.

Michael

commit afd1cba6c18cb56ec13659cec7c86b32de2fda39
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Nov 21 02:24:06 2008 +0100

winbindd_ads: use the reconnect methods instead of the rpc methods directly

Some of the ads methods just point to the rpc methods.
This makes winbindd_ads use the reconnect methods instead of
calling the rpc methods directly in order to prevent
negative cache entries for e.g. name_to_sid, when the dc
has closed the connection without sending a reset.

Michael

commit 9d5af844c53ff2b25904c96d28546271a249debb
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Nov 20 23:26:35 2008 +0100

winbindd_ads: prevent negative GM/ cache entries due to broken connections

The ads lookup_groupmem() function calls lda_lookupsids to resolve sids
to names. This is tried only once. So in case the connection was broken,
e.g. closed by the server (without a reset packet), there will be an empty
GM/ cache entry for the requested group which will prevent proper working
of access checks among other checks for the expiry period.

This patch works around this problem by retrying once if the lsa_lookupsids
call fails, re-establishing the dc-connection, as we already do in many 
other
places (e.g. the winbindd retry methods for the rpc layer).

Michael

---

Summary of changes:
 source/winbindd/winbindd_ads.c |  104 +--
 source/winbindd/winbindd_rpc.c |   63 
 2 files changed, 130 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index bc8902d..5b29f63 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -401,6 +401,47 @@ static NTSTATUS enum_local_groups(struct winbindd_domain 
*domain,
return NT_STATUS_OK;
 }
 
+/* convert a single name to a sid in a domain - use rpc methods */
+static NTSTATUS name_to_sid(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   enum winbindd_cmd orig_cmd,
+   const char *domain_name,
+   const char *name,
+   DOM_SID *sid,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.name_to_sid(domain, mem_ctx, orig_cmd,
+domain_name, name,
+sid, type);
+}
+
+/* convert a domain SID to a user or group name - use rpc methods */
+static NTSTATUS sid_to_name(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   const DOM_SID *sid,
+   char **domain_name,
+   char **name,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.sid_to_name(domain, mem_ctx, sid,
+domain_name, name, type);
+}
+
+/* convert a list of rids to names - use rpc methods */
+static NTSTATUS rids_to_names(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ const DOM_SID *sid,
+ uint32 *rids,
+ size_t num_rids,
+ char **domain_name,
+ char ***names,
+ enum lsa_SidType **types)
+{
+   return reconnect_methods.rids_to_names(domain, mem_ctx, sid,
+  rids, num_rids,
+  domain_name, names, types);
+}
+
 /* If you are looking for dn_lookup: Yes, it used to be here!
  * It has gone now since it was a major speed bottleneck in
  * lookup_groupmem (its only use). It has been replaced by
@@ -903,6 +944,18 @@ done:
return status;
 }
 
+/* Lookup aliases a user is member of - use rpc methods */
+static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
+  TALLOC_CTX *mem_ctx,
+  uint32 

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

2008-11-21 Thread Michael Adam
The branch, v3-3-test has been updated
   via  7204116c9edcd98ea20cbc5f29e5f25737f78a41 (commit)
   via  3c286b1e7a1dbf68f57eca9d60e1c1bd49a4091c (commit)
   via  39e04a65056d3c82ede8c283918e4dc505875b63 (commit)
   via  a2667f18957233bee80dd5214e20f3f031f0a354 (commit)
   via  54890450e23da8642e3b4c8224e04a7af5d98d15 (commit)
   via  83cb69c6ad02e607f0ca90848f72ae2f1c3a67c7 (commit)
   via  cb5b2410d4ae16aa9afa022c3b60cfb8d46d25e9 (commit)
  from  019dcf49572404b1cb3c12aca4e7eaa052aeeedd (commit)

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


- Log -
commit 7204116c9edcd98ea20cbc5f29e5f25737f78a41
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 02:07:43 2008 +0200

winbindd_group: don't list the domain twice when expanding internal aliases

Before this, getent group builtin\\administrators expanded
domain group members in the form DOMAIN\domain\user.

Michael

commit 3c286b1e7a1dbf68f57eca9d60e1c1bd49a4091c
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 02:06:44 2008 +0200

winbindd_group: sanely handle NULL domain in add_member().

Michael

commit 39e04a65056d3c82ede8c283918e4dc505875b63
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:39:37 2008 +0200

winbindd_ads: honour winbind use default domain in lookup_groupmem().

This fixes the output of getent group when winbind use default domain = 
yes
with security = ads.

Michael

commit a2667f18957233bee80dd5214e20f3f031f0a354
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 01:20:32 2008 +0200

winbindd_rpc: add domain prefix to username in lookup_groupmem().

This makes the output of getent group of a domain group show the
domain prefix with security = domain.

Michael

commit 54890450e23da8642e3b4c8224e04a7af5d98d15
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:37:11 2008 +0200

winbindd_util: add fill_domain_username_talloc().

A talloc version of fill_domain_username().

Michael

commit 83cb69c6ad02e607f0ca90848f72ae2f1c3a67c7
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:36:32 2008 +0200

winbindd_util: add prototype for fill_domain_username_talloc().

A talloc version of fill_domain_username().

Michael

commit cb5b2410d4ae16aa9afa022c3b60cfb8d46d25e9
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 14:51:51 2008 +0200

winbindd: fix a comment typo

Michael

---

Summary of changes:
 source/winbindd/winbindd_ads.c   |   20 +++-
 source/winbindd/winbindd_async.c |2 +-
 source/winbindd/winbindd_group.c |8 ++--
 source/winbindd/winbindd_proto.h |4 
 source/winbindd/winbindd_rpc.c   |5 -
 source/winbindd/winbindd_util.c  |   27 +++
 6 files changed, 53 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 5f59ef3..18cc1cb 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -1044,10 +1044,11 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain 
*domain,
DEBUG(10,(ads: lookup_groupmem: got sid %s from 
  cache\n, sid_string_dbg(sid)));
sid_copy((*sid_mem)[*num_names], sid);
-   (*names)[*num_names] = talloc_asprintf(*names, %s%c%s,
-  domain_name,
-  
*lp_winbind_separator(),
-  name );
+   (*names)[*num_names] = fill_domain_username_talloc(
+   *names,
+   domain_name,
+   name,
+   true);
 
(*name_types)[*num_names] = name_type;
(*num_names)++;
@@ -1092,11 +1093,12 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain 
*domain,
{
sid_copy((*sid_mem)[*num_names],
 sid_mem_nocache[i]);
-   (*names)[*num_names] = talloc_asprintf( 
*names, 
-   
%s%c%s,
-   
domains_nocache[i],
-   
*lp_winbind_separator(),
-   

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

2008-11-21 Thread Michael Adam
The branch, v3-3-test has been updated
   via  cfc77901cace0f6ce241a5873148092e4edac4de (commit)
   via  b89d75a093ef87bc7cccb8914d246c8e932f0352 (commit)
   via  c833b19b0c3e746b53e6731988cd8bb6aca927f5 (commit)
  from  7204116c9edcd98ea20cbc5f29e5f25737f78a41 (commit)

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


- Log -
commit cfc77901cace0f6ce241a5873148092e4edac4de
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sat Nov 22 00:02:40 2008 +0100

winbindd: make all winbind rpc-methods static.

Now that the methods are no longer needed in winbindd_ads,
we can make them static again.

Michael

commit b89d75a093ef87bc7cccb8914d246c8e932f0352
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Nov 21 02:26:50 2008 +0100

s3-winbindd_ads: use the reconnect methods instead of the rpc methods 
directly

Some of the ads methods just point to the rpc methods.
This makes winbindd_ads use the reconnect methods instead of
calling the rpc methods directly in order to prevent
negative cache entries for e.g. name_to_sid, when the dc
has closed the connection without sending a reset.

Michael

commit c833b19b0c3e746b53e6731988cd8bb6aca927f5
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Nov 20 16:57:44 2008 +0100

winbindd_ads: prevent negative GM/ cache entries due to broken connections

The ads lookup_groupmem() function calls lda_lookupsids to resolve sids
to names. This is tried only once. So in case the connection was broken,
e.g. closed by the server (without a reset packet), there will be an empty
GM/ cache entry for the requested group which will prevent proper working
of access checks among other checks for the expiry period.

This patch works around this problem by retrying once if the lsa_lookupsids
call fails, re-establishing the dc-connection, as we already do in many 
other
places (e.g. the winbindd retry methods for the rpc layer).

Michael

---

Summary of changes:
 source/winbindd/winbindd_ads.c   |  104 +++--
 source/winbindd/winbindd_proto.h |   34 
 source/winbindd/winbindd_rpc.c   |   63 ---
 3 files changed, 130 insertions(+), 71 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 18cc1cb..5c7d491 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -401,6 +401,47 @@ static NTSTATUS enum_local_groups(struct winbindd_domain 
*domain,
return NT_STATUS_OK;
 }
 
+/* convert a single name to a sid in a domain - use rpc methods */
+static NTSTATUS name_to_sid(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   enum winbindd_cmd orig_cmd,
+   const char *domain_name,
+   const char *name,
+   DOM_SID *sid,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.name_to_sid(domain, mem_ctx, orig_cmd,
+domain_name, name,
+sid, type);
+}
+
+/* convert a domain SID to a user or group name - use rpc methods */
+static NTSTATUS sid_to_name(struct winbindd_domain *domain,
+   TALLOC_CTX *mem_ctx,
+   const DOM_SID *sid,
+   char **domain_name,
+   char **name,
+   enum lsa_SidType *type)
+{
+   return reconnect_methods.sid_to_name(domain, mem_ctx, sid,
+domain_name, name, type);
+}
+
+/* convert a list of rids to names - use rpc methods */
+static NTSTATUS rids_to_names(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ const DOM_SID *sid,
+ uint32 *rids,
+ size_t num_rids,
+ char **domain_name,
+ char ***names,
+ enum lsa_SidType **types)
+{
+   return reconnect_methods.rids_to_names(domain, mem_ctx, sid,
+  rids, num_rids,
+  domain_name, names, types);
+}
+
 /* If you are looking for dn_lookup: Yes, it used to be here!
  * It has gone now since it was a major speed bottleneck in
  * lookup_groupmem (its only use). It has been replaced by
@@ -903,6 +944,18 @@ done:
return status;
 }
 
+/* Lookup aliases a user is member of - use rpc methods */
+static NTSTATUS lookup_useraliases(struct winbindd_domain *domain,
+  

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

2008-11-21 Thread Michael Adam
The branch, v3-2-test has been updated
   via  a0e36cdd05cc9f5354dd9e834077919b8ce64262 (commit)
   via  0943858d0297291a73c040a1412b1708b340dac7 (commit)
   via  e720a1533ba8063478a68ca94b39364a77529f41 (commit)
   via  5eacc680d2615a1d8a2b4d51a6d08fa7e09e080e (commit)
   via  3ad23ec3bd98aa55fa29c5c1cac60116b5fc00d2 (commit)
   via  d3e3c2c50ee404de25b46a06bd71f90a7214e69c (commit)
   via  38020bdeb9115fe41038723a2ffaedb75df8e564 (commit)
  from  fc82807659cf4ab23df8ae7b98edfc715b54f591 (commit)

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


- Log -
commit a0e36cdd05cc9f5354dd9e834077919b8ce64262
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 02:07:43 2008 +0200

winbindd_group: don't list the domain twice when expanding internal aliases

Before this, getent group builtin\\administrators expanded
domain group members in the form DOMAIN\domain\user.

Michael

commit 0943858d0297291a73c040a1412b1708b340dac7
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 02:06:44 2008 +0200

winbindd_group: sanely handle NULL domain in add_member().

Michael

commit e720a1533ba8063478a68ca94b39364a77529f41
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:39:37 2008 +0200

winbindd_ads: honour winbind use default domain in lookup_groupmem().

This fixes the output of getent group when winbind use default domain = 
yes
with security = ads.

Michael

commit 5eacc680d2615a1d8a2b4d51a6d08fa7e09e080e
Author: Michael Adam [EMAIL PROTECTED]
Date:   Sun Sep 21 01:20:32 2008 +0200

winbindd_rpc: add domain prefix to username in lookup_groupmem().

This makes the output of getent group of a domain group show the
domain prefix with security = domain.

Michael

commit 3ad23ec3bd98aa55fa29c5c1cac60116b5fc00d2
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:37:11 2008 +0200

winbindd_util: add fill_domain_username_talloc().

A talloc version of fill_domain_username().

Michael

commit d3e3c2c50ee404de25b46a06bd71f90a7214e69c
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 14:51:51 2008 +0200

winbindd: fix a comment typo

Michael

commit 38020bdeb9115fe41038723a2ffaedb75df8e564
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 22 10:34:57 2008 +0200

winbind_util: fix an implicit cast compile warning.

Michael

---

Summary of changes:
 source/winbindd/winbindd_ads.c   |   20 +++-
 source/winbindd/winbindd_async.c |2 +-
 source/winbindd/winbindd_group.c |8 ++--
 source/winbindd/winbindd_rpc.c   |5 -
 source/winbindd/winbindd_util.c  |   29 -
 5 files changed, 50 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 5b29f63..c130158 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -1097,10 +1097,11 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain 
*domain,
DEBUG(10,(ads: lookup_groupmem: got sid %s from 
  cache\n, sid_string_dbg(sid)));
sid_copy((*sid_mem)[*num_names], sid);
-   (*names)[*num_names] = talloc_asprintf(*names, %s%c%s,
-  domain_name,
-  
*lp_winbind_separator(),
-  name );
+   (*names)[*num_names] = fill_domain_username_talloc(
+   *names,
+   domain_name,
+   name,
+   true);
 
(*name_types)[*num_names] = name_type;
(*num_names)++;
@@ -1168,11 +1169,12 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain 
*domain,
{
sid_copy((*sid_mem)[*num_names],
 sid_mem_nocache[i]);
-   (*names)[*num_names] = talloc_asprintf( 
*names, 
-   
%s%c%s,
-   
domains_nocache[i],
-   
*lp_winbind_separator(),
-   
names_nocache[i] );
+   

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

2008-11-21 Thread Jeremy Allison
The branch, master has been updated
   via  8d674e351ada654ab79d635851ac73cef71d4753 (commit)
  from  dd54e680143675698330f49b9aed7188f37bec65 (commit)

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


- Log -
commit 8d674e351ada654ab79d635851ac73cef71d4753
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 15:42:03 2008 -0800

Second part of the fix for bug #5903 - vfs_streams_xattr breaks contents of 
the file
(also fix a bad merge of the previous patch from 3.3).
Jeremy.

---

Summary of changes:
 source3/modules/vfs_streams_xattr.c |   61 ++-
 source3/smbd/open.c |   61 ++
 2 files changed, 106 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index b74c4f7..9df88e5 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -624,7 +624,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
struct ea_struct ea;
NTSTATUS status;
-size_t length, overlap;
+   size_t length, overlap;
 
if (sio == NULL) {
return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
@@ -651,6 +651,63 @@ static ssize_t streams_xattr_pread(vfs_handle_struct 
*handle,
 return overlap;
 }
 
+static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
+   struct files_struct *fsp,
+   SMB_OFF_T offset)
+{
+   int ret;
+   uint8 *tmp;
+   struct ea_struct ea;
+   NTSTATUS status;
+struct stream_io *sio =
+   (struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
+
+   DEBUG(10, (streams_xattr_ftruncate called for file %s offset %.0f\n,
+   fsp-fsp_name,
+   (double)offset ));
+
+   if (sio == NULL) {
+   return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
+   }
+
+   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
+ sio-base, sio-xattr_name, ea);
+   if (!NT_STATUS_IS_OK(status)) {
+   return -1;
+   }
+
+   tmp = TALLOC_REALLOC_ARRAY(talloc_tos(), ea.value.data, uint8,
+  offset + 1);
+
+   if (tmp == NULL) {
+   TALLOC_FREE(ea.value.data);
+   errno = ENOMEM;
+   return -1;
+   }
+
+   /* Did we expand ? */
+   if (ea.value.length  offset + 1) {
+   memset(tmp[ea.value.length], '\0',
+   offset + 1 - ea.value.length);
+   }
+
+   ea.value.data = tmp;
+   ea.value.length = offset + 1;
+   ea.value.data[offset] = 0;
+
+   ret = SMB_VFS_SETXATTR(fsp-conn, fsp-base_fsp-fsp_name,
+   sio-xattr_name,
+   ea.value.data, ea.value.length, 0);
+
+   TALLOC_FREE(ea.value.data);
+
+   if (ret == -1) {
+   return -1;
+   }
+
+   return 0;
+}
+
 /* VFS operations structure */
 
 static vfs_op_tuple streams_xattr_ops[] = {
@@ -672,6 +729,8 @@ static vfs_op_tuple streams_xattr_ops[] = {
 SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(streams_xattr_unlink), SMB_VFS_OP_UNLINK,
 SMB_VFS_LAYER_TRANSPARENT},
+{SMB_VFS_OP(streams_xattr_ftruncate),  SMB_VFS_OP_FTRUNCATE,
+ SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(streams_xattr_streaminfo), SMB_VFS_OP_STREAMINFO,
 SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index aca6491..a6867e0 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1651,7 +1651,7 @@ static NTSTATUS 
open_file_ntcreate_internal(connection_struct *conn,
share_access,
create_options);
 
-   if (!NT_STATUS_IS_OK(status)) {
+   if (NT_STATUS_IS_OK(status)) {
TALLOC_FREE(lck);
if (pinfo) {
*pinfo = FILE_WAS_OPENED;
@@ -2878,10 +2878,42 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
 * Ordinary file case.
 */
 
-   status = open_file_ntcreate(
-   conn, req, fname, sbuf, access_mask, share_access,
-   create_disposition, create_options, file_attributes,
-   oplock_request, info, fsp);
+   if 

Build status as of Sat Nov 22 00:00:01 2008

2008-11-21 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2008-11-21 
00:00:39.0 +
+++ /home/build/master/cache/broken_results.txt 2008-11-22 00:00:17.0 
+
@@ -1,12 +1,12 @@
-Build status as of Fri Nov 21 00:00:01 2008
+Build status as of Sat Nov 22 00:00:01 2008
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   33 8  0 
+ccache   32 7  0 
 ctdb 0  0  0 
 distcc   1  0  0 
-ldb  33 32 0 
+ldb  32 32 0 
 libreplace   31 13 0 
 lorikeet-heimdal 29 20 0 
 pidl 19 2  0 
@@ -14,10 +14,10 @@
 rsync32 13 0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 29 21 0 
-samba_3_X_test 28 16 0 
-samba_4_0_test 31 27 1 
-smb-build31 7  0 
-talloc   33 32 0 
-tdb  33 12 0 
+samba_3_X_devel 28 25 1 
+samba_3_X_test 28 17 0 
+samba_4_0_test 31 28 1 
+smb-build30 7  0 
+talloc   32 32 0 
+tdb  32 12 0 
 


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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  89d6bd5bc5398fbec6fbfb797ea6f10ad036c205 (commit)
  from  a0e36cdd05cc9f5354dd9e834077919b8ce64262 (commit)

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


- Log -
commit 89d6bd5bc5398fbec6fbfb797ea6f10ad036c205
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 16:04:31 2008 -0800

Use fxattr calls whenever possible (trying to work around the strange Linux 
kernel oplock bug).
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   70 ++--
 1 files changed, 51 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 9df88e5..2ea5336 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -64,14 +64,16 @@ static SMB_INO_T stream_inode(const SMB_STRUCT_STAT *sbuf, 
const char *sname)
return result;
 }
 
-static ssize_t get_xattr_size(connection_struct *conn, const char *fname,
- const char *xattr_name)
+static ssize_t get_xattr_size(connection_struct *conn,
+   files_struct *fsp,
+   const char *fname,
+   const char *xattr_name)
 {
NTSTATUS status;
struct ea_struct ea;
ssize_t result;
 
-   status = get_ea_value(talloc_tos(), conn, NULL, fname,
+   status = get_ea_value(talloc_tos(), conn, fsp, fname,
  xattr_name, ea);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -100,7 +102,8 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, io-base, io-xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
+   io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
}
@@ -144,7 +147,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -191,7 +194,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -300,22 +303,40 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-if (SMB_VFS_SETXATTR(
-   handle-conn, base, xattr_name,
-   null, sizeof(null),
-   flags  O_EXCL ? XATTR_CREATE : 0) == -1) {
-   goto fail;
+   if (fsp-base_fsp-fh-fd != -1) {
+   if (SMB_VFS_FSETXATTR(
+   fsp-base_fsp, xattr_name,
+   null, sizeof(null),
+   flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
+   goto fail;
+   }
+   } else {
+   if (SMB_VFS_SETXATTR(
+   handle-conn, base, xattr_name,
+   null, sizeof(null),
+   flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
+   goto fail;
+   }
}
}
}
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (SMB_VFS_SETXATTR(
-   handle-conn, base, xattr_name,
-   null, sizeof(null),
-   flags  O_EXCL ? XATTR_CREATE : 0) == -1) {
-   goto fail;
+   if (fsp-base_fsp-fh-fd != -1) {
+   if (SMB_VFS_FSETXATTR(
+   fsp-base_fsp, xattr_name,
+   null, sizeof(null),
+   flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
+   goto fail;
+   }
+   } 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  a3c5ac0de490b6e34caaf840542553586489b30c (commit)
   via  e8eabd9275389799f7ec9fcf62ff864aeea6312c (commit)
  from  cfc77901cace0f6ce241a5873148092e4edac4de (commit)

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


- Log -
commit a3c5ac0de490b6e34caaf840542553586489b30c
Merge: e8eabd9275389799f7ec9fcf62ff864aeea6312c 
cfc77901cace0f6ce241a5873148092e4edac4de
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 16:04:12 2008 -0800

Merge branch 'v3-3-test' of ssh://[EMAIL PROTECTED]/data/git/samba into 
v3-3-test

commit e8eabd9275389799f7ec9fcf62ff864aeea6312c
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 16:03:35 2008 -0800

Use fxattr calls whenever possible (trying to work around the strange Linux 
kernel oplock bug).
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   70 ++--
 1 files changed, 51 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 9df88e5..2ea5336 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -64,14 +64,16 @@ static SMB_INO_T stream_inode(const SMB_STRUCT_STAT *sbuf, 
const char *sname)
return result;
 }
 
-static ssize_t get_xattr_size(connection_struct *conn, const char *fname,
- const char *xattr_name)
+static ssize_t get_xattr_size(connection_struct *conn,
+   files_struct *fsp,
+   const char *fname,
+   const char *xattr_name)
 {
NTSTATUS status;
struct ea_struct ea;
ssize_t result;
 
-   status = get_ea_value(talloc_tos(), conn, NULL, fname,
+   status = get_ea_value(talloc_tos(), conn, fsp, fname,
  xattr_name, ea);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -100,7 +102,8 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, io-base, io-xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
+   io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
}
@@ -144,7 +147,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -191,7 +194,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -300,22 +303,40 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-if (SMB_VFS_SETXATTR(
-   handle-conn, base, xattr_name,
-   null, sizeof(null),
-   flags  O_EXCL ? XATTR_CREATE : 0) == -1) {
-   goto fail;
+   if (fsp-base_fsp-fh-fd != -1) {
+   if (SMB_VFS_FSETXATTR(
+   fsp-base_fsp, xattr_name,
+   null, sizeof(null),
+   flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
+   goto fail;
+   }
+   } else {
+   if (SMB_VFS_SETXATTR(
+   handle-conn, base, xattr_name,
+   null, sizeof(null),
+   flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
+   goto fail;
+   }
}
}
}
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (SMB_VFS_SETXATTR(
-   handle-conn, base, xattr_name,
-   null, sizeof(null),
-   flags  O_EXCL ? XATTR_CREATE : 0) == -1) {
-   goto fail;
+   if 

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

2008-11-21 Thread Tim Prouty
The branch, master has been updated
   via  c23a6dc3ec4f9a5ea5ab4f8cb9cd62aa6cacc3a4 (commit)
  from  8d674e351ada654ab79d635851ac73cef71d4753 (commit)

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


- Log -
commit c23a6dc3ec4f9a5ea5ab4f8cb9cd62aa6cacc3a4
Author: Dan Sledz [EMAIL PROTECTED]
Date:   Fri Nov 14 18:41:17 2008 -0800

FreeBSD configure check for backtrace_symbols

On FreeBSD backtrace_symbols is defined in libexecinfo.so.1.  Look for it
there as well.

---

Summary of changes:
 source3/configure.in |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 1adb56a..287189f 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1033,6 +1033,8 @@ AC_CHECK_FUNCS(gettext dgettext)
 
 # Find a method of generating a stack trace
 AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h)
+# libexecinfo provides backtrace_symbols on FreeBSD
+AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
 AC_CHECK_FUNCS(backtrace_symbols)
 AC_CHECK_LIB(exc, trace_back_stack)
 


-- 
Samba Shared Repository


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

2008-11-21 Thread Tim Prouty
The branch, v3-3-test has been updated
   via  a56572994ee1de318172321e301be1ec4c1b6a8f (commit)
  from  a3c5ac0de490b6e34caaf840542553586489b30c (commit)

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


- Log -
commit a56572994ee1de318172321e301be1ec4c1b6a8f
Author: Dan Sledz [EMAIL PROTECTED]
Date:   Fri Nov 14 18:41:17 2008 -0800

[PATCH] FreeBSD configure check for backtrace_symbols

On FreeBSD backtrace_symbols is defined in libexecinfo.so.1.  Look for it
there as well.

---

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


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 1665e0e..dbfd4d5 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -1059,6 +1059,8 @@ AC_CHECK_FUNCS(gettext dgettext)
 
 # Find a method of generating a stack trace
 AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h)
+# libexecinfo provides backtrace_symbols on FreeBSD
+AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
 AC_CHECK_FUNCS(backtrace_symbols)
 AC_CHECK_LIB(exc, trace_back_stack)
 


-- 
Samba Shared Repository


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

2008-11-21 Thread Tim Prouty
The branch, v3-2-test has been updated
   via  22b21f63d9ebd6181d9ff577ec27e33982db85db (commit)
  from  89d6bd5bc5398fbec6fbfb797ea6f10ad036c205 (commit)

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


- Log -
commit 22b21f63d9ebd6181d9ff577ec27e33982db85db
Author: Dan Sledz [EMAIL PROTECTED]
Date:   Fri Nov 14 18:41:17 2008 -0800

[PATCH] FreeBSD configure check for backtrace_symbols

On FreeBSD backtrace_symbols is defined in libexecinfo.so.1.  Look for it
there as well.

---

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


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 733c31e..32d21b7 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -1053,6 +1053,8 @@ AC_CHECK_FUNCS(setbuffer shmget shm_open)
 
 # Find a method of generating a stack trace
 AC_CHECK_HEADERS(execinfo.h libexc.h libunwind.h)
+# libexecinfo provides backtrace_symbols on FreeBSD
+AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
 AC_CHECK_FUNCS(backtrace_symbols)
 AC_CHECK_LIB(exc, trace_back_stack)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 3d30d5945cf561c5baf2716d8f41870cecf947c0

2008-11-21 Thread Michael Adam
The branch, master has been updated
   via  3d30d5945cf561c5baf2716d8f41870cecf947c0 (commit)
  from  c23a6dc3ec4f9a5ea5ab4f8cb9cd62aa6cacc3a4 (commit)

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


- Log -
commit 3d30d5945cf561c5baf2716d8f41870cecf947c0
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Nov 17 12:48:26 2008 +0100

[s3]nfs4_acls: make prototype header match definition for 
smb_set_nt_acl_nfs4()

Add the const from nfs4_acls.c to nfs4_acls.h
This fixes my build of the zfsacl module on solaris.

Michael

---

Summary of changes:
 source3/modules/nfs4_acls.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h
index 0f783aa..a227c6e 100644
--- a/source3/modules/nfs4_acls.h
+++ b/source3/modules/nfs4_acls.h
@@ -144,7 +144,7 @@ typedef bool (*set_nfs4acl_native_fn_t)(files_struct *, 
SMB4ACL_T *);
 
 NTSTATUS smb_set_nt_acl_nfs4(files_struct *fsp,
uint32 security_info_sent,
-   SEC_DESC *psd,
+   const SEC_DESC *psd,
set_nfs4acl_native_fn_t set_nfs4_native);
 
 #endif /* __NFS4_ACLS_H__ */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - 83ff6979f504d50caf725ee62549604630b69be7

2008-11-21 Thread Jeremy Allison
The branch, master has been updated
   via  83ff6979f504d50caf725ee62549604630b69be7 (commit)
   via  dcc4661d4ab55526444f742a2f9634ec14832054 (commit)
   via  ecd8c5d3078f4fd06586485665f956520b2314a3 (commit)
  from  3d30d5945cf561c5baf2716d8f41870cecf947c0 (commit)

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


- Log -
commit 83ff6979f504d50caf725ee62549604630b69be7
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 18:20:38 2008 -0800

Fix the logic bug that caused us to run into kernel oplocks on an open for 
a stream inside a file with stream_xattr module. On opening the base_fsp we 
must break existing oplocks.
Jeremy.

commit dcc4661d4ab55526444f742a2f9634ec14832054
Merge: ecd8c5d3078f4fd06586485665f956520b2314a3 
3d30d5945cf561c5baf2716d8f41870cecf947c0
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 18:20:33 2008 -0800

Merge branch 'master' of ssh://[EMAIL PROTECTED]/data/git/samba

commit ecd8c5d3078f4fd06586485665f956520b2314a3
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 16:02:31 2008 -0800

Use fxattr calls whenever possible (trying to work around the strange Linux 
kernel oplock bug).
Jeremy.

---

Summary of changes:
 source3/modules/vfs_streams_xattr.c |  116 ++-
 source3/smbd/open.c |8 ++-
 2 files changed, 81 insertions(+), 43 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index 9df88e5..3555654 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -64,14 +64,16 @@ static SMB_INO_T stream_inode(const SMB_STRUCT_STAT *sbuf, 
const char *sname)
return result;
 }
 
-static ssize_t get_xattr_size(connection_struct *conn, const char *fname,
- const char *xattr_name)
+static ssize_t get_xattr_size(connection_struct *conn,
+   files_struct *fsp,
+   const char *fname,
+   const char *xattr_name)
 {
NTSTATUS status;
struct ea_struct ea;
ssize_t result;
 
-   status = get_ea_value(talloc_tos(), conn, NULL, fname,
+   status = get_ea_value(talloc_tos(), conn, fsp, fname,
  xattr_name, ea);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -100,7 +102,8 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, io-base, io-xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, fsp,
+   io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
}
@@ -144,7 +147,7 @@ static int streams_xattr_stat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -191,7 +194,7 @@ static int streams_xattr_lstat(vfs_handle_struct *handle, 
const char *fname,
goto fail;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, base, xattr_name);
+   sbuf-st_size = get_xattr_size(handle-conn, NULL, base, xattr_name);
if (sbuf-st_size == -1) {
errno = ENOENT;
goto fail;
@@ -246,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
- */
-baseflags = flags;
-baseflags = ~O_TRUNC;
-baseflags = ~O_EXCL;
-baseflags = ~O_CREAT;
-
-hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-/* It is legit to open a stream on a directory, but the base
- * fd has to be read-only.
- */
-if ((hostfd == -1)  (errno == EISDIR)) {
-baseflags = ~O_ACCMODE;
-baseflags |= O_RDONLY;
-hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
- mode);
-}
+*/
+   baseflags = flags;
+   baseflags = ~O_TRUNC;
+   baseflags = ~O_EXCL;
+   baseflags = ~O_CREAT;
+
+   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
 
-if (hostfd == -1) {
+   /* It is legit to open a stream on a directory, but the base
+* fd has to be read-only.
+*/
+   if ((hostfd == -1)  (errno == EISDIR)) {
+   baseflags = ~O_ACCMODE;
+   baseflags |= O_RDONLY;
+ 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  f268d75f5ed1258b08c5571780ea3be6724daed4 (commit)
  from  a56572994ee1de318172321e301be1ec4c1b6a8f (commit)

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


- Log -
commit f268d75f5ed1258b08c5571780ea3be6724daed4
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 18:20:55 2008 -0800

Fix the logic bug that caused us to run into kernel oplocks on an open for 
a stream inside a file with stream_xattr module. On opening the base_fsp we 
must break existing oplocks.
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   68 ++--
 source/smbd/open.c |8 -
 2 files changed, 41 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 2ea5336..3555654 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -102,7 +102,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
+   sbuf-st_size = get_xattr_size(handle-conn, fsp,
io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
@@ -249,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
- */
-baseflags = flags;
-baseflags = ~O_TRUNC;
-baseflags = ~O_EXCL;
-baseflags = ~O_CREAT;
-
-hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-/* It is legit to open a stream on a directory, but the base
- * fd has to be read-only.
- */
-if ((hostfd == -1)  (errno == EISDIR)) {
-baseflags = ~O_ACCMODE;
-baseflags |= O_RDONLY;
-hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
- mode);
-}
+*/
+   baseflags = flags;
+   baseflags = ~O_TRUNC;
+   baseflags = ~O_EXCL;
+   baseflags = ~O_CREAT;
+
+   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
+
+   /* It is legit to open a stream on a directory, but the base
+* fd has to be read-only.
+*/
+   if ((hostfd == -1)  (errno == EISDIR)) {
+   baseflags = ~O_ACCMODE;
+   baseflags |= O_RDONLY;
+   hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
+   mode);
+   }
 
-if (hostfd == -1) {
+   if (hostfd == -1) {
goto fail;
-}
+   }
 
-   status = get_ea_value(talloc_tos(), handle-conn, NULL, base,
+   status = get_ea_value(talloc_tos(), handle-conn, fsp, base,
  xattr_name, ea);
 
DEBUG(10, (get_ea_value returned %s\n, nt_errstr(status)));
@@ -303,9 +303,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-   if (fsp-base_fsp-fh-fd != -1) {
+   if (fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp-base_fsp, xattr_name,
+   fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -323,9 +323,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (fsp-base_fsp-fh-fd != -1) {
+   if (fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp-base_fsp, xattr_name,
+   fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -600,7 +600,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct 
*handle,
return SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
+   status = get_ea_value(talloc_tos(), handle-conn, fsp,
  sio-base, sio-xattr_name, ea);
if (!NT_STATUS_IS_OK(status)) {
return 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  1172260b397e22adddff94f4b364261e8058ebdd (commit)
   via  c76e4791d3ae4f180fba209c29bd3774c00858cf (commit)
  from  22b21f63d9ebd6181d9ff577ec27e33982db85db (commit)

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


- Log -
commit 1172260b397e22adddff94f4b364261e8058ebdd
Merge: c76e4791d3ae4f180fba209c29bd3774c00858cf 
22b21f63d9ebd6181d9ff577ec27e33982db85db
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 18:21:34 2008 -0800

Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into 
v3-2-test

commit c76e4791d3ae4f180fba209c29bd3774c00858cf
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 18:19:13 2008 -0800

Fix the logic bug that caused us to run into kernel oplocks on an open for 
a stream inside a file with stream_xattr module. On opening the base_fsp we 
must break existing oplocks.
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   68 ++--
 source/smbd/open.c |8 -
 2 files changed, 41 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 2ea5336..3555654 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -102,7 +102,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
+   sbuf-st_size = get_xattr_size(handle-conn, fsp,
io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
@@ -249,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
- */
-baseflags = flags;
-baseflags = ~O_TRUNC;
-baseflags = ~O_EXCL;
-baseflags = ~O_CREAT;
-
-hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-/* It is legit to open a stream on a directory, but the base
- * fd has to be read-only.
- */
-if ((hostfd == -1)  (errno == EISDIR)) {
-baseflags = ~O_ACCMODE;
-baseflags |= O_RDONLY;
-hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
- mode);
-}
+*/
+   baseflags = flags;
+   baseflags = ~O_TRUNC;
+   baseflags = ~O_EXCL;
+   baseflags = ~O_CREAT;
+
+   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
+
+   /* It is legit to open a stream on a directory, but the base
+* fd has to be read-only.
+*/
+   if ((hostfd == -1)  (errno == EISDIR)) {
+   baseflags = ~O_ACCMODE;
+   baseflags |= O_RDONLY;
+   hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
+   mode);
+   }
 
-if (hostfd == -1) {
+   if (hostfd == -1) {
goto fail;
-}
+   }
 
-   status = get_ea_value(talloc_tos(), handle-conn, NULL, base,
+   status = get_ea_value(talloc_tos(), handle-conn, fsp, base,
  xattr_name, ea);
 
DEBUG(10, (get_ea_value returned %s\n, nt_errstr(status)));
@@ -303,9 +303,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-   if (fsp-base_fsp-fh-fd != -1) {
+   if (fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp-base_fsp, xattr_name,
+   fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -323,9 +323,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (fsp-base_fsp-fh-fd != -1) {
+   if (fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp-base_fsp, xattr_name,
+   fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -600,7 +600,7 @@ static ssize_t 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  4c82a8dd2f6fae1ea1722108c7f64e6a1286df15 (commit)
  from  1172260b397e22adddff94f4b364261e8058ebdd (commit)

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


- Log -
commit 4c82a8dd2f6fae1ea1722108c7f64e6a1286df15
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 22:44:23 2008 -0800

Revert c76e4791d3ae4f180fba209c29bd3774c00858cf - Fix the logic bug that 
caused us to run into kernel oplocks on an open for a stream inside a file with 
stream_xattr module. On opening the base_fsp we must break existing oplocks. 
as it broke make test.
Jeremy.

---

Summary of changes:
 source/modules/vfs_streams_depot.c |3 +-
 source/modules/vfs_streams_xattr.c |   68 ++--
 source/smbd/open.c |5 +--
 3 files changed, 37 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_depot.c 
b/source/modules/vfs_streams_depot.c
index e7eceda..c530d2a 100644
--- a/source/modules/vfs_streams_depot.c
+++ b/source/modules/vfs_streams_depot.c
@@ -116,6 +116,7 @@ static char *stream_dir(vfs_handle_struct *handle, const 
char *base_path,
char *id_hex;
struct file_id id;
uint8 id_buf[16];
+   const char *rootdir;
 
tmp = talloc_asprintf(talloc_tos(), %s/.streams, 
handle-conn-connectpath);
 
@@ -124,7 +125,7 @@ static char *stream_dir(vfs_handle_struct *handle, const 
char *base_path,
goto fail;
}
 
-   const char *rootdir = lp_parm_const_string(
+   rootdir = lp_parm_const_string(
SNUM(handle-conn), streams_depot, directory,
tmp);
TALLOC_FREE(tmp);
diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 3555654..2ea5336 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -102,7 +102,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, fsp,
+   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
@@ -249,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
-*/
-   baseflags = flags;
-   baseflags = ~O_TRUNC;
-   baseflags = ~O_EXCL;
-   baseflags = ~O_CREAT;
-
-   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-   /* It is legit to open a stream on a directory, but the base
-* fd has to be read-only.
-*/
-   if ((hostfd == -1)  (errno == EISDIR)) {
-   baseflags = ~O_ACCMODE;
-   baseflags |= O_RDONLY;
-   hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
-   mode);
-   }
+ */
+baseflags = flags;
+baseflags = ~O_TRUNC;
+baseflags = ~O_EXCL;
+baseflags = ~O_CREAT;
+
+hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
+
+/* It is legit to open a stream on a directory, but the base
+ * fd has to be read-only.
+ */
+if ((hostfd == -1)  (errno == EISDIR)) {
+baseflags = ~O_ACCMODE;
+baseflags |= O_RDONLY;
+hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
+ mode);
+}
 
-   if (hostfd == -1) {
+if (hostfd == -1) {
goto fail;
-   }
+}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp, base,
+   status = get_ea_value(talloc_tos(), handle-conn, NULL, base,
  xattr_name, ea);
 
DEBUG(10, (get_ea_value returned %s\n, nt_errstr(status)));
@@ -303,9 +303,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-   if (fsp-fh-fd != -1) {
+   if (fsp-base_fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp, xattr_name,
+   fsp-base_fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -323,9 +323,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
 

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

2008-11-21 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  11c4962cf6b6e6f66f5ce5788b331d43bd743248 (commit)
  from  f268d75f5ed1258b08c5571780ea3be6724daed4 (commit)

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


- Log -
commit 11c4962cf6b6e6f66f5ce5788b331d43bd743248
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 22:46:37 2008 -0800

Revert f268d75f5ed1258b08c5571780ea3be6724daed4 - Fix the logic bug that 
caused us to
run into kernel oplocks on an open for a stream inside a file with 
stream_xattr module. On
opening the base_fsp we must break existing oplocks. as it broke make test.
Jeremy

---

Summary of changes:
 source/modules/vfs_streams_xattr.c |   68 ++--
 source/smbd/open.c |8 +
 2 files changed, 35 insertions(+), 41 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/vfs_streams_xattr.c 
b/source/modules/vfs_streams_xattr.c
index 3555654..2ea5336 100644
--- a/source/modules/vfs_streams_xattr.c
+++ b/source/modules/vfs_streams_xattr.c
@@ -102,7 +102,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, fsp,
+   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
@@ -249,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
-*/
-   baseflags = flags;
-   baseflags = ~O_TRUNC;
-   baseflags = ~O_EXCL;
-   baseflags = ~O_CREAT;
-
-   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-   /* It is legit to open a stream on a directory, but the base
-* fd has to be read-only.
-*/
-   if ((hostfd == -1)  (errno == EISDIR)) {
-   baseflags = ~O_ACCMODE;
-   baseflags |= O_RDONLY;
-   hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
-   mode);
-   }
+ */
+baseflags = flags;
+baseflags = ~O_TRUNC;
+baseflags = ~O_EXCL;
+baseflags = ~O_CREAT;
+
+hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
+
+/* It is legit to open a stream on a directory, but the base
+ * fd has to be read-only.
+ */
+if ((hostfd == -1)  (errno == EISDIR)) {
+baseflags = ~O_ACCMODE;
+baseflags |= O_RDONLY;
+hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
+ mode);
+}
 
-   if (hostfd == -1) {
+if (hostfd == -1) {
goto fail;
-   }
+}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp, base,
+   status = get_ea_value(talloc_tos(), handle-conn, NULL, base,
  xattr_name, ea);
 
DEBUG(10, (get_ea_value returned %s\n, nt_errstr(status)));
@@ -303,9 +303,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-   if (fsp-fh-fd != -1) {
+   if (fsp-base_fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp, xattr_name,
+   fsp-base_fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -323,9 +323,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (fsp-fh-fd != -1) {
+   if (fsp-base_fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp, xattr_name,
+   fsp-base_fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -600,7 +600,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct 
*handle,
return SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp,
+   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
  sio-base, 

[SCM] Samba Shared Repository - branch master updated - 338303eb379320411829ee3dd1621e490f8d7fe1

2008-11-21 Thread Jeremy Allison
The branch, master has been updated
   via  338303eb379320411829ee3dd1621e490f8d7fe1 (commit)
  from  83ff6979f504d50caf725ee62549604630b69be7 (commit)

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


- Log -
commit 338303eb379320411829ee3dd1621e490f8d7fe1
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 22:48:37 2008 -0800

Rever 83ff6979f504d50caf725ee62549604630b69be7 - Fix the logic bug that 
caused us to
run into kernel oplocks on an open for a stream inside a file with 
stream_xattr module. On
opening the base_fsp we must break existing oplocks. as it broke make test.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_streams_xattr.c |   68 +-
 source3/smbd/open.c |8 +
 2 files changed, 35 insertions(+), 41 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_xattr.c 
b/source3/modules/vfs_streams_xattr.c
index 3555654..2ea5336 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -102,7 +102,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, 
files_struct *fsp,
return -1;
}
 
-   sbuf-st_size = get_xattr_size(handle-conn, fsp,
+   sbuf-st_size = get_xattr_size(handle-conn, fsp-base_fsp,
io-base, io-xattr_name);
if (sbuf-st_size == -1) {
return -1;
@@ -249,29 +249,29 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
/*
 * We use baseflags to turn off nasty side-effects when opening the
 * underlying file.
-*/
-   baseflags = flags;
-   baseflags = ~O_TRUNC;
-   baseflags = ~O_EXCL;
-   baseflags = ~O_CREAT;
-
-   hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
-
-   /* It is legit to open a stream on a directory, but the base
-* fd has to be read-only.
-*/
-   if ((hostfd == -1)  (errno == EISDIR)) {
-   baseflags = ~O_ACCMODE;
-   baseflags |= O_RDONLY;
-   hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
-   mode);
-   }
+ */
+baseflags = flags;
+baseflags = ~O_TRUNC;
+baseflags = ~O_EXCL;
+baseflags = ~O_CREAT;
+
+hostfd = SMB_VFS_OPEN(handle-conn, base, fsp, baseflags, mode);
+
+/* It is legit to open a stream on a directory, but the base
+ * fd has to be read-only.
+ */
+if ((hostfd == -1)  (errno == EISDIR)) {
+baseflags = ~O_ACCMODE;
+baseflags |= O_RDONLY;
+hostfd = SMB_VFS_OPEN(handle-conn, fname, fsp, baseflags,
+ mode);
+}
 
-   if (hostfd == -1) {
+if (hostfd == -1) {
goto fail;
-   }
+}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp, base,
+   status = get_ea_value(talloc_tos(), handle-conn, NULL, base,
  xattr_name, ea);
 
DEBUG(10, (get_ea_value returned %s\n, nt_errstr(status)));
@@ -303,9 +303,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
DEBUG(10, (creating attribute %s on file %s\n,
   xattr_name, base));
 
-   if (fsp-fh-fd != -1) {
+   if (fsp-base_fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp, xattr_name,
+   fsp-base_fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -323,9 +323,9 @@ static int streams_xattr_open(vfs_handle_struct *handle,  
const char *fname,
 
if (flags  O_TRUNC) {
char null = '\0';
-   if (fsp-fh-fd != -1) {
+   if (fsp-base_fsp-fh-fd != -1) {
if (SMB_VFS_FSETXATTR(
-   fsp, xattr_name,
+   fsp-base_fsp, xattr_name,
null, sizeof(null),
flags  O_EXCL ? XATTR_CREATE : 0) == 
-1) {
goto fail;
@@ -600,7 +600,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct 
*handle,
return SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
}
 
-   status = get_ea_value(talloc_tos(), handle-conn, fsp,
+   status = get_ea_value(talloc_tos(), handle-conn, fsp-base_fsp,
  sio-base, 

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

2008-11-21 Thread Jeremy Allison
The branch, master has been updated
   via  d205766e60be96449930f270b0a77002dffab278 (commit)
  from  338303eb379320411829ee3dd1621e490f8d7fe1 (commit)

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


- Log -
commit d205766e60be96449930f270b0a77002dffab278
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Nov 21 22:51:20 2008 -0800

Fix a C90 error.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_streams_depot.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_streams_depot.c 
b/source3/modules/vfs_streams_depot.c
index e7eceda..0d6e0e0 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -116,6 +116,7 @@ static char *stream_dir(vfs_handle_struct *handle, const 
char *base_path,
char *id_hex;
struct file_id id;
uint8 id_buf[16];
+   const char *rootdir;
 
tmp = talloc_asprintf(talloc_tos(), %s/.streams, 
handle-conn-connectpath);
 
@@ -124,7 +125,7 @@ static char *stream_dir(vfs_handle_struct *handle, const 
char *base_path,
goto fail;
}
 
-   const char *rootdir = lp_parm_const_string(
+   rootdir = lp_parm_const_string(
SNUM(handle-conn), streams_depot, directory,
tmp);
TALLOC_FREE(tmp);
@@ -149,7 +150,7 @@ static char *stream_dir(vfs_handle_struct *handle, const 
char *base_path,
first = hash  0xff;
second = (hash  8)  0xff;
 
-   id_hex = hex_encode(talloc_tos(), id_buf, sizeof(id_buf));
+   id_hex = hex_encode_talloc(talloc_tos(), id_buf, sizeof(id_buf));
 
if (id_hex == NULL) {
errno = ENOMEM;


-- 
Samba Shared Repository