[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Tridgell
The branch, master has been updated
   via  516dc40 samba-tool: added --local option to drs replicate command
   via  1596595 s4-ipv6: don't default to 127.0.0.1 in provision
  from  19213b8 Ensure when creating a directory, if we make any changes 
due to inheritance parameters, we update the stat returned.

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


- Log -
commit 516dc404fd7f299b68adae356f2416ca8e265031
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jun 9 15:01:30 2011 +1000

samba-tool: added --local option to drs replicate command

this allows replication directly to the local SAM, which means it can
run without the samba daemon running. It also bypasses all usnChanged
checks, which is useful for forcing replication of a set of objects
which are not marked as replication being needed

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Jun  9 08:15:10 CEST 2011 on sn-devel-104

commit 1596595b7e644de6432d7c8fb9e10ee2b525440e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jun 9 15:00:03 2011 +1000

s4-ipv6: don't default to 127.0.0.1 in provision

it is better to just leave the IPv4 address out of the zone file

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source4/scripting/python/samba/netcmd/drs.py   |   40 +++-
 .../scripting/python/samba/provision/__init__.py   |   13 --
 2 files changed, 47 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/drs.py 
b/source4/scripting/python/samba/netcmd/drs.py
index 56c0e39..61717a7 100644
--- a/source4/scripting/python/samba/netcmd/drs.py
+++ b/source4/scripting/python/samba/netcmd/drs.py
@@ -233,6 +233,39 @@ class cmd_drs_kcc(Command):
 self.message(Consistency check on %s successful. % DC)
 
 
+def drs_local_replicate(self, SOURCE_DC, NC):
+'''replicate from a source DC to the local SAM'''
+self.server = SOURCE_DC
+drsuapi_connect(self)
+
+self.local_samdb = SamDB(session_info=system_session(), url=None,
+ credentials=self.creds, lp=self.lp)
+
+self.samdb = SamDB(url=ldap://%s; % self.server,
+   session_info=system_session(),
+   credentials=self.creds, lp=self.lp)
+
+# work out the source and destination GUIDs
+res = self.local_samdb.search(base=, scope=ldb.SCOPE_BASE, 
attrs=[dsServiceName])
+self.ntds_dn = res[0][dsServiceName][0]
+
+res = self.local_samdb.search(base=self.ntds_dn, scope=ldb.SCOPE_BASE, 
attrs=[objectGUID])
+self.ntds_guid = misc.GUID(self.samdb.schema_format_value(objectGUID, 
res[0][objectGUID][0]))
+
+
+source_dsa_invocation_id = misc.GUID(self.samdb.get_invocation_id())
+destination_dsa_guid = self.ntds_guid
+
+self.samdb.transaction_start()
+repl = drs_utils.drs_Replicate(ncacn_ip_tcp:%s[seal] % self.server, 
self.lp,
+   self.creds, self.local_samdb)
+try:
+repl.replicate(NC, source_dsa_invocation_id, destination_dsa_guid)
+except Exception, e:
+raise CommandError(Error replicating DN %s % NC, e)
+self.samdb.transaction_commit()
+
+
 
 class cmd_drs_replicate(Command):
 replicate a naming context between two DCs
@@ -250,9 +283,10 @@ class cmd_drs_replicate(Command):
 takes_options = [
 Option(--add-ref, help=use ADD_REF to add to repsTo on source, 
action=store_true),
 Option(--sync-forced, help=use SYNC_FORCED to force inbound 
replication, action=store_true),
+Option(--local, help=pull changes directly into the local database 
(destination DC is ignored), action=store_true),
 ]
 
-def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False,
+def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False, 
local=False,
 sambaopts=None,
 credopts=None, versionopts=None, server=None):
 
@@ -261,6 +295,10 @@ class cmd_drs_replicate(Command):
 
 self.creds = credopts.get_credentials(self.lp, fallback_machine=True)
 
+if local:
+drs_local_replicate(self, SOURCE_DC, NC)
+return
+
 drsuapi_connect(self)
 samdb_connect(self)
 
