[Samba] some questions

2008-09-08 Thread Xu, Qiang (FXSGSC)
Hi, all:

In doing image transfer over SMB protocol, I have some questions hard to 
understand.

1. Is there any difference between username \z27jxk and sun-rm\z27jxk? What 
I see is the former can log in to the SMB server, while the later can't. When 
the server receives the login request with the username in the form 
\username, what domain it will look up the user in?

2. In one login request, the trace shows Session Setup AndX Request, User: 
\z27jxk, while the other trace shows Session Setup AndX Request, 
NTLMSSP_AUTH, User: sun-rm\z27jxk. What is the effect of NTLMSSP_AUTH here?

3. Can I identify the strict securiy policy at the server's end with NTLMv2 
only in the network trace? Is NTLMv2 only recognizable with some special 
token in the trace?

Looking forward to any suggestions,
Xu Qiang
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] (Re-open Bug #3056) Tries to re-create Builtin-Groups over and over again

2008-09-08 Thread Matthias Nagel
Hello everbody,
 
first some technical data:
 
Samba version: 3.0.28
Distro: Gentoo
PDB backend: OpenLDAP 2.3.43
Server role: PDC
 
My Samba server continuously complains about not beeing able to create the 
BUILTIN\Administrators and BUILTIN\Users group, because they already exist.

groupdb/mapping.c:pdb_create_builtin_alias(739)
pdb_create_builtin_alias: Could not add group mapping entry for alias 544 
(NT_STATUS_GROUP_EXISTS)
auth/auth_util.c:create_builtin_administrators(792)
create_builtin_administrators: Failed to create Administrators

The latter is correct and I am wondering why Samba wants to re-create them. If 
I delete those group mappings from the LDAP directory, Samba re-creates them 
silently (of course with a different Unix group id) and a short time later the 
error recurrences. But apparently everything works fine, even nested group 
membership. For example if a type groups administrator on the console I get 
BUILTIN\administratoren dadmins where dadmins is the domain administrator 
group, which in turn is member of BUILTIN\administratoren. getent group 
gives a correct output, too.
 
After running Samba and OpenLDAP in debug mode (real-time logging to the 
console), I found the core of the problem.

Inside the function passdb/lookup_sid.c:sid_to_gid the function  
winbind_sid_to_gid is invoked. And at this point I get the following errors 
in my logs:
 
smbd[7917]: passdb/lookup_sid.c:sid_to_gid(1468)
smbd[7917]: smbd: winbind failed to find a gid for sid S-1-5-32-544

and from the winbind daemon:
 
winbindd[7905]: [2008/09/07 12:55:54, 5] 
nsswitch/winbindd_async.c:lookupsid_recv(706)
winbindd[7905]:   lookupsid returned an error
winbindd[7905]: [2008/09/07 12:55:54, 5] 
nsswitch/winbindd_sid.c:sid2gid_lookupsid_recv(274)
winbindd[7905]:   sid2gid_lookupsid_recv: Could not convert get sid type for 
S-1-5-32-544

The problem is that winbindd refuses to look up SIDs that do not match my 
domain SID. For example wbinfo -Y works for domain SIDs, but not for builtin 
SIDs. This behavior is described in bug #3056 
(https://bugzilla.samba.org/show_bug.cgi?id=3056). The proposed solution is to 
add an id range for the BUILTIN accounts. But the syntax for the idmap 
related option changed, and I do not get it working. 


My previous version of smb.conf looked like that:

passdb backend = ldapsam:ldap://localhost
ldap suffix = dc=schule,dc=gymnasiumportawestfalica,dc=de
ldap admin dn = uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
ldap machine suffix = ou=Computers
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldapsam:editposix=yes
ldapsam:trusted = yes
encrypt passwords = yes
null passwords = yes
ldap passwd sync = yes
idmap domains = SCHULE
idmap config SCHULE:backend = ldap
idmap config SCHULE:readonly = no
idmap config SCHULE:default = yes
idmap config SCHULE:ldap_base_dn = 
ou=IdMap,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config SCHULE:ldap_user_dn = 
uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config SCHULE:ldap_url = ldap://localhost
idmap config SCHULE:range = 2000-65000
idmap alloc backend = ldap
idmap alloc config:ldap_base_dn = 
ou=IdMap,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap alloc config:ldap_user_dn = 
uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap alloc config:ldap_url = ldap://localhost
idmap alloc config:range = 2000-65000
winbind enum groups = yes
winbind enum users = yes


After I read the bug description I changed it to:
 
passdb backend = ldapsam:ldap://localhost
ldap ssl = off
ldap suffix = dc=schule,dc=gymnasiumportawestfalica,dc=de
ldap admin dn = uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
ldap machine suffix = ou=Computers
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldapsam:editposix=yes
ldapsam:trusted = yes
encrypt passwords = yes
null passwords = yes
guest account = gast
ldap passwd sync = yes
idmap domains = BUILTIN SCHULE
idmap config SCHULE:backend = ldap
idmap config SCHULE:readonly = no
idmap config SCHULE:default = yes
idmap config SCHULE:ldap_base_dn = 
ou=IdMap,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config SCHULE:ldap_user_dn = 
uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config SCHULE:ldap_url = ldap://localhost
idmap config BUILTIN:backend = ldap
idmap config BUILTIN:readonly = no
idmap config BUILTIN:default = no
idmap config BUILTIN:ldap_base_dn = 
ou=IdMap,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config BUILTIN:ldap_user_dn = 
uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap config BUILTIN:ldap_url = ldap://localhost
idmap uid = 2000-65000
idmap gid = 2000-65000
idmap alloc backend = ldap
idmap alloc config:ldap_base_dn = 
ou=IdMap,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap alloc config:ldap_user_dn = 
uid=samba,dc=schule,dc=gymnasiumportawestfalica,dc=de
idmap alloc config:ldap_url = ldap://localhost
idmap alloc config:range = 2000-65000
winbind enum groups = yes
winbind enum users = yes

My directory looks 

[Samba] Clients disconnecting and msword problem.

2008-09-08 Thread Kakà

I've got a lot of this in my /var/log/messages :

nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)

the problem is that sometimes accessing to server from windows client 
the mapped drive disappear to return in a second or two. I've got 
another strange problem. Opening a word file on the server and trying to 
save, MSword tell me that the disk is full and can't save. I suppose 
mys erver sometimes disconnect from client ( all clients! ).For this 
problem take in count that only msword do that stuff. Excel for example 
works like a breeze.


This is my testparm output :

[global]
   workgroup = MARELLA
   netbios name = URANIO
   server string = Server
   log level = 3
   log file = /var/log/samba/%m.log
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   os level = 60
   preferred master = Yes
   dns proxy = No
   wins support = Yes
   default service = dati
   inherit permissions = Yes
   inherit acls = Yes

[dati]
   comment = Dati su Server
   path = /home/samba/dati
   read only = No
   create mask = 0775
   directory mask = 0770
   guest ok = Yes


thanks if you can help me !
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Help request from non-expert: mounting a samba drive with the right charset for accented filenames

2008-09-08 Thread Ben Kenward
Hi all,

I hope someone might be able to offer me some advice. I have a NAS
box, a QNAP TS-109 which runs a version of Debian Linux. It has a
local ext3 drive, and I also smbmount a network drive on it (a Lacie
ED mini which I have tried formatted as both ext3 and FAT32 without
solving my problems).

My problem is that I am unable to correctly rsync files with accented
characters in the names between the two boxes, because I am unable to
mount them both in a way in which the same such file appears to be
named the same on both the local and the networked drive. For example,
currently, no matter how I try to mount a file with an ä in the the
name (that's an a with a two dot accent), it appears as two
characters A☼ when I ls the local ext3 drive, and as a , when I
ls the network drive.

I have several difficulties in solving this problem. As I currently
understand it, if I could use the same -o iocharset=whatever
argument for mounting both drives, then it ought to work (though I'm
not 100% on that assertion). However, I don't know what charset I can
use which would work. Using, for example, -o iocharset=iso8859-1 to
smbmount the network drive, the filenames appear exactly the same as
with no iocharset argument. However, using -o
iocharset=definitelydoesntexist also mounts the drive in the same
way, and doesn't even produce an error (to stderr or dmesg). So how do
I know what iocharset arguments are available, let alone which one is
correct?

The answer to that last question might be to find out how the local
drive is mounted. The problem is, even though the output of a mount
command includes the following line about the local disk in question:

/dev/sda3 on /share/HDA_DATA type ext3
(rw,usrjquota=aquota.user,jqfmt=vfsv0,data=writeback,extents)

as far as I can tell nothing there is related to the charset, and the
fstab /etc/fstab file contains nothing at all related to that drive:

# /etc/fstab: static file system information.
#
# file system mount pt type   options dump pass
/dev/ram   /  ext2  defaults 1  1
proc/proc  proc defaults  0  0
none/dev/ptsdevpts  gid=5,mode=620  0   0

So the drive is mounted in some other way than from /etc/fstab. But I
don't know how to find out how. And as far as I understand, there is
anyway no -o iocharset= option for the standard mount command for
ext3? There is therefore only one way it can have been done, right? If
so, how do I duplicate that with my smbmount command?

Other information which may be relevant:

The files with accents were created by windows.

I have read that mount -t smbfs should be synonymous with
smbmount. Well it isn't for me - I can't mount the network drive at
all with the former command.

Any help at all very much appreciated!

Cheers,

Ben

-- 
Dr. Ben Kenward
Department of Psychology, Uppsala University, Sweden
+46 18 4712125
http://www.benkenward.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Clients disconnecting and msword problem.

2008-09-08 Thread Kakà
I've noted 3 stange shares exposed from my samba server. One has no 
name, the second is * and the third is *.. These shares appears some 
minutes after the service restart.


Kakà ha scritto:

I've got a lot of this in my /var/log/messages :

nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)

the problem is that sometimes accessing to server from windows client 
the mapped drive disappear to return in a second or two. I've got 
another strange problem. Opening a word file on the server and trying 
to save, MSword tell me that the disk is full and can't save. I 
suppose mys erver sometimes disconnect from client ( all clients! 
).For this problem take in count that only msword do that stuff. Excel 
for example works like a breeze.


This is my testparm output :

[global]
   workgroup = MARELLA
   netbios name = URANIO
   server string = Server
   log level = 3
   log file = /var/log/samba/%m.log
   max log size = 50
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   os level = 60
   preferred master = Yes
   dns proxy = No
   wins support = Yes
   default service = dati
   inherit permissions = Yes
   inherit acls = Yes

[dati]
   comment = Dati su Server
   path = /home/samba/dati
   read only = No
   create mask = 0775
   directory mask = 0770
   guest ok = Yes


thanks if you can help me !

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


Re: [Samba] smbpasswd web frontend

2008-09-08 Thread Andrea Venturoli

Michael Mohn ha scritto:


I would try a minimal setup of webmin.



Thanks. I tried this today, but, even with only the samba module loaded, 
it still has too many features, which I don't want to give to my users.


I ended up wrapping smbpasswd in a cgi script. Ugly and risky, but I 
guess it's the less worst thing.


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


Re: [Samba] smbpasswd web frontend

2008-09-08 Thread Michael Mohn

Am 08.09.2008 um 21:07 schrieb Andrea Venturoli:


Michael Mohn ha scritto:


I would try a minimal setup of webmin.



Thanks. I tried this today, but, even with only the samba module  
loaded, it still has too many features, which I don't want to give  
to my users.


I ended up wrapping smbpasswd in a cgi script. Ugly and risky, but I  
guess it's the less worst thing.


in a second thought: maybe there is something like a addon for usermin  
(webmins user-centered part). maybe you should try google on this ;)



bye,

Michael.


PGP.sig
Description: This is a digitally signed message part
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Share access on new server

2008-09-08 Thread Ken Findlay
I am new to the Samba world and need to port the Samba setup from an old server 
running BEL Server (RedHat under the hood) with Samba 3.0.25 to a RedHat EL 5.2 
server with Samba 3.0.28, but some of the share access is not working.

After copying over the smb.conf file I ran testparm and had issues with the 
oplocks so I commented out the entries referring to oplocks (also the docs 
indicated that modifiying the lock settings should not be necessary).