diff --git a/source4/scripting/python/samba/provision/__init__.py 
b/source4/scripting/python/samba/provision/__init__.py
index 324e76f..f272872 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1585,14 +1585,15 @@ def provision(logger, session_info, credentials, 
smbconf=None,
 if hostip is None:
 logger.info(Looking up IPv4 addresses)
 hostips = interface_ips_v4(lp)
-if len(hostips) == 0:
-

[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  9f02fb5 s4:rpc_server/dcesrv_samr.c - quiet enum warnings
   via  260bc98 s4:ntvfs subsystem - quiet enum warnings
   via  40ea52a s4:libnet/libnet_rpc.c - quiet an enum warning
   via  49352ca s4:winbind/wb_samba3_protocol.c - quiet enum warning
   via  26c7223 s4:schema_convert_to_ol.c - fix memory contexts
   via  87a38d7 s4:dsdb/schema_convert_to_ol.c - quiet enum warning
   via  27f1779 s4:auth/ntlm/auth.c - fix incompatible pointer type warning
   via  530d1e3 s3:auth/auth_samba4.c - remove unused variable
   via  059e735 s3:passdb/pdb_samba4.c - remove unused variable
   via  d6fe38b s4:smbd/server.c - quiet time_t format string warnings by 
casts
   via  4d0c00b s3:passdb/pdb_samba4.c - fix a format specifier warning
   via  7ebafb0 s4:librpc/rpc/dcerpc.c - janitorial: use void for 
functions without arguments
   via  ba5cec5 ldb:ldb_msg.c - move away from errno
  from  516dc40 samba-tool: added --local option to drs replicate command

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


- Log -
commit 9f02fb51d41c2c2bf285ab6d25138f0b7b0cba81
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:02:37 2011 +0200

s4:rpc_server/dcesrv_samr.c - quiet enum warnings

When we are acting in the role of a PDC then please return it as status 
information.

Reviewed-by: Tridge

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Thu Jun  9 12:06:36 CEST 2011 on sn-devel-104

commit 260bc987b00b3fff6c9b99211627b14e9bd0789a
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:00:18 2011 +0200

s4:ntvfs subsystem - quiet enum warnings

Simply return NT_STATUS_INVALID_LEVEL for unknown types of requests.

Reviewed-by: Tridge

commit 40ea52a267c7362e206ac83ff6d1fc586b05e2f4
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:58:45 2011 +0200

s4:libnet/libnet_rpc.c - quiet an enum warning

Other enum types have been checked before.

Reviewed-by: Tridge

commit 49352cafb4259503e6afb44d38db9bfd525d5e0d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:57:00 2011 +0200

s4:winbind/wb_samba3_protocol.c - quiet enum warning

Don't enumerate all unimplemented types of call which simply leads to
incompleteness.

Reviewed-by: Tridge

commit 26c7223e7240a5d4a2b39b14b47c0e66b7c089c9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu Jun 9 09:17:16 2011 +0200

s4:schema_convert_to_ol.c - fix memory contexts

- Add more mem_ctx free functions on error cases
- Steal the out string directly onto the LDB context to be able to free
  the local mem_ctx

Reviewed-by: Tridge

commit 87a38d77ac899d8b6e21c7bcaeb8d4b74ed65341
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 18:55:23 2011 +0200

s4:dsdb/schema_convert_to_ol.c - quiet enum warning

Introduce a error message when choosing wrong targets.

Reviewed-by: Tridge

commit 27f1779814accd82a5ec1330f8856192a69271f8
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 09:36:59 2011 +0200

s4:auth/ntlm/auth.c - fix incompatible pointer type warning

Reviewed-by: Tridge

commit 530d1e33f7ea565e5668ebe609f049fa6a69871b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Jun 8 19:04:48 2011 +0200

s3:auth/auth_samba4.c - remove unused variable

Reviewed-by: Tridge

commit 059e735e4167477f7f183aae3ec517b31ca4700f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:41:18 2011 +0200

s3:passdb/pdb_samba4.c - remove unused variable

Reviewed-by: Tridge

commit d6fe38b99dde9abc91a3806ece93930e5530dda7
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:40:20 2011 +0200

s4:smbd/server.c - quiet time_t format string warnings by casts

Reviewed-by: Tridge

commit 4d0c00bb33ec9fe54b8e87491001047d06525c70
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 22:34:00 2011 +0200

s3:passdb/pdb_samba4.c - fix a format specifier warning

Reviewed-by: Tridge

commit 7ebafb000a79e9317b267ae09b9fa9b0685b9209
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Jun 6 12:50:16 2011 +0200

s4:librpc/rpc/dcerpc.c - janitorial: use void for functions without 
arguments

Probably a mistake in commit 907cdb5de7f16a2540299aeba211bf2a5ae6fafe.

Reviewed-by: Tridge

commit ba5cec58049fd9ca8cb9d0d1706ed2e34328335f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Thu May 26 09:25:16 2011 +0200

ldb:ldb_msg.c - move away from errno

Reviewed-by: Tridge

---

Summary of changes:
 source3/auth/auth_samba4.c |1 -
 

quiet enum warnings

2011-06-09 Thread Stefan (metze) Metzmacher
Hi Matthias,

   case RAW_FILEINFO_GETATTR:
   info-getattr.out.attrib = name-dos.attrib;
   info-getattr.out.size   = name-st.st_size;
 @@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state 
 *pvfs,
 
 name-original_name);
   NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
   return NT_STATUS_OK;
 +
 + default:
 + return NT_STATUS_INVALID_LEVEL;
   }
  
 - return NT_STATUS_INVALID_LEVEL;
  }

I think we should better fix this by adding the missing enum values
explicit instead of
using a default, as that will make sure we'll get a warning again if
someone adds a new
value.

metze



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Bartlett
The branch, master has been updated
   via  5a37d32 s3-selftest Add test for smbclient --authentication-file
   via  74eed8f s3-param Remove special case for global_myname(), rename to 
lp_netbios_name()
   via  0e95311 s3-lib Add myhostname_upper()
   via  bb00f97 s3-selftest Add a test for 'message command'
   via  daf79e3 server_id: Change format to vnn:pid.task_id, pid.task_id or 
pid
   via  f348d14 s3-param Remove special case for global_scope()
   via  3ccc760 s3-param Remove special case for lp_workgroup()
   via  acdf5b0 s3-libsmbclient Use workgroup from libsmbclient caller for 
domain in credentials
   via  2077e0f s3-lib Use domain in credentials file for domain in 
credentials
   via  6c3f35b s4-param add const to loadparm_init_s3 s3_fns
   via  16b1c77 lib/util Bring procid_str() into lib/util as 
server_id_string()
   via  d01dbd6 s3-lib Read and write the full struct server_id (except the 
unique_id)
   via  a772797 librpc/idr Use the Samba3 notify.idl in common.
   via  d057116 server_id.idl: Bring server_id.idl in common
   via  174893c s3-server_id change pid to hyper
   via  cc3b75b s3-server_id Add task_id to server_id to match Samba4
   via  8d803d5 s4-cluster Use task_id instead of id2 to clarify server_id 
structure
   via  8d4a838 s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
   via  5e26e94 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
   via  ad0a07c s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
   via  d5e6a47 s3-talloc Change TALLOC_P() to talloc()
   via  3d15137 s3-talloc Change TALLOC_ARRAY() to talloc_array()
   via  73b3774 s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
   via  8459391 s3-talloc Remove unused TALLOC zeronull functions and macro 
definitions
  from  9f02fb5 s4:rpc_server/dcesrv_samr.c - quiet enum warnings

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


- Log -
commit 5a37d3217a257b28d94b04d2637585e71e80d33c
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Jun 9 16:20:15 2011 +1000

s3-selftest Add test for smbclient --authentication-file

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Thu Jun  9 13:49:59 CEST 2011 on sn-devel-104

commit 74eed8f3ed5c333728350df1d23a4318e9104909
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Jun 9 15:31:03 2011 +1000

s3-param Remove special case for global_myname(), rename to 
lp_netbios_name()

There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett

commit 0e95311c235929e07fdcfd7153b91ae795a979b9
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Jun 9 15:27:53 2011 +1000

s3-lib Add myhostname_upper()

This varient always upper cases the hostname, which is needed for the
netbios name.

Andrew Bartlett

commit bb00f97a82aea24bbf95de4dbd788d32bd34b427
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Jun 9 15:22:19 2011 +1000

s3-selftest Add a test for 'message command'

This also provides us a way to test that the -n option to smbclient
works, as that becomes part of the filename.