After starting the smbd/nmbd the server shows up in the network browser along 
with the workstations and old Samba server (I changed the name in the new 
server smb.conf file so they could both be accessed) and the users can access 
their home shares but not the secondary shares. The secondary shares have 
entries such as:

  user = @groupname

where the group names are valid linux groups on both the old and new servers. 

There does not appear to be a domain server in use - users login in with simple 
name and password on the PC's.

The old linux server used the smbpasswd backend so I just ported it rather than 
try to modify before I get the shares working.

The error messages we get are as follows:

 From 2000 PC The network name cannot be found

From XP PC The network path was not found

Both systems tested can ping the server with the hostname.

I just tested another PC used for some mail hosting programs and it can access 
all the shares but is logged in as Administrator so is using the root user 
mapping to access all.

The output from the testparm command is as follows:

[global]
workgroup = SILON
map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap cache time = 60
printcap name = cups
dns proxy = No
idmap uid = 1-10500
idmap gid = 10501-10999
path = /home/administrator/SHARES
username = @staff
write list = @staff

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[pdf-gen]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
printing = bsd
print command = /usr/share/samba/scripts/print-pdf %s %H //%L/%u 
%m %I %J 
lpq command = /bin/true
lprm command = lprm -P'%p' %j

[install]
path = /home/administrator/SHARES/install

[general]
path = /home/administrator/SHARES/general
create mask = 0770
directory mask = 0770

[lab_data]
path = /home/administrator/SHARES/lab_data
username = 
valid users = @lab-staff, samplonius
write list = @lab-staff
read only = No
create mask = 0777
directory mask = 0777

[backup]
path = /home/administrator/SHARES/backup
username = @secure_staff
write list = @secure_staff

[acct]
comment = Accounting Share
path = /home/administrator/SHARES/acct
valid users = @secure_staff
read list = @secure_staff
write list = @secure_staff
[EMAIL PROTECTED] ~]# 

Any help would be appreciated.

Thanks.

Ken



__
D O T E A S Y - Join the web hosting revolution!
 http://www.doteasy.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] smbpasswd web frontend

2008-09-08 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrea Venturoli wrote:
 Michael Mohn ha scritto:
 
 I would try a minimal setup of webmin.
 
 
 Thanks. I tried this today, but, even with only the samba module loaded,
 it still has too many features, which I don't want to give to my users.
 
 I ended up wrapping smbpasswd in a cgi script. Ugly and risky, but I
 guess it's the less worst thing.

Did you try swat?

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

iD8DBQFIxYmZmb+gadEcsb4RAtUGAJ9y/c1POXphlrYQhNFznMzq6oo2qgCfRsZH
YKX6LSVc9Q+OCambxCrm5ns=
=6aUg
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-477-g39367ef

2008-09-08 Thread Stefan Metzmacher
The branch, v4-0-test has been updated
   via  39367ef15fabbb52cd2c05be7ca59b25dc4aff71 (commit)
  from  57d19ad002c523fb9a09694e6710ab7f588d44ec (commit)

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


- Log -
commit 39367ef15fabbb52cd2c05be7ca59b25dc4aff71
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 08:31:34 2008 +0200

BASE-DELAYWRITE: test more details of the truncate write time update 
behavior

metze

---

Summary of changes:
 source/torture/basic/delaywrite.c |  375 -
 1 files changed, 371 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/basic/delaywrite.c 
b/source/torture/basic/delaywrite.c
index 52505fa..6e718a1 100644
--- a/source/torture/basic/delaywrite.c
+++ b/source/torture/basic/delaywrite.c
@@ -128,12 +128,186 @@ static bool test_delayed_write_update(struct 
torture_context *tctx, struct smbcl
return ret;
 }
 
+static bool test_delayed_write_update1(struct torture_context *tctx, struct 
smbcli_state *cli)
+{
+   union smb_fileinfo finfo1, finfo2, finfo3, pinfo4;
+   const char *fname = BASEDIR \\torture_file1.txt;
+   NTSTATUS status;
+   int fnum1 = -1;
+   bool ret = true;
+   ssize_t written;
+   struct timeval start;
+   struct timeval end;
+   int used_delay = torture_setting_int(tctx, writetimeupdatedelay, 
200);
+   int normal_delay = 200;
+   double sec = ((double)used_delay) / ((double)normal_delay);
+   int msec = 1000 * sec;
+   char buf[2048];
+
+   if (!torture_setup_dir(cli, BASEDIR)) {
+   return false;
+   }
+
+   fnum1 = smbcli_open(cli-tree, fname, O_RDWR|O_CREAT, DENY_NONE);
+   if (fnum1 == -1) {
+   torture_comment(tctx, Failed to open %s\n, fname);
+   return false;
+   }
+
+   memset(buf, 'x', 2048);
+   written =  smbcli_write(cli-tree, fnum1, 0, buf, 0, 2048);
+
+   /* 3 second delay to ensure we get past any 2 second time
+  granularity (older systems may have that) */
+   msleep(3 * msec);
+
+   finfo1.all_info.level = RAW_FILEINFO_ALL_INFO;
+   finfo1.all_info.in.file.fnum = fnum1;
+   finfo2 = finfo1;
+   finfo3 = finfo1;
+   pinfo4.all_info.level = RAW_FILEINFO_ALL_INFO;
+   pinfo4.all_info.in.file.path = fname;
+
+   status = smb_raw_fileinfo(cli-tree, tctx, finfo1);
+
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (fileinfo failed: %s\n, nt_errstr(status)));
+   return false;
+   }
+
+   torture_comment(tctx, Initial write time %s\n, 
+  nt_time_string(tctx, finfo1.all_info.out.write_time));
+
+   /* Do a zero length SMBwrite call to truncate. */
+   written = smbcli_smbwrite(cli-tree, fnum1, x, 1024, 0);
+
+   if (written != 0) {
+   torture_comment(tctx, write failed - wrote %d bytes (%s)\n,
+  (int)written, __location__);
+   return false;
+   }
+
+   start = timeval_current();
+   end = timeval_add(start, (120*sec), 0);
+   while (!timeval_expired(end)) {
+   status = smb_raw_fileinfo(cli-tree, tctx, finfo2);
+
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (fileinfo failed: %s\n, nt_errstr(status)));
+   ret = false;
+   break;
+   }
+
+   if (finfo2.all_info.out.size != 1024) {
+   DEBUG(0, (file not truncated\n));
+   ret = false;
+   break;
+   }
+
+   torture_comment(tctx, write time %s\n,
+  nt_time_string(tctx, finfo2.all_info.out.write_time));
+   if (finfo1.all_info.out.write_time != 
finfo2.all_info.out.write_time) {
+   double diff = timeval_elapsed(start);
+   if (diff  (0.25 * sec * 0.75)) { /* 0.75 to cope with 
vmware timing */
+   torture_comment(tctx, After SMBwrite truncate 
+   server updated write_time after %.2f 
seconds
+   (1 sec == %.2f)(wrong!)\n,
+   diff, sec);
+   ret = false;
+   break;
+   }
+
+   torture_comment(tctx, After SMBwrite truncate 
+   server updated write_time after %.2f 
seconds
+   (1 sec == %.2f)(correct)\n,
+   diff, sec);
+   break;
+   }
+   fflush(stdout);
+   msleep(1 * msec);
+   }
+
+   if 

[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4046-gf48e0ca

2008-09-08 Thread Günther Deschner
The branch, v3-devel has been updated
   via  f48e0cacdf7ed458e0e89ab151e3d233fb89240b (commit)
   via  84a25e69947c077623165fe4535cddd48aba0a3e (commit)
   via  00ecf8205c4cd4a4c150b204811d448d0ac53c0d (commit)
  from  079c75ef3c169c7a5d81bcaa0b70b6e0df2c464d (commit)

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


- Log -
commit f48e0cacdf7ed458e0e89ab151e3d233fb89240b
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 5 16:28:56 2008 +0200

net: use NETSETUP flags consistently.

Guenther

commit 84a25e69947c077623165fe4535cddd48aba0a3e
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 5 23:21:58 2008 +0200

netapi: re-arrange a little NetLocalGroupSetMembers example code.

Guenther

commit 00ecf8205c4cd4a4c150b204811d448d0ac53c0d
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 5 14:01:17 2008 +0200

netapi: fix NetShareGetInfo example output.

Guenther

---

Summary of changes:
 .../examples/localgroup/localgroup_setmembers.c|   13 +
 source/lib/netapi/examples/share/share_getinfo.c   |2 +-
 source/utils/net_dom.c |2 +-
 3 files changed, 11 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/examples/localgroup/localgroup_setmembers.c 
b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c
index acee5cd..c35f2bb 100644
--- a/source/lib/netapi/examples/localgroup/localgroup_setmembers.c
+++ b/source/lib/netapi/examples/localgroup/localgroup_setmembers.c
@@ -40,6 +40,7 @@ int main(int argc, const char **argv)
uint32_t level = 3;
const char **names = NULL;
int i = 0;
+   size_t buf_size = 0;
 
poptContext pc;
int opt;
@@ -85,8 +86,9 @@ int main(int argc, const char **argv)
 
switch (level) {
case 0:
-   status = NetApiBufferAllocate(sizeof(struct 
LOCALGROUP_MEMBERS_INFO_0) * total_entries,
- (void **)g0);
+   buf_size = sizeof(struct LOCALGROUP_MEMBERS_INFO_0) * 
total_entries;
+
+   status = NetApiBufferAllocate(buf_size, (void **)g0);
if (status) {
printf(NetApiBufferAllocate failed with: %s\n,
libnetapi_get_error_string(ctx, 
status));
@@ -103,8 +105,9 @@ int main(int argc, const char **argv)
buffer = (uint8_t *)g0;
break;
case 3:
-   status = NetApiBufferAllocate(sizeof(struct 
LOCALGROUP_MEMBERS_INFO_3) * total_entries,
- (void **)g3);
+   buf_size = sizeof(struct LOCALGROUP_MEMBERS_INFO_3) * 
total_entries;
+
+   status = NetApiBufferAllocate(buf_size, (void **)g3);
if (status) {
printf(NetApiBufferAllocate failed with: %s\n,
libnetapi_get_error_string(ctx, 
status));
@@ -133,6 +136,8 @@ int main(int argc, const char **argv)
libnetapi_get_error_string(ctx, status));
}
 
+   NetApiBufferFree(buffer);
+
  out:
libnetapi_free(ctx);
poptFreeContext(pc);
diff --git a/source/lib/netapi/examples/share/share_getinfo.c 
b/source/lib/netapi/examples/share/share_getinfo.c
index 5b3bbc3..479da5c 100644
--- a/source/lib/netapi/examples/share/share_getinfo.c
+++ b/source/lib/netapi/examples/share/share_getinfo.c
@@ -137,7 +137,7 @@ int main(int argc, const char **argv)
printf(flags: %d\n, i501-shi501_flags);
break;
case 1005:
-   printf(flags: %s\n, i1005-shi1005_flags);
+   printf(flags: %d\n, i1005-shi1005_flags);
break;
default:
break;
diff --git a/source/utils/net_dom.c b/source/utils/net_dom.c
index 5544cf8..132630d 100644
--- a/source/utils/net_dom.c
+++ b/source/utils/net_dom.c
@@ -143,7 +143,7 @@ static int net_dom_join(struct net_context *c, int argc, 
const char **argv)
}
 
if (c-opt_force) {
-   join_flags |= WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED;
+   join_flags |= NETSETUP_DOMAIN_JOIN_IF_JOINED;
}
 
for (i=0; iargc; i++) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4048-gfc1b04d

2008-09-08 Thread Günther Deschner
The branch, v3-devel has been updated
   via  fc1b04df78fc0fb5bc59fa0120c0e29bbb3978a1 (commit)
   via  07cf13e43d03803a5f039fa6df3c9a35c701d43a (commit)
  from  f48e0cacdf7ed458e0e89ab151e3d233fb89240b (commit)

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


- Log -
commit fc1b04df78fc0fb5bc59fa0120c0e29bbb3978a1
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 5 17:06:24 2008 +0200

netapi: expand NetUser testsuite a little.

Guenther

commit 07cf13e43d03803a5f039fa6df3c9a35c701d43a
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Fri Sep 5 15:13:13 2008 +0200

netapi: add NetShare testsuite.

Guenther

---

Summary of changes:
 source/lib/netapi/tests/Makefile.in  |2 +-
 source/lib/netapi/tests/common.h |2 +
 source/lib/netapi/tests/netapitest.c |5 +
 source/lib/netapi/tests/netshare.c   |  232 ++
 source/lib/netapi/tests/netuser.c|  148 +-
 5 files changed, 386 insertions(+), 3 deletions(-)
 create mode 100644 source/lib/netapi/tests/netshare.c


Changeset truncated at 500 lines:

diff --git a/source/lib/netapi/tests/Makefile.in 
b/source/lib/netapi/tests/Makefile.in
index f13281e..d3f0663 100644
--- a/source/lib/netapi/tests/Makefile.in
+++ b/source/lib/netapi/tests/Makefile.in
@@ -44,7 +44,7 @@ bin/.dummy:
 
 CMDLINE_OBJ = common.o
 NETAPIBUFFER_OBJ = netapibuffer.o
-NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o 
netdisplay.o $(CMDLINE_OBJ)
+NETAPITEST_OBJ = netapitest.o netlocalgroup.o netuser.o netgroup.o 
netdisplay.o netshare.o $(CMDLINE_OBJ)
 
 bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(NETAPITEST_OBJ)
@echo Linking $@
diff --git a/source/lib/netapi/tests/common.h b/source/lib/netapi/tests/common.h
index ed073c0..5a32032 100644
--- a/source/lib/netapi/tests/common.h
+++ b/source/lib/netapi/tests/common.h
@@ -39,6 +39,8 @@ NET_API_STATUS netapitest_group(struct libnetapi_ctx *ctx,
const char *hostname);
 NET_API_STATUS netapitest_display(struct libnetapi_ctx *ctx,
  const char *hostname);
+NET_API_STATUS netapitest_share(struct libnetapi_ctx *ctx,
+   const char *hostname);
 
 #ifndef ARRAY_SIZE
 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
diff --git a/source/lib/netapi/tests/netapitest.c 
b/source/lib/netapi/tests/netapitest.c
index de81f5e..8714402 100644
--- a/source/lib/netapi/tests/netapitest.c
+++ b/source/lib/netapi/tests/netapitest.c
@@ -79,6 +79,11 @@ int main(int argc, const char **argv)
goto out;
}
 