Andrew Bartlett

commit daf79e33c7e8873345fb4a251f1e880fd767df19
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Jun 9 11:18:15 2011 +1000

server_id: Change format to vnn:pid.task_id, pid.task_id or pid

This helps ensure the string cannot be ambiguous, while also ensuring
that it remains simple in the non-cluster case.

The asymmetry of reading get_my_vnn() but writing based on
NONCLUSTER_VNN is acceptable because in the non-clustered case, they
are equal, and in the clustered case we will print the full string.

Andrew Bartlett

commit f348d148b463ca61cbc48d2aadeaa099f7150425
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 8 16:27:06 2011 +1000

s3-param Remove special case for global_scope()

There is no reason this can't be a normal constant string in the
loadparm system.  (Past reasons were that we didn't have lp_set_cmdline())

Andrew Bartlett

commit 3ccc7609476139bc6a906110a2623605f3802159
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 8 15:42:22 2011 +1000

s3-param Remove special case for lp_workgroup()

There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett

commit acdf5b0d4c188c0ca9ac17caedd1b53ae241acd6
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 8 15:41:24 2011 +1000

s3-libsmbclient Use workgroup from libsmbclient caller for domain in 
credentials

This previously set the workgroup, which is a different thing, but
would 

s3-param Remove special case for lp_workgroup()

2011-06-09 Thread Stefan (metze) Metzmacher
Hi Andrew,

commit 3ccc7609476139bc6a906110a2623605f3802159 introduced a regression
in rpcclient, which makes it unusable, as the lp_workgroup() returns
uninitialized memory.

I have put a fix for this into autobuild, but it would be nice if you could
add some blackbox tests for rpcclient, so that we'll detect things like
this in future.

Thanks!
metze



signature.asc
Description: OpenPGP digital signature


s3-param Remove special case for global_myname(), rename to lp_netbios_name()

2011-06-09 Thread Stefan (metze) Metzmacher
Hi Andrew,

while I like you changes to use lp_netbios_name(), lp_netbios_scope()
and lp_workgroup()
directly, I noticed that this changes changed the behavior if someone
specifies these
parameters on the command line.

lp_set_cmdline() doesn't cause the

lp_set_cmdline(netbios name, foo);
doesn't trigger that
lp_netbios_name() will return FOO, which would match the old behavior.

I guess we need something similar to handle_realm() and szRealmUpper.

metze



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Christian Ambach
The branch, master has been updated
   via  ed04cd0 s3:net fix a typo
   via  3219818 s3:modules fix some non-empty blank lines
  from  d7fe70a s3:rpcclient: remove unused new_workgroup variable

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


- Log -
commit ed04cd06a2224a9c3b624b609460347aa1e72ed2
Author: Christian Ambach a...@samba.org
Date:   Thu Jun 9 15:07:15 2011 +0200

s3:net fix a typo

fix a typo in the german message file

Autobuild-User: Christian Ambach a...@samba.org
Autobuild-Date: Thu Jun  9 17:12:24 CEST 2011 on sn-devel-104

commit 32198182b3f90662107bbcf180cdc92ed8e0bc8d
Author: Christian Ambach a...@samba.org
Date:   Tue May 31 21:59:24 2011 +0200

s3:modules fix some non-empty blank lines

---

Summary of changes:
 source3/locale/net/de.po   |2 +-
 source3/modules/vfs_gpfs.h |   11 +--
 2 files changed, 6 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locale/net/de.po b/source3/locale/net/de.po
index 74fcca0..2244cd6 100644
--- a/source3/locale/net/de.po
+++ b/source3/locale/net/de.po
@@ -415,7 +415,7 @@ msgid   net getdomainsid
 msgstr 
 
 #: ../../utils/net.c:663
-msgid Display the maximul RID currently used
+msgid Display the maximum RID currently used
 msgstr Die höchste verwendete RID anzeigen
 
 #: ../../utils/net.c:664
diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h
index 8a314e1..4a05841 100644
--- a/source3/modules/vfs_gpfs.h
+++ b/source3/modules/vfs_gpfs.h
@@ -1,26 +1,25 @@
 /*
Unix SMB/CIFS implementation.
Wrap gpfs calls in vfs functions.
- 
+
Copyright (C) Christian Ambach camba...@de.ibm.com 2006
-   
+
Major code contributions by Chetan Shringarpure chetan...@in.ibm.com
 and Gomati Mohanan gomati.moha...@in.ibm.com
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-  
 
 */
 


-- 
Samba Shared Repository


Re: quiet enum warnings

2011-06-09 Thread Matthias Dieter Wallnöfer

Okay, these are different point of views.

Tridge, what do you think?

Cheers,
Matthias

Stefan (metze) Metzmacher wrote:

Hi Matthias,

   

case RAW_FILEINFO_GETATTR:
info-getattr.out.attrib = name-dos.attrib;
info-getattr.out.size   = name-st.st_size;
@@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
  
name-original_name);
NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
return NT_STATUS_OK;
+
+   default:
+   return NT_STATUS_INVALID_LEVEL;
}

-   return NT_STATUS_INVALID_LEVEL;
  }
 

I think we should better fix this by adding the missing enum values
explicit instead of
using a default, as that will make sure we'll get a warning again if
someone adds a new
value.

metze

   




[SCM] Samba Shared Repository - branch v3-6-test updated

2011-06-09 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  64bba3b VERSION: Bump version up to 3.6.0.
  from  8db38ec WHATSNEW: Update changes since rc1.

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


- Log -
commit 64bba3b822a42e61c7725c2c648a4cb385d0bd41
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Jun 9 19:55:53 2011 +0200

VERSION: Bump version up to 3.6.0.

Karolin

---

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


Changeset truncated at 500 lines:

diff --git a/source3/VERSION b/source3/VERSION
index 31b6194..8946805 100644
--- a/source3/VERSION
+++ b/source3/VERSION
@@ -56,7 +56,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  -  3.0.0rc1  #
 
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=
 
 
 # To mark SVN snapshots this should be set to 'yes'#


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-stable updated

2011-06-09 Thread Karolin Seeger
The branch, v3-6-stable has been updated
   via  d46a3a2 VERSION: Bump version up to 3.6.0.
  from  314f161 WHATSNEW: Update changes since rc1.

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


- Log -
commit d46a3a24ce9305f7102887c3637feb3bdbd165d8
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Jun 9 19:55:53 2011 +0200

VERSION: Bump version up to 3.6.0.

Karolin
(cherry picked from commit 64bba3b822a42e61c7725c2c648a4cb385d0bd41)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/VERSION b/source3/VERSION
index c647411..504743b 100644
--- a/source3/VERSION
+++ b/source3/VERSION
@@ -56,7 +56,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  -  3.0.0rc1  #
 
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=
 
 
 # To mark SVN snapshots this should be set to 'yes'#


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2011-06-09 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  9994cca Part 5 of bugfix for #8211 - inherit owner = yes doesn't 
interact correctly with inherit permissions = yes and POSIX ACLs
   via  10489d9 Part 4 of bugfix for #8211 - inherit owner = yes doesn't 
interact correctly with inherit permissions = yes and POSIX ACLs
   via  1e0c743 Part 3 of bugfix for #8211 - inherit owner = yes doesn't 
interact correctly with inherit permissions = yes and POSIX ACLs
   via  282b096 Part 2 of bugfix for #8211 - inherit owner = yes doesn't 
interact correctly with inherit permissions = yes and POSIX ACLs
  from  64bba3b VERSION: Bump version up to 3.6.0.

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


- Log -
commit 9994cca22b2c4948c7948f4d83dc3e8efbbd121e
Author: Jeremy Allison j...@samba.org
Date:   Wed Jun 8 14:38:09 2011 -0700

Part 5 of bugfix for #8211 - inherit owner = yes doesn't interact 
correctly with inherit permissions = yes and POSIX ACLs

Ensure when creating a directory, if we make any changes due to inheritance 
parameters, we update the stat returned.

commit 10489d903a4a6c7566787808b4e00ee0fcee7d70
Author: Jeremy Allison j...@samba.org
Date:   Wed Jun 8 14:26:30 2011 -0700

Part 4 of bugfix for #8211 - inherit owner = yes doesn't interact 
correctly with inherit permissions = yes and POSIX ACLs