+   status = netapitest_share(ctx, hostname);
+   if (status) {
+   goto out;
+   }
+
  out:
if (status != 0) {
printf(testsuite failed with: %s\n,
diff --git a/source/lib/netapi/tests/netshare.c 
b/source/lib/netapi/tests/netshare.c
new file mode 100644
index 000..9446c30
--- /dev/null
+++ b/source/lib/netapi/tests/netshare.c
@@ -0,0 +1,232 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetShare testsuite
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see http://www.gnu.org/licenses/.
+ */
+
+#include sys/types.h
+#include inttypes.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+
+#include netapi.h
+
+#include common.h
+
+static NET_API_STATUS test_netshareenum(const char *hostname,
+   uint32_t level,
+   const char *sharename)
+{
+   NET_API_STATUS status;
+   uint32_t entries_read = 0;
+   uint32_t total_entries = 0;
+   uint32_t resume_handle = 0;
+   int found_share = 0;
+   const char *current_name;
+   uint8_t *buffer = NULL;
+   int i;
+
+   struct SHARE_INFO_0 *i0;
+   struct SHARE_INFO_1 *i1;
+   struct SHARE_INFO_2 *i2;
+
+   printf(testing NetShareEnum level %d\n, level);
+
+   do {
+   status = NetShareEnum(hostname,
+ level,
+ buffer,
+ (uint32_t)-1,
+ entries_read,
+ 

[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-3-51-gd3db59a

2008-09-08 Thread Karolin Seeger
The branch, v3-2-stable has been updated
   via  d3db59a5b171e9bb9662199699722a7a3a9f0a57 (commit)
   via  4231a5dc6b132c629adf5378d51000fe5ed30e60 (commit)
   via  3749682921829162a6d35e4d589adc16cec4a9e5 (commit)
   via  c23752019b21bcfb6e60df521e0f634d77a1326e (commit)
   via  b6729d624129a122efe9c61293abb75e5abc923c (commit)
   via  da5cfd914492240b01269daeee314524680de817 (commit)
   via  2d60a50cd25ef0ca7a7534c2f2d818ced42ed5b5 (commit)
   via  f1236f7a81b753666ed87f450679ab14f1381ed5 (commit)
   via  482f5736aafc1396d11bb596fb9939d24b9435dd (commit)
   via  a13e5579c9ee2910e3b0408562d31ed3ff1db47a (commit)
   via  0b9b4c5e4b920a5e2ac503f780839ac331c3990d (commit)
   via  9d65db33f387e04989e3a7c5ed42077e23d8 (commit)
   via  d005b533d7ba11a70ff86c696ff11ec9b06046c8 (commit)
   via  db403413e9472ce477c1b6988a4719abcba79a2e (commit)
   via  4f61fc18e2cd557f6e54cefef16506d9e144513e (commit)
   via  7062d45182a64219e8e4769f76873bfe81fef02b (commit)
   via  4e780f0d41fdf4f8dda0cde13e27e7e2a31e03c3 (commit)
  from  00a721a2d2d2e8d753713869e91cf8d8df745c63 (commit)

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


- Log -
commit d3db59a5b171e9bb9662199699722a7a3a9f0a57
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Sep 5 15:35:04 2008 -0700

Remove unecessary msync.
Jeremy.
(cherry picked from commit d7eab4b20af47401d281dd672e012d4eb96e5f4a)

commit 4231a5dc6b132c629adf5378d51000fe5ed30e60
Author: Qiao Yang [EMAIL PROTECTED]
Date:   Fri Sep 5 14:08:09 2008 +0200

Fix a memleak

request.extra_data is not freed if there is no extra_data in response or
when there is some error happens in processing. This patch will free the
buffer right after processing a request before sending back a response.
(cherry picked from commit be6f12273f171a3eb1967d2299064e57d737f6a4)
(cherry picked from commit 72865f5e4ff30861d58b928baaf7be3373301f37)

commit 3749682921829162a6d35e4d589adc16cec4a9e5
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Sep 5 11:48:36 2008 +0200

Do proper error handling if the socket is closed

This is a step in fixing bug 5707.

Thanks to Igor Galić [EMAIL PROTECTED] for reporting!

Volker
(cherry picked from commit 1558a5c1977b1f87600ec487238fa8db009f41fd)

commit c23752019b21bcfb6e60df521e0f634d77a1326e
Author: Michael Adam [EMAIL PROTECTED]
Date:   Tue Aug 26 17:19:33 2008 +0200

run make idl after after idl change Handle arbitrary new PAC types

Michael
(cherry picked from commit cc54b4d74171d27e7a0b09aff0376804ac7ab69b)

commit b6729d624129a122efe9c61293abb75e5abc923c
Author: Andrew Tridgell [EMAIL PROTECTED]
Date:   Sun Aug 24 14:00:58 2008 +1000

Handle arbitrary new PAC types

When MS introduces a new PAC type, we should just ignore it, not
generate a parse error. New PAC info structures are supposed to be
backwards compatible with old ones
(cherry picked from commit 2971b926c835412b02c93ad1e30f1471bc0a3612)
(cherry picked from commit 843e9ebbf63f84270f8638a8e79538523b2148a8)

commit da5cfd914492240b01269daeee314524680de817
Author: Michael Adam [EMAIL PROTECTED]
Date:   Tue Aug 26 17:17:14 2008 +0200

re-run make idl after Jelmer's poperly cast array lengths pidl change.

(f321240fa91fa19c1131f119c42f64897d220682)

Michael
(cherry picked from commit cd3f4ee593e606e48cd104df222f8bda8e370a58)

commit 2d60a50cd25ef0ca7a7534c2f2d818ced42ed5b5
Author: Andrew Tridgell [EMAIL PROTECTED]
Date:   Sun Aug 24 13:53:19 2008 +1000

fixed an errno handling bug that could lead to an infinite loop
(cherry picked from commit 5ccdc58ce91ee40ca7171dd040191291aeb7fe02)
(cherry picked from commit 1361caecb355047001f8a351ec2e6f10d7f0e741)

commit f1236f7a81b753666ed87f450679ab14f1381ed5
Author: Andrew Tridgell [EMAIL PROTECTED]
Date:   Sat Aug 23 11:36:27 2008 +1000

fixed tsmsm_sendfile(). The logic was totally broken.
(cherry picked from commit 794e48b809036871287df8416a2c669b7e26f216)
(cherry picked from commit 3ce3f7f58402b98ce386bab1c40988e5ccd40d15)

commit 482f5736aafc1396d11bb596fb9939d24b9435dd
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Sep 5 11:39:38 2008 +0200

configure: fix typo in GNU ld version-script test.

Michael
(cherry picked from commit 0d9f3dfc4c139938ee57b6cf60c29cf4ce404be7)
(cherry picked from commit 2381ec3b3f6a4798c15f4d3f3aee8caea8f48941)

commit a13e5579c9ee2910e3b0408562d31ed3ff1db47a
Author: James Ding [EMAIL PROTECTED]
Date:   Thu Sep 4 15:17:18 2008 -0700

Fix winbindd crash bug with trusted domains. Bug #5736
(cherry picked from commit 2d84b9a1024f68657f75aa7e0c4091b8c7afd194)

commit 0b9b4c5e4b920a5e2ac503f780839ac331c3990d
Author: Herb Lewis [EMAIL PROTECTED]
Date:   Thu Sep 4 14:32:09 2008 -0700

get rid of 

[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0pre1-123-g6250672

2008-09-08 Thread Karolin Seeger
The branch, v3-3-stable has been updated
   via  6250672a4ced773c921a9696352173f59a8fd1e6 (commit)
   via  f692ca29e7aed788fc78f1f00abad5afcc2de7b8 (commit)
   via  aabd9385beae2650c507d06cc3c24a0415e26fd2 (commit)
   via  6d8616a4351ec3d0ebd71b3d7c97f818e688993d (commit)
   via  264116d614a7c4fc03fd63c2b9b2ba1559b2cb41 (commit)
   via  6a02c88b90994736fa22754f9c14dd4ff61fc46c (commit)
   via  deeceef67a3c7dcd376d439e4652ae4d3f813217 (commit)
   via  d15d5d86384122f20e9a0e045d0052be83676abb (commit)
   via  8e31d36cda61a40b61ed27919e1ea8e0e1e0e7f1 (commit)
   via  1240e055dbc8cfe5d1ab9505c9950facbed8d797 (commit)
   via  fdd4abfb65ce7aeffa949a23b13e95497e79522d (commit)
   via  52ff2f58811622263d6acc52a1d86887244ff15b (commit)
   via  791e93006da8ee9088d172855338b4200df313c3 (commit)
   via  78b2e1b3e334192ee9f6002e458f3884a0d6578f (commit)
   via  2075e99b29b0b035f3699c92ae942b0c40fb7e2a (commit)
   via  0365508e1d4c9942f1653b214e717c74a4b9f356 (commit)
   via  bc7c1351f68e522884b25c965dc61de27486fa27 (commit)
   via  ff23a124923669f3b8572d7ae1eb44db3a76d608 (commit)
   via  f7ed9a12e6d54bed41606cc6f011f59befc92c98 (commit)
   via  05528e203056263a78a7cdac6a731e871857490f (commit)
   via  8cffc5b6677dacede24ce08d495be93d7bf52151 (commit)
   via  760fded972bc18cdaf846e8e372be7547a7201bd (commit)
   via  85dc4e7f4da77c329051c3de4ab0a23b321181e5 (commit)
   via  0b7e88066a765a975c69079d4c62b1545fb9e2aa (commit)
   via  376b3e6f9ef82845b6a1b28226e2cc2af96ef52f (commit)
  from  bdb0a5d5fdbc331e11391f7b6e0aae963cebd3fc (commit)

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


- Log -
commit 6250672a4ced773c921a9696352173f59a8fd1e6
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Fri Sep 5 15:33:40 2008 -0700

Remove unecessary msync.
Jeremy.
(cherry picked from commit 24ea36f2c772468d4906145520b48f4857d4eeb7)

commit f692ca29e7aed788fc78f1f00abad5afcc2de7b8
Author: Qiao Yang [EMAIL PROTECTED]
Date:   Fri Sep 5 14:08:09 2008 +0200

Fix a memleak

request.extra_data is not freed if there is no extra_data in response or
when there is some error happens in processing. This patch will free the
buffer right after processing a request before sending back a response.
(cherry picked from commit be6f12273f171a3eb1967d2299064e57d737f6a4)
(cherry picked from commit c1fcc41bd96652b175b41421a5f6a9396c75e67f)

commit aabd9385beae2650c507d06cc3c24a0415e26fd2
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Fri Sep 5 11:48:36 2008 +0200

Do proper error handling if the socket is closed

This is a step in fixing bug 5707.

Thanks to Igor Galić [EMAIL PROTECTED] for reporting!

Volker
(cherry picked from commit 1558a5c1977b1f87600ec487238fa8db009f41fd)
(cherry picked from commit 6a561d311496569dd5db0c6d6461ce9c4896f142)

commit 6d8616a4351ec3d0ebd71b3d7c97f818e688993d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Fri Sep 5 11:39:38 2008 +0200

configure: fix typo in GNU ld version-script test.

Michael
(cherry picked from commit 0d9f3dfc4c139938ee57b6cf60c29cf4ce404be7)
(cherry picked from commit a943b154c6f86b22e77e56640d6dbe9a040f15e8)

commit 264116d614a7c4fc03fd63c2b9b2ba1559b2cb41
Author: James Ding [EMAIL PROTECTED]
Date:   Thu Sep 4 15:15:56 2008 -0700

Fix winbindd crash bug with trusted domains. Bug #5736
(cherry picked from commit ea4d67cc7ba4eb05f0761208d70849a42bf25864)

commit 6a02c88b90994736fa22754f9c14dd4ff61fc46c
Author: Herb Lewis [EMAIL PROTECTED]
Date:   Thu Sep 4 14:35:27 2008 -0700

get rid of unneeded argument in get_methods and get_alloc_methods
(cherry picked from commit 89347b57d57e287e0762e97f7870323279802c92)

commit deeceef67a3c7dcd376d439e4652ae4d3f813217
Author: Steven Danneman [EMAIL PROTECTED]
Date:   Wed Sep 3 15:31:39 2008 -0700

Cleanup of DC enumeration in get_dcs()

This is a fix for a few small inefficiencies/bugs in the get_dcs() path.

* because the third add_one_dc_unique() loop was outside the ADS check all 
DCs
  returned from the non-sitename lookup were being tacked onto the 
dc_name_ip
  list twice.
* add_one_dc_unique() now checks if the given IP address already exists 
before
  adding it to the list, making the returned list actually unique
* added more thorough doxygen comment headers
(cherry picked from commit 10996c444fcb7e2418c3e8f396cc631f6b325786)

commit d15d5d86384122f20e9a0e045d0052be83676abb
Author: Günther Deschner [EMAIL PROTECTED]
Date:   Thu Sep 4 15:11:22 2008 +0200

kerberos: fix indent of enc type lines in generated krb5.conf files.

Guenther
(cherry picked from commit 18a26f08b6fab4119a1421a7ca59c32dde8bb8cb)
(cherry picked from commit b737b0869066eafe5af4518692ec0a1522387031)

commit 

[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4055-g4bebce2

2008-09-08 Thread Michael Adam
The branch, v3-devel has been updated
   via  4bebce268a430a537215b46947e37a8b0225e49d (commit)
   via  5354e420677eacd62a5297bc38d62cd6b53642b5 (commit)
   via  68ec025d06058bcd1c7050ee5d8f7232a3eb901a (commit)
   via  f1f3d1bef0440f4294f7278c0c38e13a10b6fb48 (commit)
   via  c6ff392778a75cc74db880fa3d657f5879ae55d5 (commit)
   via  cbfd805bd25a23299ef770687370dafebefe58d1 (commit)
   via  ab7575f5d29576518bd5593ec5bd58846b85d23d (commit)
  from  fc1b04df78fc0fb5bc59fa0120c0e29bbb3978a1 (commit)

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


- Log -
commit 4bebce268a430a537215b46947e37a8b0225e49d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 8 14:09:41 2008 +0200

packaging(RHEL-CTDB): add fix for versions containing - signs.

Michael
(cherry picked from commit 423105e29aaef449dbc40d124900a3f654b7266b)

commit 5354e420677eacd62a5297bc38d62cd6b53642b5
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 8 13:11:17 2008 +0200

packaging(RHEL-CTDB): extend and slightly reformat comment header block

Michael
(cherry picked from commit 1bfc8cc575cd84f24ceb6f6c5d13c9171c0895a5)

commit 68ec025d06058bcd1c7050ee5d8f7232a3eb901a
Author: Michael Adam [EMAIL PROTECTED]
Date:   Mon Sep 8 13:08:18 2008 +0200

packaging(RHEL-CTDB): unify and extend (C) header

Michael
(cherry picked from commit e051c1cbf7a993e3885c4a515e516da3574a1f57)

commit f1f3d1bef0440f4294f7278c0c38e13a10b6fb48
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Sep 4 14:36:29 2008 +0200

packaging(RHEL-CTDB): autodetect the samba version number from version.h

Generate version.h first.
Create samba.spec from (new) samba.spec.tmpl, replacing PVERSION
by the version string. (as is done with update-pkginfo called
from the create-tarball release script)

Michael

commit c6ff392778a75cc74db880fa3d657f5879ae55d5
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Sep 4 14:10:45 2008 +0200

packaging(RHEL-CTDB): introduce variable TOPDIR

Michael
(cherry picked from commit 74e335ebf210c4812b0f790d05b697a183803af7)

commit cbfd805bd25a23299ef770687370dafebefe58d1
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Sep 4 14:09:36 2008 +0200

packaging(RHEL-CTDB): rename SPECDIR to RPMSPECDIR

Michael
(cherry picked from commit ac2b09b2274a12c34c446c4536793a33515958cc)

commit ab7575f5d29576518bd5593ec5bd58846b85d23d
Author: Michael Adam [EMAIL PROTECTED]
Date:   Thu Sep 4 14:09:15 2008 +0200

packaging(RHEL-CTDB): rename SRCDIR to RPMSRCDIR

Michael
(cherry picked from commit d8a8ea87439315ecf407a866a12e2993343af39c)

---

Summary of changes:
 packaging/RHEL-CTDB/makerpms.sh|   60 +++-
 .../RHEL-CTDB/{samba.spec = samba.spec.tmpl}  |2 +-
 2 files changed, 46 insertions(+), 16 deletions(-)
 rename packaging/RHEL-CTDB/{samba.spec = samba.spec.tmpl} (99%)


Changeset truncated at 500 lines:

diff --git a/packaging/RHEL-CTDB/makerpms.sh b/packaging/RHEL-CTDB/makerpms.sh
index 485c810..219982f 100755
--- a/packaging/RHEL-CTDB/makerpms.sh
+++ b/packaging/RHEL-CTDB/makerpms.sh
@@ -1,30 +1,34 @@
 #!/bin/sh
 # Copyright (C) John H Terpstra 1998-2002
-#   Gerald (Jerry) Carter 2003
+# Copyright (C) Gerald (Jerry) Carter 2003
+# Copyright (C) Michael Adam 2008
+
+# Script to build RPMs for RHEL from inside a git checkout.
 
 # The following allows environment variables to override the target directories
 #   the alternative is to have a file in your home directory calles .rpmmacros
 #   containing the following:
 #   %_topdir  /home/mylogin/redhat
 #
-# Note: Under this directory rpm expects to find the same directories that are 
under the
-#   /usr/src/redhat directory
-#
+# Note: Under this directory rpm expects to find the same directories
+# that are under the /usr/src/redhat directory.
 
-# set DOCS_TARBALL to the path to a docs release tarball in .tar.bz2 format
+# Set DOCS_TARBALL to the path to a docs release tarball in .tar.bz2 format.
 
 # extra options passed to rpmbuild
 EXTRA_OPTIONS=$1
 
-SPECDIR=`rpm --eval %_specdir`
-SRCDIR=`rpm --eval %_sourcedir`
+RPMSPECDIR=`rpm --eval %_specdir`
+RPMSRCDIR=`rpm --eval %_sourcedir`
 
-# At this point the SPECDIR and SRCDIR variables must have a value!
+# At this point the RPMSPECDIR and RPMSRCDIR variables must have a value!
 
 DIRNAME=$(dirname $0)
+TOPDIR=${DIRNAME}/../..
+SRCDIR=${TOPDIR}/source
+VERSION_H=${SRCDIR}/include/version.h
 
 SPECFILE=samba.spec
-VERSION=$(grep ^Version ${DIRNAME}/${SPECFILE} | sed -e 's/^Version:\ \+//')
 DOCS=docs.tar.bz2
 RPMVER=`rpm --version | awk '{print $3}'`
 RPM=rpmbuild
@@ -42,9 +46,35 @@ case $RPMVER in
;;
 esac
 
-pushd ${DIRNAME}/../..
+##
+## determine the samba version and create the SPEC file

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

2008-09-08 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  982fcfc1bd7fa24a9892670d8f725c21cccb3500 (commit)
  from  7150f8e89c93be7d122e19f650522be591544611 (commit)

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


- Log -
commit 982fcfc1bd7fa24a9892670d8f725c21cccb3500
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Tue Aug 26 14:16:44 2008 +0200

WHATSNEW: Up to 3.3.0pre2.

Karolin
(cherry picked from commit 6ebb74d76f7b09636473797fd8c775e040189124)

---

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


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 251a2cc..bddfbb9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,9 +1,9 @@
=
-   Release Notes for Samba 3.3.0pre1
-August 26, 2008
+   Release Notes for Samba 3.3.0pre2
+
=
 
-This is the first preview release of Samba 3.3.0.  This is *not*
+This is the second preview release of Samba 3.3.0.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.


-- 
Samba Shared Repository


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

2008-09-08 Thread Karolin Seeger
The branch, v3-2-test has been updated
   via  9082c77af4fb9fda6bb0a85810e454302130a71f (commit)
  from  b2fcb8b6b17302e5ec29914f4e3dde853ffe5283 (commit)

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


- Log -
commit 9082c77af4fb9fda6bb0a85810e454302130a71f
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Mon Sep 8 12:42:52 2008 +0200

WHATSNEW: Update changes since 3.2.3.

Karolin

---

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


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 7035285..9b31f35 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,30 +1,87 @@
==
-   Release Notes for Samba 3.2.3
- August, 27 2008
+   Release Notes for Samba 3.2.4
+
==
 
-This is a security release in order to address CVE-2008-3789 (Wrong
-permissions of group_mapping.ldb).
+This is a bug fix release of the Samba 3.2 series.
 
-   o CVE-2008-3789
- The file group_mapping.ldb is created with
- the permissions 0666. That means everyone
- is able to edit this file and might map any
- SID to root.
+Major bug fixes included in Samba 3.2.4 are:
 
-The original security announcement for this and past advisories can
-be found http://www.samba.org/samba/security/
+  o Fix changing of machine account passwords.
+  o Fix non guest connections to shares when security = share
+is used.
 
 
 ##
 Changes
 ###
 
-Changes since 3.2.2
+Changes since 3.2.3
 ---
 
+
+o   Michael Adam [EMAIL PROTECTED]
+* BUG 5590: Fix binary stripping on older OS.
+* Fix linking of cifs.upcall when nscd_flush_cache() is found.
+
+
+o   Jeremy Allison [EMAIL PROTECTED]
+* BUG 5697: Fix spinning of nmbd in reload_interfaces when only loopback
+  has an IPv4 address.
+* BUG 5698: Fix non guest connections to shares when security = share
+  is used.
+* BUG 5729: Explicitly allow -valid.
+* Fix the wcache_invalidate_samlogon calls.
+* Add st_birthtime and friends for accurate create times on *BSD and 
MacOSX.
+* Clarify usage of force create mode.
+
+
+o   Gerald (Jerry) Carter [EMAIL PROTECTED]
+* Fix Winbind crash.
+
+
+o   Steven Danneman [EMAIL PROTECTED]
+* Cleanup of DC enumeration in get_dcs().
+
+
+o   Günther Deschner [EMAIL PROTECTED]
+* BUG 5710: Fix changing of machine account passwords.
+* Fix several build warnings.
+* Fix invalid sid copy (hit when enumerating sibling domains) in Winbind.
+
+
+o   James Ding [EMAIL PROTECTED]
+* BUG 5736: Fix Winbind crash bug with trusted domains.
+
+
+o   Ephi Dror [EMAIL PROTECTED]
+* Correct the netsamlogon_clear_cached_user function.
+
+
+o   Jeff Layton [EMAIL PROTECTED]
+* Fix handling of MSKRB5 OID in cifs.upcall.
+* Fix build warning in cifs.upcall.
+
+
+o   Volker Lendecke [EMAIL PROTECTED]
+* BUG 5707: Do proper error handling if the socket is closed.
+* Fix Coverity ID 587.
+
+
+o   David Leonard [EMAIL PROTECTED]
+* BUG 4516: No IPv6 on Solaris 2.6.
+
+
 o   Andrew Tridgell [EMAIL PROTECTED]
-* Fix for CVE-2008-3789.
+* Avoid a race condition in glibc between AIO and setresuid().
+* Add missing become root for AIO operations.
+* Fix logic of tsmsm_sendfile().
+* Fix an errno handling bug that could lead to an infinite loop.
+* Fix handling of arbitrary new PAC types.
+
+
+o   Qiao Yang [EMAIL PROTECTED]
+* Fix a memleak.
 
 
 ##


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-3-52-g2436662

2008-09-08 Thread Karolin Seeger
The branch, v3-2-stable has been updated
   via  2436662f0f60ec4d29ebe3074e63a5995d89bd59 (commit)
  from  d3db59a5b171e9bb9662199699722a7a3a9f0a57 (commit)

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


- Log -
commit 2436662f0f60ec4d29ebe3074e63a5995d89bd59
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Mon Sep 8 12:42:52 2008 +0200

WHATSNEW: Update changes since 3.2.3.

Karolin
(cherry picked from commit 9082c77af4fb9fda6bb0a85810e454302130a71f)

---

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


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 7035285..9b31f35 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,30 +1,87 @@
==
-   Release Notes for Samba 3.2.3
- August, 27 2008
+   Release Notes for Samba 3.2.4
+
==
 
-This is a security release in order to address CVE-2008-3789 (Wrong
-permissions of group_mapping.ldb).
+This is a bug fix release of the Samba 3.2 series.
 
-   o CVE-2008-3789
- The file group_mapping.ldb is created with
- the permissions 0666. That means everyone
- is able to edit this file and might map any
- SID to root.
+Major bug fixes included in Samba 3.2.4 are:
 
-The original security announcement for this and past advisories can
-be found http://www.samba.org/samba/security/
+  o Fix changing of machine account passwords.
+  o Fix non guest connections to shares when security = share
+is used.
 
 
 ##
 Changes
 ###
 
-Changes since 3.2.2
+Changes since 3.2.3
 ---
 
+
+o   Michael Adam [EMAIL PROTECTED]
+* BUG 5590: Fix binary stripping on older OS.
+* Fix linking of cifs.upcall when nscd_flush_cache() is found.
+
+
+o   Jeremy Allison [EMAIL PROTECTED]
+* BUG 5697: Fix spinning of nmbd in reload_interfaces when only loopback
+  has an IPv4 address.
+* BUG 5698: Fix non guest connections to shares when security = share
+  is used.
+* BUG 5729: Explicitly allow -valid.
+* Fix the wcache_invalidate_samlogon calls.
+* Add st_birthtime and friends for accurate create times on *BSD and 
MacOSX.
+* Clarify usage of force create mode.
+
+
+o   Gerald (Jerry) Carter [EMAIL PROTECTED]
+* Fix Winbind crash.
+
+
+o   Steven Danneman [EMAIL PROTECTED]
+* Cleanup of DC enumeration in get_dcs().
+
+
+o   Günther Deschner [EMAIL PROTECTED]
+* BUG 5710: Fix changing of machine account passwords.
+* Fix several build warnings.
+* Fix invalid sid copy (hit when enumerating sibling domains) in Winbind.
+
+
+o   James Ding [EMAIL PROTECTED]
+* BUG 5736: Fix Winbind crash bug with trusted domains.
+
+
+o   Ephi Dror [EMAIL PROTECTED]
+* Correct the netsamlogon_clear_cached_user function.
+
+
+o   Jeff Layton [EMAIL PROTECTED]
+* Fix handling of MSKRB5 OID in cifs.upcall.
+* Fix build warning in cifs.upcall.
+
+
+o   Volker Lendecke [EMAIL PROTECTED]
+* BUG 5707: Do proper error handling if the socket is closed.
+* Fix Coverity ID 587.
+
+
+o   David Leonard [EMAIL PROTECTED]
+* BUG 4516: No IPv6 on Solaris 2.6.
+
+
 o   Andrew Tridgell [EMAIL PROTECTED]
-* Fix for CVE-2008-3789.
+* Avoid a race condition in glibc between AIO and setresuid().
+* Add missing become root for AIO operations.
+* Fix logic of tsmsm_sendfile().
+* Fix an errno handling bug that could lead to an infinite loop.
+* Fix handling of arbitrary new PAC types.
+
+
+o   Qiao Yang [EMAIL PROTECTED]
+* Fix a memleak.
 
 
 ##


-- 
Samba Shared Repository


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

2008-09-08 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  4df7f57b612a361b56a40b2591ac8b1d9c899d8c (commit)
  from  982fcfc1bd7fa24a9892670d8f725c21cccb3500 (commit)

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


- Log -
commit 4df7f57b612a361b56a40b2591ac8b1d9c899d8c
Author: Karolin Seeger [EMAIL PROTECTED]
Date:   Mon Sep 8 15:44:07 2008 +0200

WHATSNEW: Add changes since 3.3.0pre1.

Karolin

---

Summary of changes:
 WHATSNEW.txt |   53 +++--
 1 files changed, 51 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index bddfbb9..237b7ec 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -53,8 +53,7 @@ parameter, instead with idmap backend the default idmap 
backend is
 specified.
 
 Accordingly, the idmap config domain : default = yes setting is no
-longer being looked at. As another simplification, there can be only one
-allocating backend.
+longer being looked at.
 
 The alloc backend defaults to the default backend, which should be able to
 allocate IDs. In the default distribution the tdb and ldap backends can
@@ -87,6 +86,56 @@ smb.conf changes
 winbind reconnect delayNew 30
 
 
+Changes since 3.3.0pre1:
+
+
+
+o   Jeremy Allison [EMAIL PROTECTED]
+* BUG 5729: Explicitly allow -valid.
+* Add st_birthtime and friends for accurate create times on *BSD
+  and MacOSX).
+* Fix the wcache_invalidate_samlogon calls.
+* Clarify usage of force create mode.
+* Get smbd to look (read-only) into the winbindd cache for uid/gid -- sid
+  mappings.
+
+
+o   Steven Danneman [EMAIL PROTECTED]
+* Cleanup of DC enumeration in get_dcs().
+
+
+o   Günther Deschner [EMAIL PROTECTED]
+* BUG 5710: Fix changing of machine account passwords.
+* Fix invalid sid copy (hit when enumerating sibling domains) in Winbind.
+
+
+o   James Ding [EMAIL PROTECTED]
+* BUG 5736: Fix Winbind crash bug with trusted domains.
+
+
+o   Ephi Dror [EMAIL PROTECTED]
+* Correct the netsamlogon_clear_cached_user function.
+
+
+o   Volker Lendecke [EMAIL PROTECTED]
+* Fix Coverity IDs 587 and 589.
+* Increase the default positive idmap cache time to a week.
+* BUG 5707: Do proper error handling if the socket is closed.
+
+
+o   Andrew Tridgell [EMAIL PROTECTED]
+* Fix permissions of group_mapping.ldb (CVE-2008-3789).
+* Avoid a race condition in glibc between AIO and setresuid().
+* Add missing become root for AIO operations.
+* Fix an errno handling bug that could lead to an infinite loop.
+* Fix logic of tsmsm_sendfile().
+* Fix handling of arbitrary new PAC types.
+
+
+o   Qiao Yang [EMAIL PROTECTED]
+* Fix a memleak.
+
+
 Commit Highlights:
 --
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4056-g564bfe9

2008-09-08 Thread Volker Lendecke
The branch, v3-devel has been updated
   via  564bfe94ac87c918482ade65980270326dc8ed6d (commit)
  from  4bebce268a430a537215b46947e37a8b0225e49d (commit)

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


- Log -
commit 564bfe94ac87c918482ade65980270326dc8ed6d
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 15:57:15 2008 +0200

Remove some duplicate code

---

Summary of changes:
 source/lib/sharesec.c |7 +--
 1 files changed, 1 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/sharesec.c b/source/lib/sharesec.c
index 438..5eaa25a 100644
--- a/source/lib/sharesec.c
+++ b/source/lib/sharesec.c
@@ -29,12 +29,7 @@ static struct db_context *share_db; /* used for share 
security descriptors */
 
 /* Map generic permissions to file object specific permissions */
 
-static const struct generic_mapping file_generic_mapping = {
-FILE_GENERIC_READ,
-FILE_GENERIC_WRITE,
-FILE_GENERIC_EXECUTE,
-FILE_GENERIC_ALL
-};
+const struct generic_mapping file_generic_mapping;
 
 static int delete_fn(struct db_record *rec, void *priv)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-481-g66b8c8d

2008-09-08 Thread Stefan Metzmacher
The branch, v4-0-test has been updated
   via  66b8c8d80e1c8e45ab6ca38cabebea07aa122c40 (commit)
   via  051164ba0a69d54aa706ffa876059e8dbbeacb36 (commit)
   via  f81014db9d5afbf9e0b1c007bc56fc1d3a201309 (commit)
   via  13d051cd633f4a4152d360453fe5297ad53cc7b5 (commit)
  from  39367ef15fabbb52cd2c05be7ca59b25dc4aff71 (commit)

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


- Log -
commit 66b8c8d80e1c8e45ab6ca38cabebea07aa122c40
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 14:11:17 2008 +0200

BASE-DELAYWRITE: test behavior of SMBwrite truncate, writeX, SMBwrite 
truncate and writeX again

metze

commit 051164ba0a69d54aa706ffa876059e8dbbeacb36
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 13:59:51 2008 +0200

BASE-DELAYWRITE: test behavior of writeX, SMBwrite truncate, writeX and 
SMBwrite again

metze

commit f81014db9d5afbf9e0b1c007bc56fc1d3a201309
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 12:27:43 2008 +0200

BASE-DELAYWRITE: demonstrate that a truncate write doesn't update the write 
time after SET_FILE_INFO

metze

commit 13d051cd633f4a4152d360453fe5297ad53cc7b5
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 12:12:25 2008 +0200

BASE-DELAYWRITE: demonstrate that the time between the open and the first 
write doesn't matter

metze

---

Summary of changes:
 source/torture/basic/delaywrite.c |  726 +
 1 files changed, 726 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/basic/delaywrite.c 
b/source/torture/basic/delaywrite.c
index 6e718a1..4f6d4fd 100644
--- a/source/torture/basic/delaywrite.c
+++ b/source/torture/basic/delaywrite.c
@@ -1589,6 +1589,572 @@ static bool test_delayed_write_update3(struct 
torture_context *tctx,
return ret;
 }
 
+static bool test_delayed_write_update3a(struct torture_context *tctx,
+   struct smbcli_state *cli,
+   struct smbcli_state *cli2)
+{
+   union smb_fileinfo finfo0, finfo1, finfo2, finfo3, finfo4;
+   union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4, pinfo5;
+   const char *fname = BASEDIR \\torture_file.txt;
+   int fnum1 = -1;
+   bool ret = true;
+   ssize_t written;
+   int i;
+   struct timeval start;
+   struct timeval end;
+   int used_delay = torture_setting_int(tctx, writetimeupdatedelay, 
200);
+   int normal_delay = 200;
+   double sec = ((double)used_delay) / ((double)normal_delay);
+   int msec = 1000 * sec;
+
+   if (!torture_setup_dir(cli, BASEDIR)) {
+   return false;
+   }
+
+   torture_comment(tctx, Open the file handle\n);
+   fnum1 = smbcli_open(cli-tree, fname, O_RDWR|O_CREAT, DENY_NONE);
+   if (fnum1 == -1) {
+   ret = false;
+   torture_result(tctx, TORTURE_FAIL, __location__: unable to 
open %s, fname);
+   goto done;
+   }
+
+   finfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO;
+   finfo0.basic_info.in.file.fnum = fnum1;
+   finfo1 = finfo0;
+   finfo2 = finfo0;
+   finfo3 = finfo0;
+   finfo4 = finfo0;
+   pinfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO;
+   pinfo0.basic_info.in.file.path = fname;
+   pinfo1 = pinfo0;
+   pinfo2 = pinfo0;
+   pinfo3 = pinfo0;
+   pinfo4 = pinfo0;
+   pinfo5 = pinfo0;
+
+   /* get the initial times */
+   GET_INFO_BOTH(finfo0,pinfo0);
+
+   /*
+* sleep some time, to demonstrate the handling of write times
+* doesn't depend on the time since the open
+*/
+   msleep(5 * msec);
+
+   /* get the initial times */
+   GET_INFO_BOTH(finfo1,pinfo1);
+   COMPARE_WRITE_TIME_EQUAL(finfo1, finfo0);
+
+   /*
+* make sure the write time is updated 2 seconds later
+* calcuated from the first write
+* (but expect upto 5 seconds extra time for a busy server)
+*/
+   start = timeval_current();
+   end = timeval_add(start, 7 * sec, 0);
+   while (!timeval_expired(end)) {
+   /* do a write */
+   torture_comment(tctx, Do a write on the file handle\n);
+   written = smbcli_write(cli-tree, fnum1, 0, x, 0, 1);
+   if (written != 1) {
+   torture_result(tctx, TORTURE_FAIL, __location__: 
written gave %d - should have been 1, (int)written);
+   ret = false;
+   goto done;
+   }
+   /* get the times after the write */
+   GET_INFO_FILE(finfo1);
+
+   if (finfo1.basic_info.out.write_time  
finfo0.basic_info.out.write_time) {
+   

[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4057-g3d17089

2008-09-08 Thread Stefan Metzmacher
The branch, v3-devel has been updated
   via  3d17089b6dc773303c8c553f3f6140e60e348fb7 (commit)
  from  564bfe94ac87c918482ade65980270326dc8ed6d (commit)

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


- Log -
commit 3d17089b6dc773303c8c553f3f6140e60e348fb7
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 15:12:24 2008 +0200

smbd: some write time fixes

- only the first non truncating write causes
  the write time update with 2 seconds delay.
  It's not enough to check for an existing update event
  as it will be NULL after the event was triggered.

- SMBwrite truncates always update the write time
  unless the sticky write time is set.

- SMBwrite truncates don't trigger a write time update on close.

metze

---

Summary of changes:
 source/include/smb.h |1 +
 source/smbd/fileio.c |   15 +++
 2 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/smb.h b/source/include/smb.h
index d450eb5..c8c4f8c 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -456,6 +456,7 @@ typedef struct files_struct {
uint32 access_mask; /* NTCreateX access bits 
(FILE_READ_DATA etc.) */
uint32 share_access;/* NTCreateX share constants 
(FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
 
+   bool update_write_time_triggered;
struct timed_event *update_write_time_event;
bool update_write_time_on_close;
struct timespec close_write_time;
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c
index 63850f2..0958418 100644
--- a/source/smbd/fileio.c
+++ b/source/smbd/fileio.c
@@ -202,12 +202,13 @@ void trigger_write_time_update(struct files_struct *fsp)
return;
}
 
-   if (fsp-update_write_time_event) {
+   if (fsp-update_write_time_triggered) {
/*
 * No point - an event is already scheduled.
 */
return;
}
+   fsp-update_write_time_triggered = true;
 
delay = lp_parm_int(SNUM(fsp-conn),
smbd, writetimeupdatedelay,
@@ -232,14 +233,12 @@ void trigger_write_time_update_immediate(struct 
files_struct *fsp)
 return;
 }
 
-if (fsp-update_write_time_event) {
-   /*
-* No point - an event is already scheduled.
-*/
-return;
-}
+   TALLOC_FREE(fsp-update_write_time_event);
+   DEBUG(5, (Update write time immediate on %s\n, fsp-fsp_name));
+
+   fsp-update_write_time_triggered = true;
 
-fsp-update_write_time_on_close = true;
+fsp-update_write_time_on_close = false;
update_write_time(fsp);
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4058-gb62540c

2008-09-08 Thread Volker Lendecke
The branch, v3-devel has been updated
   via  b62540cd48212a80c8cb4a264f740591a0229944 (commit)
  from  3d17089b6dc773303c8c553f3f6140e60e348fb7 (commit)

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


- Log -
commit b62540cd48212a80c8cb4a264f740591a0229944
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 16:23:36 2008 +0200

Thanks metze for pointing out the missing extern :-)

---

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


Changeset truncated at 500 lines:

diff --git a/source/lib/sharesec.c b/source/lib/sharesec.c
index 5eaa25a..33f66ca 100644
--- a/source/lib/sharesec.c
+++ b/source/lib/sharesec.c
@@ -29,7 +29,7 @@ static struct db_context *share_db; /* used for share 
security descriptors */
 
 /* Map generic permissions to file object specific permissions */
 
-const struct generic_mapping file_generic_mapping;
+extern const struct generic_mapping file_generic_mapping;
 
 static int delete_fn(struct db_record *rec, void *priv)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4059-gdbe7a61

2008-09-08 Thread Volker Lendecke
The branch, v3-devel has been updated
   via  dbe7a61be2beac50d1665e38ac374cefbbabec00 (commit)
  from  b62540cd48212a80c8cb4a264f740591a0229944 (commit)

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


- Log -
commit dbe7a61be2beac50d1665e38ac374cefbbabec00
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 16:42:06 2008 +0200

When setting an NFSv4 ACL, map generic bits

---

Summary of changes:
 source/modules/nfs4_acls.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index dc1b70c..9e28db8 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -25,6 +25,8 @@
 
 #define SMBACL4_PARAM_TYPE_NAME nfs4
 
+extern const struct generic_mapping file_generic_mapping;
+
 #define SMB_ACE4_INT_MAGIC 0x76F8A967
 typedef struct _SMB_ACE4_INT_T
 {
@@ -528,6 +530,8 @@ static bool smbacl4_fill_ace4(
ace_v4-aceMask = ace_nt-access_mask 
(STD_RIGHT_ALL_ACCESS | SA_RIGHT_FILE_ALL_ACCESS);
 
+   se_map_generic(ace_v4-aceMask, file_generic_mapping);
+
if (ace_v4-aceFlags!=ace_nt-flags)
DEBUG(9, (ace_v4-aceFlags(0x%x)!=ace_nt-flags(0x%x)\n,
ace_v4-aceFlags, ace_nt-flags));


-- 
Samba Shared Repository


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

2008-09-08 Thread Volker Lendecke
The branch, v3-3-test has been updated
   via  77b3ca1a4be4ae780186ab4d46ec114b8dea41a8 (commit)
  from  4df7f57b612a361b56a40b2591ac8b1d9c899d8c (commit)

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


- Log -
commit 77b3ca1a4be4ae780186ab4d46ec114b8dea41a8
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 16:42:06 2008 +0200

When setting an NFSv4 ACL, map generic bits
(cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00)

---

Summary of changes:
 source/modules/nfs4_acls.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index dc1b70c..9e28db8 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -25,6 +25,8 @@
 
 #define SMBACL4_PARAM_TYPE_NAME nfs4
 
+extern const struct generic_mapping file_generic_mapping;
+
 #define SMB_ACE4_INT_MAGIC 0x76F8A967
 typedef struct _SMB_ACE4_INT_T
 {
@@ -528,6 +530,8 @@ static bool smbacl4_fill_ace4(
ace_v4-aceMask = ace_nt-access_mask 
(STD_RIGHT_ALL_ACCESS | SA_RIGHT_FILE_ALL_ACCESS);
 
+   se_map_generic(ace_v4-aceMask, file_generic_mapping);
+
if (ace_v4-aceFlags!=ace_nt-flags)
DEBUG(9, (ace_v4-aceFlags(0x%x)!=ace_nt-flags(0x%x)\n,
ace_v4-aceFlags, ace_nt-flags));


-- 
Samba Shared Repository


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

2008-09-08 Thread Volker Lendecke
The branch, v3-2-test has been updated
   via  c2faa48abce1d656527b89f601e084e3ba70e36d (commit)
  from  9082c77af4fb9fda6bb0a85810e454302130a71f (commit)

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


- Log -
commit c2faa48abce1d656527b89f601e084e3ba70e36d
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 16:42:06 2008 +0200

When setting an NFSv4 ACL, map generic bits
(cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00)

---

Summary of changes:
 source/modules/nfs4_acls.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index 0c3d010..5e90afa 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -25,6 +25,8 @@
 
 #define SMBACL4_PARAM_TYPE_NAME nfs4
 
+extern const struct generic_mapping file_generic_mapping;
+
 #define SMB_ACE4_INT_MAGIC 0x76F8A967
 typedef struct _SMB_ACE4_INT_T
 {
@@ -529,6 +531,8 @@ static bool smbacl4_fill_ace4(
ace_v4-aceMask = ace_nt-access_mask 
(STD_RIGHT_ALL_ACCESS | SA_RIGHT_FILE_ALL_ACCESS);
 
+   se_map_generic(ace_v4-aceMask, file_generic_mapping);
+
if (ace_v4-aceFlags!=ace_nt-flags)
DEBUG(9, (ace_v4-aceFlags(0x%x)!=ace_nt-flags(0x%x)\n,
ace_v4-aceFlags, ace_nt-flags));


-- 
Samba Shared Repository


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

2008-09-08 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  be8ac33179f56296118435e2732ccffdf7ddd305 (commit)
  from  77b3ca1a4be4ae780186ab4d46ec114b8dea41a8 (commit)

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


- Log -
commit be8ac33179f56296118435e2732ccffdf7ddd305
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 15:12:24 2008 +0200

smbd: some write time fixes

- only the first non truncating write causes
  the write time update with 2 seconds delay.
  It's not enough to check for an existing update event
  as it will be NULL after the event was triggered.

- SMBwrite truncates always update the write time
  unless the sticky write time is set.

- SMBwrite truncates don't trigger a write time update on close.

metze

---

Summary of changes:
 source/include/smb.h |1 +
 source/smbd/fileio.c |   15 +++
 2 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/smb.h b/source/include/smb.h
index d450eb5..c8c4f8c 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -456,6 +456,7 @@ typedef struct files_struct {
uint32 access_mask; /* NTCreateX access bits 
(FILE_READ_DATA etc.) */
uint32 share_access;/* NTCreateX share constants 
(FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
 
+   bool update_write_time_triggered;
struct timed_event *update_write_time_event;
bool update_write_time_on_close;
struct timespec close_write_time;
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c
index 63850f2..0958418 100644
--- a/source/smbd/fileio.c
+++ b/source/smbd/fileio.c
@@ -202,12 +202,13 @@ void trigger_write_time_update(struct files_struct *fsp)
return;
}
 
-   if (fsp-update_write_time_event) {
+   if (fsp-update_write_time_triggered) {
/*
 * No point - an event is already scheduled.
 */
return;
}
+   fsp-update_write_time_triggered = true;
 
delay = lp_parm_int(SNUM(fsp-conn),
smbd, writetimeupdatedelay,
@@ -232,14 +233,12 @@ void trigger_write_time_update_immediate(struct 
files_struct *fsp)
 return;
 }
 
-if (fsp-update_write_time_event) {
-   /*
-* No point - an event is already scheduled.
-*/
-return;
-}
+   TALLOC_FREE(fsp-update_write_time_event);
+   DEBUG(5, (Update write time immediate on %s\n, fsp-fsp_name));
+
+   fsp-update_write_time_triggered = true;
 
-fsp-update_write_time_on_close = true;
+fsp-update_write_time_on_close = false;
update_write_time(fsp);
 }
 


-- 
Samba Shared Repository


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

2008-09-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  142a9703ae19a467a23ee72429f899dae156df64 (commit)
  from  c2faa48abce1d656527b89f601e084e3ba70e36d (commit)

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


- Log -
commit 142a9703ae19a467a23ee72429f899dae156df64
Author: Stefan Metzmacher [EMAIL PROTECTED]
Date:   Mon Sep 8 15:12:24 2008 +0200

smbd: some write time fixes

- only the first non truncating write causes
  the write time update with 2 seconds delay.
  It's not enough to check for an existing update event
  as it will be NULL after the event was triggered.

- SMBwrite truncates always update the write time
  unless the sticky write time is set.

- SMBwrite truncates don't trigger a write time update on close.

metze

---

Summary of changes:
 source/include/smb.h |1 +
 source/smbd/fileio.c |   15 +++
 2 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/smb.h b/source/include/smb.h
index 5194c73..3c7058f 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -487,6 +487,7 @@ typedef struct files_struct {
uint32 access_mask; /* NTCreateX access bits 
(FILE_READ_DATA etc.) */
uint32 share_access;/* NTCreateX share constants 
(FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
 
+   bool update_write_time_triggered;
struct timed_event *update_write_time_event;
bool update_write_time_on_close;
struct timespec close_write_time;
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c
index 63850f2..0958418 100644
--- a/source/smbd/fileio.c
+++ b/source/smbd/fileio.c
@@ -202,12 +202,13 @@ void trigger_write_time_update(struct files_struct *fsp)
return;
}
 
-   if (fsp-update_write_time_event) {
+   if (fsp-update_write_time_triggered) {
/*
 * No point - an event is already scheduled.
 */
return;
}
+   fsp-update_write_time_triggered = true;
 
delay = lp_parm_int(SNUM(fsp-conn),
smbd, writetimeupdatedelay,
@@ -232,14 +233,12 @@ void trigger_write_time_update_immediate(struct 
files_struct *fsp)
 return;
 }
 
-if (fsp-update_write_time_event) {
-   /*
-* No point - an event is already scheduled.
-*/
-return;
-}
+   TALLOC_FREE(fsp-update_write_time_event);
+   DEBUG(5, (Update write time immediate on %s\n, fsp-fsp_name));
+
+   fsp-update_write_time_triggered = true;
 
-fsp-update_write_time_on_close = true;
+fsp-update_write_time_on_close = false;
update_write_time(fsp);
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4060-gef3c132

2008-09-08 Thread Volker Lendecke
The branch, v3-devel has been updated
   via  ef3c132b8455c6fe4d0bb9f0be881040a806a4ed (commit)
  from  dbe7a61be2beac50d1665e38ac374cefbbabec00 (commit)

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


- Log -
commit ef3c132b8455c6fe4d0bb9f0be881040a806a4ed
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 22:53:50 2008 +0200

Fix calculation of useable_space for trans2 and nttrans replies

When alignment was in place, we pretended to send more data/params 
according to
the param_offset/param_length and data_offset/data_length parameters than 
would
actually fit into the SMB according to the NBSS length field.

---

Summary of changes:
 source/smbd/nttrans.c |   22 ++
 source/smbd/trans2.c  |   15 +--
 2 files changed, 19 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index b695127..567c428 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -91,14 +91,11 @@ void send_nt_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /*
-* useable_space can never be more than max_send minus the
-* alignment offset.
-*/
-
-   useable_space = MIN(useable_space,
-   max_send - 
(alignment_offset+data_alignment_offset));
-
+   if (useable_space  0) {
+   DEBUG(0, (send_nt_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_nt_replies: srv_send_smb failed.);
+   }
 
while (params_to_send || data_to_send) {
 
@@ -106,8 +103,7 @@ void send_nt_replies(connection_struct *conn,
 * Calculate whether we will totally or partially fill this 
packet.
 */
 
-   total_sent_thistime = params_to_send + data_to_send +
-   alignment_offset + 
data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/*
 * We can never send more than useable_space.
@@ -115,7 +111,9 @@ void send_nt_replies(connection_struct *conn,
 
total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 18, total_sent_thistime);
+   reply_outbuf(req, 18,
+total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/*
 * Set total params and data to be sent.
@@ -242,7 +240,7 @@ void send_nt_replies(connection_struct *conn,
if(params_to_send  0 || data_to_send  0) {
DEBUG(0,(send_nt_replies failed sanity check pts = %d, 
dts = %d\n!!!,
params_to_send, data_to_send));
-   return;
+   exit_server_cleanly(send_nt_replies: internal error);
}
}
 }
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 8d839b6..3c17533 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -744,14 +744,16 @@ void send_trans2_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /* useable_space can never be more than max_send minus the alignment 
offset. */
-
-   useable_space = MIN(useable_space, max_send - 
(alignment_offset+data_alignment_offset));
+   if (useable_space  0) {
+   DEBUG(0, (send_trans2_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_trans2_replies: Not enough space);
+   }
 
while (params_to_send || data_to_send) {
/* Calculate whether we will totally or partially fill this 
packet */
 
-   total_sent_thistime = params_to_send + data_to_send + 
alignment_offset + data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/* We can never send more than useable_space */
/*
@@ -761,9 +763,10 @@ void send_trans2_replies(connection_struct *conn,
 * are sent here. Fix from [EMAIL PROTECTED]
 */
 
-   total_sent_thistime = MIN(total_sent_thistime, useable_space+ 
alignment_offset + data_alignment_offset);
+   total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 10, total_sent_thistime);
+   reply_outbuf(req, 10, total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/* Set total 

[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-482-g6f89e72

2008-09-08 Thread Jeremy Allison
The branch, v4-0-test has been updated
   via  6f89e728272ca14f0ed9557485e21647c0731ef2 (commit)
  from  66b8c8d80e1c8e45ab6ca38cabebea07aa122c40 (commit)

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


- Log -
commit 6f89e728272ca14f0ed9557485e21647c0731ef2
Author: Jeremy Allison [EMAIL PROTECTED]
Date:   Mon Sep 8 14:58:58 2008 -0700

Make it easier to see when tests start/end.
Jeremy.

---

Summary of changes:
 source/torture/basic/delaywrite.c |   67 
 1 files changed, 52 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/basic/delaywrite.c 
b/source/torture/basic/delaywrite.c
index 4f6d4fd..7056023 100644
--- a/source/torture/basic/delaywrite.c
+++ b/source/torture/basic/delaywrite.c
@@ -47,6 +47,8 @@ static bool test_delayed_write_update(struct torture_context 
*tctx, struct smbcl
double sec = ((double)used_delay) / ((double)normal_delay);
int msec = 1000 * sec;
 
+   torture_comment(tctx, \nRunning test_delayed_write_update\n);
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -144,6 +146,8 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
int msec = 1000 * sec;
char buf[2048];
 
+   torture_comment(tctx, \nRunning test_delayed_write_update1\n);
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -199,7 +203,8 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
}
 
if (finfo2.all_info.out.size != 1024) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated, size = %u (should be 
1024)\n,
+   (unsigned int)finfo2.all_info.out.size));
ret = false;
break;
}
@@ -253,7 +258,8 @@ static bool test_delayed_write_update1(struct 
torture_context *tctx, struct smbc
}
 
if (finfo3.all_info.out.size != 1024) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated, size = %u (should be 
1024)\n,
+   (unsigned int)finfo3.all_info.out.size));
ret = false;
break;
}
@@ -321,6 +327,8 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
int msec = 1000 * sec;
char buf[2048];
 
+   torture_comment(tctx, \nRunning test_delayed_write_update1a\n);
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -376,7 +384,8 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
}
 
if (finfo2.all_info.out.size != 10240) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated, size = %u (should be 
10240)\n,
+   (unsigned int)finfo2.all_info.out.size));
ret = false;
break;
}
@@ -430,7 +439,8 @@ static bool test_delayed_write_update1a(struct 
torture_context *tctx, struct smb
}
 
if (finfo3.all_info.out.size != 10240) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated, size = %u (should be 
10240)\n,
+   (unsigned int)finfo3.all_info.out.size));
ret = false;
break;
}
@@ -498,6 +508,8 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
int msec = 1000 * sec;
char buf[2048];
 
+   torture_comment(tctx, \nRunning test_delayed_write_update1b\n);
+
if (!torture_setup_dir(cli, BASEDIR)) {
return false;
}
@@ -553,7 +565,8 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
}
 
if (finfo2.all_info.out.size != 10240) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated (size = %u, should be 
10240)\n,
+   (unsigned int)finfo2.all_info.out.size ));
ret = false;
break;
}
@@ -607,7 +620,8 @@ static bool test_delayed_write_update1b(struct 
torture_context *tctx, struct smb
}
 
if (finfo3.all_info.out.size != 10240) {
-   DEBUG(0, (file not truncated\n));
+   DEBUG(0, (file not truncated (size = %u, should be 

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

2008-09-08 Thread Jeremy Allison
The branch, v3-3-test has been updated
   via  a18cd579160ea3b70e43895a2a83f7734014f091 (commit)
  from  be8ac33179f56296118435e2732ccffdf7ddd305 (commit)

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


- Log -
commit a18cd579160ea3b70e43895a2a83f7734014f091
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 22:53:50 2008 +0200

Fix calculation of useable_space for trans2 and nttrans replies

When alignment was in place, we pretended to send more data/params 
according to
the param_offset/param_length and data_offset/data_length parameters than 
would
actually fit into the SMB according to the NBSS length field.

---

Summary of changes:
 source/smbd/nttrans.c |   22 ++
 source/smbd/trans2.c  |   15 +--
 2 files changed, 19 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index b695127..567c428 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -91,14 +91,11 @@ void send_nt_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /*
-* useable_space can never be more than max_send minus the
-* alignment offset.
-*/
-
-   useable_space = MIN(useable_space,
-   max_send - 
(alignment_offset+data_alignment_offset));
-
+   if (useable_space  0) {
+   DEBUG(0, (send_nt_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_nt_replies: srv_send_smb failed.);
+   }
 
while (params_to_send || data_to_send) {
 
@@ -106,8 +103,7 @@ void send_nt_replies(connection_struct *conn,
 * Calculate whether we will totally or partially fill this 
packet.
 */
 
-   total_sent_thistime = params_to_send + data_to_send +
-   alignment_offset + 
data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/*
 * We can never send more than useable_space.
@@ -115,7 +111,9 @@ void send_nt_replies(connection_struct *conn,
 
total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 18, total_sent_thistime);
+   reply_outbuf(req, 18,
+total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/*
 * Set total params and data to be sent.
@@ -242,7 +240,7 @@ void send_nt_replies(connection_struct *conn,
if(params_to_send  0 || data_to_send  0) {
DEBUG(0,(send_nt_replies failed sanity check pts = %d, 
dts = %d\n!!!,
params_to_send, data_to_send));
-   return;
+   exit_server_cleanly(send_nt_replies: internal error);
}
}
 }
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 8d839b6..3c17533 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -744,14 +744,16 @@ void send_trans2_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /* useable_space can never be more than max_send minus the alignment 
offset. */
-
-   useable_space = MIN(useable_space, max_send - 
(alignment_offset+data_alignment_offset));
+   if (useable_space  0) {
+   DEBUG(0, (send_trans2_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_trans2_replies: Not enough space);
+   }
 
while (params_to_send || data_to_send) {
/* Calculate whether we will totally or partially fill this 
packet */
 
-   total_sent_thistime = params_to_send + data_to_send + 
alignment_offset + data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/* We can never send more than useable_space */
/*
@@ -761,9 +763,10 @@ void send_trans2_replies(connection_struct *conn,
 * are sent here. Fix from [EMAIL PROTECTED]
 */
 
-   total_sent_thistime = MIN(total_sent_thistime, useable_space+ 
alignment_offset + data_alignment_offset);
+   total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 10, total_sent_thistime);
+   reply_outbuf(req, 10, total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/* Set total 

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

2008-09-08 Thread Jeremy Allison
The branch, v3-2-test has been updated
   via  2ae870aead5e0ea7e7f9f6f9730f989ae34755b9 (commit)
  from  142a9703ae19a467a23ee72429f899dae156df64 (commit)

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


- Log -
commit 2ae870aead5e0ea7e7f9f6f9730f989ae34755b9
Author: Volker Lendecke [EMAIL PROTECTED]
Date:   Mon Sep 8 22:53:50 2008 +0200

Fix calculation of useable_space for trans2 and nttrans replies

When alignment was in place, we pretended to send more data/params 
according to
the param_offset/param_length and data_offset/data_length parameters than 
would
actually fit into the SMB according to the NBSS length field.

---

Summary of changes:
 source/smbd/nttrans.c |   22 ++
 source/smbd/trans2.c  |   15 +--
 2 files changed, 19 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 0b48fa2..13caf77 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -113,14 +113,11 @@ void send_nt_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /*
-* useable_space can never be more than max_send minus the
-* alignment offset.
-*/
-
-   useable_space = MIN(useable_space,
-   max_send - 
(alignment_offset+data_alignment_offset));
-
+   if (useable_space  0) {
+   DEBUG(0, (send_nt_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_nt_replies: srv_send_smb failed.);
+   }
 
while (params_to_send || data_to_send) {
 
@@ -128,8 +125,7 @@ void send_nt_replies(connection_struct *conn,
 * Calculate whether we will totally or partially fill this 
packet.
 */
 
-   total_sent_thistime = params_to_send + data_to_send +
-   alignment_offset + 
data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/*
 * We can never send more than useable_space.
@@ -137,7 +133,9 @@ void send_nt_replies(connection_struct *conn,
 
total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 18, total_sent_thistime);
+   reply_outbuf(req, 18,
+total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/*
 * Set total params and data to be sent.
@@ -264,7 +262,7 @@ void send_nt_replies(connection_struct *conn,
if(params_to_send  0 || data_to_send  0) {
DEBUG(0,(send_nt_replies failed sanity check pts = %d, 
dts = %d\n!!!,
params_to_send, data_to_send));
-   return;
+   exit_server_cleanly(send_nt_replies: internal error);
}
}
 }
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 2cb8269..7753fad 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -737,14 +737,16 @@ void send_trans2_replies(connection_struct *conn,
+ alignment_offset
+ data_alignment_offset);
 
-   /* useable_space can never be more than max_send minus the alignment 
offset. */
-
-   useable_space = MIN(useable_space, max_send - 
(alignment_offset+data_alignment_offset));
+   if (useable_space  0) {
+   DEBUG(0, (send_trans2_replies failed sanity useable_space 
+ = %d!!!, useable_space));
+   exit_server_cleanly(send_trans2_replies: Not enough space);
+   }
 
while (params_to_send || data_to_send) {
/* Calculate whether we will totally or partially fill this 
packet */
 
-   total_sent_thistime = params_to_send + data_to_send + 
alignment_offset + data_alignment_offset;
+   total_sent_thistime = params_to_send + data_to_send;
 
/* We can never send more than useable_space */
/*
@@ -754,9 +756,10 @@ void send_trans2_replies(connection_struct *conn,
 * are sent here. Fix from [EMAIL PROTECTED]
 */
 
-   total_sent_thistime = MIN(total_sent_thistime, useable_space+ 
alignment_offset + data_alignment_offset);
+   total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-   reply_outbuf(req, 10, total_sent_thistime);
+   reply_outbuf(req, 10, total_sent_thistime + alignment_offset
++ data_alignment_offset);
 
/* Set 

Build status as of Tue Sep 9 00:00:02 2008

2008-09-08 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2008-09-08 
00:00:31.0 +
+++ /home/build/master/cache/broken_results.txt 2008-09-09 00:00:34.0 
+
@@ -1,23 +1,23 @@
-Build status as of Mon Sep  8 00:00:02 2008
+Build status as of Tue Sep  9 00:00:02 2008
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   33 9  0 
+ccache   33 8  0 
 ctdb 0  0  0 
 distcc   1  0  0 
 ldb  33 32 0 
-libreplace   32 12 0 
-lorikeet-heimdal 29 21 0 
-pidl 20 10 0 
-ppp  13 0  0 
+libreplace   32 11 0 
+lorikeet-heimdal 28 21 0 
+pidl 20 11 0 
+ppp  14 0  0 
 rsync33 11 0 
 samba-docs   0  0  0 
 samba-gtk6  6  0 
-samba_3_X_devel 28 13 0 
-samba_3_X_test 28 16 0 
+samba_3_X_devel 28 14 0 
+samba_3_X_test 29 15 0 
 samba_4_0_test 31 28 1 
 smb-build31 6  0 
-talloc   32 5  0 
-tdb  31 10 0 
+talloc   33 5  0 
+tdb  31 9  0 
 


[SCM] CTDB repository - branch master updated - ctdb-1.0.57-8-gcd69d29

2008-09-08 Thread Ronnie Sahlberg
The branch, master has been updated
   via  cd69d292292eaab3aac0e9d9fc57cb621597c63c (commit)
  from  e26ce5140ed005725f8b7ac8ba23a180fd7d5337 (commit)

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


- Log -
commit cd69d292292eaab3aac0e9d9fc57cb621597c63c
Author: Ronnie Sahlberg [EMAIL PROTECTED]
Date:   Tue Sep 9 13:44:46 2008 +1000

additional monitoring between the two daemons.

we currently only monitor that the dameons are running by kill(0, pid)
and verifying the the domain socket between them is ok.

this is not sufficient since we can have a situation where the recovery
daemon is hung.

this new code monitors that the recovery daemon is operating.
if the recovery hangs, we log this and shut down the main daemon

---

Summary of changes:
 client/ctdb_client.c   |   18 ++
 include/ctdb.h |2 ++
 include/ctdb_private.h |4 
 server/ctdb_control.c  |4 
 server/ctdb_daemon.c   |3 +++
 server/ctdb_recover.c  |   38 ++
 server/ctdb_recoverd.c |3 +++
 server/ctdb_tunables.c |1 +
 8 files changed, 73 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index dfcd4d9..6d80efc 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -3280,3 +3280,21 @@ again:
talloc_free(h);
return 0;
 }
+
+/*
+  recovery daemon ping to main daemon
+ */
+int ctdb_ctrl_recd_ping(struct ctdb_context *ctdb)
+{
+   int ret;
+   int32_t res;
+
+   ret = ctdb_control(ctdb, CTDB_CURRENT_NODE, 0, CTDB_CONTROL_RECD_PING, 
0, tdb_null, 
+  ctdb, NULL, res, NULL, NULL);
+   if (ret != 0 || res != 0) {
+   DEBUG(DEBUG_ERR,(Failed to send recd ping\n));
+   return -1;
+   }
+
+   return 0;
+}
diff --git a/include/ctdb.h b/include/ctdb.h
index d43ab50..60fa60b 100644
--- a/include/ctdb.h
+++ b/include/ctdb.h
@@ -566,4 +566,6 @@ int ctdb_transaction_store(struct ctdb_transaction_handle 
*h,
   TDB_DATA key, TDB_DATA data);
 int ctdb_transaction_commit(struct ctdb_transaction_handle *h);
 
+int ctdb_ctrl_recd_ping(struct ctdb_context *ctdb);
+
 #endif
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index a25674c..b2ded31 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -114,6 +114,7 @@ struct ctdb_tunable {
uint32_t reclock_ping_period;
uint32_t no_ip_failback;
uint32_t verbose_memory_names;
+   uint32_t recd_ping_timeout;
 };
 
 /*
@@ -417,6 +418,7 @@ struct ctdb_context {
int start_as_disabled;
uint32_t event_script_timeouts; /* counting how many consecutive times 
an eventscript has timedout */
TALLOC_CTX *eventscripts_ctx; /* a context to hold data for the 
RUN_EVENTSCRIPTS control */
+   TALLOC_CTX *recd_ping_ctx;
 };
 
 struct ctdb_db_context {
@@ -550,6 +552,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS  = 
0,
CTDB_CONTROL_TRANS2_FINISHED = 84,
CTDB_CONTROL_TRANS2_ERROR= 85,
CTDB_CONTROL_TRANS2_COMMIT_RETRY = 86,
+   CTDB_CONTROL_RECD_PING   = 87,
 }; 
 
 /*
@@ -1378,5 +1381,6 @@ int32_t ctdb_control_trans2_error(struct ctdb_context 
*ctdb,
 char *ctdb_addr_to_str(ctdb_sock_addr *addr);
 void ctdb_canonicalize_ip(const ctdb_sock_addr *ip, ctdb_sock_addr *cip);
 
+int32_t ctdb_control_recd_ping(struct ctdb_context *ctdb);
 
 #endif
diff --git a/server/ctdb_control.c b/server/ctdb_control.c
index 4128797..94736fb 100644
--- a/server/ctdb_control.c
+++ b/server/ctdb_control.c
@@ -406,6 +406,10 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
case CTDB_CONTROL_TRANS2_FINISHED:
return ctdb_control_trans2_finished(ctdb, c);
 
+   case CTDB_CONTROL_RECD_PING:
+   CHECK_CONTROL_DATA_SIZE(0);
+   return ctdb_control_recd_ping(ctdb);
+
default:
DEBUG(DEBUG_CRIT,(__location__  Unknown CTDB control opcode 
%u\n, opcode));
return -1;
diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c
index efe3d75..885ce7e 100644
--- a/server/ctdb_daemon.c
+++ b/server/ctdb_daemon.c
@@ -103,6 +103,9 @@ static void ctdb_start_transport(struct ctdb_context *ctdb)
 
/* start periodic update of tcp tickle lists */
ctdb_start_tcp_tickle_update(ctdb);
+
+   /* start listening for recovery daemon pings */
+   ctdb_control_recd_ping(ctdb);
 }
 
 static void block_signal(int signum)
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index 3243f42..6b207d5 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -971,3 

[SCM] CTDB repository - branch master updated - ctdb-1.0.57-9-ga89977f

2008-09-08 Thread Ronnie Sahlberg
The branch, master has been updated
   via  a89977f8cb2463a87147dcc0ad936cb5d4131670 (commit)
  from  cd69d292292eaab3aac0e9d9fc57cb621597c63c (commit)

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


- Log -
commit a89977f8cb2463a87147dcc0ad936cb5d4131670
Author: Ronnie Sahlberg [EMAIL PROTECTED]
Date:   Tue Sep 9 13:55:31 2008 +1000

lower the debug level for when printing that the nodeflags have changed

---

Summary of changes:
 server/ctdb_recoverd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index a8c004a..4753942 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -2633,7 +2633,7 @@ again:
}
if ((remote_nodemap-nodes[i].flags  
NODE_FLAGS_INACTIVE) != 
(nodemap-nodes[i].flags  NODE_FLAGS_INACTIVE)) {
-   DEBUG(DEBUG_ERR, (__location__  Remote node:%u 
has different nodemap flag for %d (0x%x vs 0x%x)\n, 
+   DEBUG(DEBUG_WARNING, (__location__  Remote 
node:%u has different nodemap flag for %d (0x%x vs 0x%x)\n, 
  nodemap-nodes[j].pnn, i,
  remote_nodemap-nodes[i].flags, 
nodemap-nodes[i].flags));
do_recovery(rec, mem_ctx, pnn, nodemap, 


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.57-10-ga72f5b7

2008-09-08 Thread Ronnie Sahlberg
The branch, master has been updated
   via  a72f5b7d1560e427e18b1c55a2932a7fb037f4c7 (commit)
  from  a89977f8cb2463a87147dcc0ad936cb5d4131670 (commit)

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


- Log -
commit a72f5b7d1560e427e18b1c55a2932a7fb037f4c7
Author: Ronnie Sahlberg [EMAIL PROTECTED]
Date:   Tue Sep 9 13:59:48 2008 +1000

lower the debuglevel when logging unknown idr in responses

---

Summary of changes:
 common/ctdb_util.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common/ctdb_util.c b/common/ctdb_util.c
index 792ff3c..cc68291 100644
--- a/common/ctdb_util.c
+++ b/common/ctdb_util.c
@@ -147,7 +147,7 @@ void *_ctdb_reqid_find(struct ctdb_context *ctdb, uint32_t 
reqid, const char *ty
 
p = _idr_find_type(ctdb-idr, (reqid16)0x, type, location);
if (p == NULL) {
-   DEBUG(DEBUG_ERR, (Could not find idr:%u\n,reqid));
+   DEBUG(DEBUG_WARNING, (Could not find idr:%u\n,reqid));
}
 
return p;


-- 
CTDB repository