We don't need to check mode bits as well as dev/ino to
ensure we're in the same place.

commit 1e0c7438074bf0e76d34ea5aac70d5f55d2b364a
Author: Jeremy Allison j...@samba.org
Date:   Tue Jun 7 16:55:20 2011 -0700

Part 3 of bugfix for #8211 - inherit owner = yes doesn't interact 
correctly with inherit permissions = yes and POSIX ACLs

When changing ownership on a new file make sure we
must have a valid stat struct before making the inheritance
calls (as they may look at it), and if we make changes we
must have a valid stat struct after them.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Wed Jun  8 03:07:04 CEST 2011 on sn-devel-104
(cherry picked from commit 5fb27814ad5566b264acf0f014d1721afc39b176)

commit 282b09692d23253dd6c3808e1a96de84073ba4e2
Author: Jeremy Allison j...@samba.org
Date:   Wed Jun 8 12:54:33 2011 -0700

Part 2 of bugfix for #8211 - inherit owner = yes doesn't interact 
correctly with inherit permissions = yes and POSIX ACLs

When changing ownership on a new file make sure we
also change the returned stat struct to have the correct uid.

---

Summary of changes:
 source3/smbd/open.c |   85 +--
 1 files changed, 62 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index aea25fe..9b94e65 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -237,11 +237,13 @@ void change_file_owner_to_parent(connection_struct *conn,
 was %s\n, fsp_str_dbg(fsp),
 (unsigned int)smb_fname_parent-st.st_ex_uid,
 strerror(errno) ));
-   }
-
-   DEBUG(10,(change_file_owner_to_parent: changed new file %s to 
+   } else {
+   DEBUG(10,(change_file_owner_to_parent: changed new file %s to 
  parent directory uid %u.\n, fsp_str_dbg(fsp),
  (unsigned int)smb_fname_parent-st.st_ex_uid));
+   /* Ensure the uid entry is updated. */
+   fsp-fsp_name-st.st_ex_uid = smb_fname_parent-st.st_ex_uid;
+   }
 
TALLOC_FREE(smb_fname_parent);
 }
@@ -316,10 +318,9 @@ NTSTATUS change_dir_owner_to_parent(connection_struct 
*conn,
 
/* Ensure we're pointing at the same place. */
if (smb_fname_cwd-st.st_ex_dev != psbuf-st_ex_dev ||
-   smb_fname_cwd-st.st_ex_ino != psbuf-st_ex_ino ||
-   smb_fname_cwd-st.st_ex_mode != psbuf-st_ex_mode ) {
+   smb_fname_cwd-st.st_ex_ino != psbuf-st_ex_ino) {
DEBUG(0,(change_dir_owner_to_parent: 
-device/inode/mode on directory %s changed. 
+device/inode on directory %s changed. 
 Refusing to chown !\n, fname ));
status = NT_STATUS_ACCESS_DENIED;
goto chdir;
@@ -379,6 +380,7 @@ static NTSTATUS open_file(files_struct *fsp,
int accmode = (flags  O_ACCMODE);
int local_flags = flags;
bool file_existed = VALID_STAT(fsp-fsp_name-st);
+   bool file_created = false;
 
fsp-fh-fd = -1;
errno = EPERM;
@@ -478,23 +480,7 @@ static NTSTATUS open_file(files_struct *fsp,
}
 
if ((local_flags  O_CREAT)  !file_existed) {
-
-   /* Inherit the ACL if required */
-   if (lp_inherit_perms(SNUM(conn))) {
- 

[SCM] Samba Shared Repository - branch v3-6-test updated

2011-06-09 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  4d47e12 Fix re-opened bug 8083 - inherit owner = yes doesn't 
interact correctly with vfs_acl_xattr or vfs_acl_tdb module.
  from  9994cca Part 5 of bugfix for #8211 - inherit owner = yes doesn't 
interact correctly with inherit permissions = yes and POSIX ACLs

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


- Log -
commit 4d47e12865ec5bb117e3d992522900a4c6fc84d3
Author: Jeremy Allison j...@samba.org
Date:   Tue Jun 7 11:54:35 2011 -0700

Fix re-opened bug 8083 - inherit owner = yes doesn't interact correctly 
with vfs_acl_xattr or vfs_acl_tdb module.

Fix incorrect interaction when all of

inherit permissions = yes
inherit acls = yes
inherit owner = yes

are set. Found by Björn Jacke. Thanks Björn !

---

Summary of changes:
 source3/modules/vfs_acl_common.c |   21 +
 1 files changed, 17 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 84d666a..0dd2fc3 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -448,10 +448,14 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
struct security_descriptor *psd = NULL;
struct dom_sid *owner_sid = NULL;
struct dom_sid *group_sid = NULL;
+   uint32_t security_info_sent = (SECINFO_OWNER | SECINFO_GROUP | 
SECINFO_DACL);
bool inherit_owner = lp_inherit_owner(SNUM(handle-conn));
+   bool inheritable_components = sd_has_inheritable_components(parent_desc,
+   is_directory);
size_t size;
 
-   if (!sd_has_inheritable_components(parent_desc, is_directory)) {
+   if (!inheritable_components  !inherit_owner) {
+   /* Nothing to inherit and not setting owner. */
return NT_STATUS_OK;
}
 
@@ -487,6 +491,17 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
return status;
}
 
+   /* If inheritable_components == false,
+  se_create_child_secdesc()
+  creates a security desriptor with a NULL dacl
+  entry, but with SEC_DESC_DACL_PRESENT. We need
+  to remove that flag. */
+
+   if (!inheritable_components) {
+   security_info_sent = ~SECINFO_DACL;
+   psd-type = ~SEC_DESC_DACL_PRESENT;
+   }
+
if (DEBUGLEVEL = 10) {
DEBUG(10,(inherit_new_acl: child acl for %s is:\n,
fsp_str_dbg(fsp) ));
@@ -498,9 +513,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
become_root();
}
status = SMB_VFS_FSET_NT_ACL(fsp,
-   (SECINFO_OWNER |
-SECINFO_GROUP |
-SECINFO_DACL),
+   security_info_sent,
psd);
if (inherit_owner) {
unbecome_root();


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Tridgell
The branch, master has been updated
   via  73cbcd9 s4-drs: added debug lines for missing linked attribute 
fields
   via  56d09d5 s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked 
attribute
   via  3e4c080 s4-drs: cope with missing RMD_ADDTIME in linked attributes
  from  fe02f47 s3:vfs cleanup unused code in vfs_recycle

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


- Log -
commit 73cbcd9c99e89cc24de84cdb098693d96dd6419d
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 10:11:01 2011 +1000

s4-drs: added debug lines for missing linked attribute fields

this improved the logging of bugs related to linked attribute
replication

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jun 10 03:26:21 CEST 2011 on sn-devel-104

commit 56d09d5904e036ae9cf483b7be202956aae998b3
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 10:10:04 2011 +1000

s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attribute

if the link was a w2k style, and we are upgrading it, then set the
RMD_ADDTIME to the current time

commit 3e4c08096d913834143b23f4fbc662d92659a83f
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 09:10:09 2011 +1000

s4-drs: cope with missing RMD_ADDTIME in linked attributes

upgraded links can be missing the RMD_ADDTIME field

---

Summary of changes:
 source4/dsdb/common/util.c  |2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |3 ++-
 source4/rpc_server/drsuapi/getncchanges.c   |   18 ++
 3 files changed, 17 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 0cba20b..3fa8f67 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3192,7 +3192,7 @@ bool dsdb_dn_is_deleted_val(const struct ldb_val *val)
  */
 bool dsdb_dn_is_upgraded_link_val(struct ldb_val *val)
 {
-   return memmem(val-data, val-length, RMD_ADDTIME=, 13) != NULL;
+   return memmem(val-data, val-length, RMD_VERSION=, 13) != NULL;
 }
 
 /*
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 04311a4..9d2e5e2 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1643,7 +1643,8 @@ static int replmd_update_la_val(TALLOC_CTX *mem_ctx, 
struct ldb_val *v, struct d
if (old_addtime == NULL) {
old_addtime = tval;
}
-   if (dsdb_dn != old_dsdb_dn) {
+   if (dsdb_dn != old_dsdb_dn ||
+   ldb_dn_get_extended_component(dn, RMD_ADDTIME) == NULL) {
ret = ldb_dn_set_extended_component(dn, RMD_ADDTIME, 
old_addtime);
if (ret != LDB_SUCCESS) return ret;
}
diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index 0c196aa..c57fec2 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -360,27 +360,37 @@ static WERROR get_nc_changes_add_la(TALLOC_CTX *mem_ctx,
la-attid = sa-attributeID_id;
la-flags = active?DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE:0;
 
-   status = dsdb_get_extended_dn_nttime(dsdb_dn-dn, 
la-originating_add_time, RMD_ADDTIME);
-   if (!NT_STATUS_IS_OK(status)) {
-   return ntstatus_to_werror(status);
-   }
status = dsdb_get_extended_dn_uint32(dsdb_dn-dn, 
la-meta_data.version, RMD_VERSION);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_VERSION in linked attribute '%s' 
in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_nttime(dsdb_dn-dn, 
la-meta_data.originating_change_time, RMD_CHANGETIME);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_CHANGETIME in linked attribute 
'%s' in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_guid(dsdb_dn-dn, 
la-meta_data.originating_invocation_id, RMD_INVOCID);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_INVOCID in linked attribute '%s' 
in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_uint64(dsdb_dn-dn, 
la-meta_data.originating_usn, RMD_ORIGINATING_USN);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_ORIGINATING_USN in linked 
attribute '%s' 

[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Bartlett
The branch, master has been updated
   via  91f3515 s3-param Avoid strupper_m() where possible.
   via  77c612f s4-librpc Remove unsued server_id4.idl
  from  73cbcd9 s4-drs: added debug lines for missing linked attribute 
fields

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


- Log -
commit 91f351568aab728269cdfce3a6cfad8b5785b8d8
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Jun 10 09:37:06 2011 +1000

s3-param Avoid strupper_m() where possible.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Fri Jun 10 04:37:54 CEST 2011 on sn-devel-104

commit 77c612fc21da944aa6c84e52c127713fcaf9a071
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Jun 10 09:36:37 2011 +1000

s4-librpc Remove unsued server_id4.idl

---

Summary of changes:
 source3/param/loadparm.c  |   17 -
 source4/librpc/idl/server_id4.idl |   13 -
 2 files changed, 12 insertions(+), 18 deletions(-)
 delete mode 100644 source4/librpc/idl/server_id4.idl


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 3ba5312..c80b751 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -7135,10 +7135,14 @@ static void copy_service(struct service *pserviceDest, 
struct service *pserviceS
break;
 
case P_USTRING:
+   {
+   char *upper_string = 
strupper_talloc(talloc_tos(), 
+
*(char **)src_ptr);
string_set((char **)dest_ptr,
-  *(char **)src_ptr);
-   strupper_m(*(char **)dest_ptr);
+  upper_string);
+   TALLOC_FREE(upper_string);
break;
+   }
case P_LIST:
TALLOC_FREE(*((char ***)dest_ptr));
*((char ***)dest_ptr) = 
str_list_copy(NULL, 
@@ -8007,10 +8011,13 @@ bool lp_do_parameter(int snum, const char *pszParmName, 
const char *pszParmValue
break;
 
case P_USTRING:
-   string_set((char **)parm_ptr, pszParmValue);
-   strupper_m(*(char **)parm_ptr);
+   {
+   char *upper_string = strupper_talloc(talloc_tos(), 
+pszParmValue);
+   string_set((char **)parm_ptr, upper_string);
+   TALLOC_FREE(upper_string);
break;
-
+   }
case P_ENUM:
lp_set_enum_parm( parm_table[parmnum], pszParmValue, 
(int*)parm_ptr );
break;
diff --git a/source4/librpc/idl/server_id4.idl 
b/source4/librpc/idl/server_id4.idl
deleted file mode 100644
index eb191e3..000
--- a/source4/librpc/idl/server_id4.idl
+++ /dev/null
@@ -1,13 +0,0 @@
-[
-   pointer_default(unique)
-]
-interface server_id
-{
-   /* id used to identify a endpoint, possibly in a cluster */
-   typedef [public] struct {
-   hyper pid;
-   uint32 task_id;
-   uint32 vnn;
-   udlong unique_id;
-   } server_id;
-}


-- 
Samba Shared Repository