Rev 334: added automatic vacuuming of empty records during recovery in http://samba.org/~tridge/ctdb

2007-05-23 Thread tridge

revno: 334
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Wed 2007-05-23 17:21:14 +1000
message:
  added automatic vacuuming of empty records during recovery
modified:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  common/ctdb_recover.c  
ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1
  common/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13

Diff too large for email (812, the limit is 200).


Re: svn commit: samba r23066 - in branches/SAMBA_4_0/source/torture/libnet: .

2007-05-23 Thread Rafal Szczesniak
Metze,

On Tue, May 22, 2007 at 09:02:17AM +, [EMAIL PROTECTED] wrote:
 Author: metze
 Date: 2007-05-22 09:02:16 + (Tue, 22 May 2007)
 New Revision: 23066
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23066
 
 Log:
 don't ignore errors

 metze
 Modified:
branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
 
 
 Changeset:
 Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c
 ===
 --- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c2007-05-22 
 06:34:14 UTC (rev 23065)
 +++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c2007-05-22 
 09:02:16 UTC (rev 23066)
 @@ -536,6 +536,7 @@
   status = libnet_UserInfo(ctx, mem_ctx, user_req);
   if (!NT_STATUS_IS_OK(status)) {
   printf(libnet_UserInfo call failed: %s\n, 
 nt_errstr(status));
 + ret = False;
   continue;
   }

Thanks for catching that.


cheers,
-- 
Rafal Szczesniak
Samba Team member  http://www.samba.org



signature.asc
Description: Digital signature


svn commit: samba r23090 - in branches/SAMBA_4_0/source/torture/rpc: .

2007-05-23 Thread tridge
Author: tridge
Date: 2007-05-23 07:44:51 + (Wed, 23 May 2007)
New Revision: 23090

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23090

Log:

a test showing two netlogon pipes open at once, using the LogonEx ops

Modified:
   branches/SAMBA_4_0/source/torture/rpc/rpc.c
   branches/SAMBA_4_0/source/torture/rpc/schannel.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/rpc.c
===
--- branches/SAMBA_4_0/source/torture/rpc/rpc.c 2007-05-23 02:41:31 UTC (rev 
23089)
+++ branches/SAMBA_4_0/source/torture/rpc/rpc.c 2007-05-23 07:44:51 UTC (rev 
23090)
@@ -183,6 +183,7 @@
torture_suite_add_simple_test(suite, SAMLOGON, torture_rpc_samlogon);
torture_suite_add_simple_test(suite, SAMSYNC, torture_rpc_samsync);
torture_suite_add_simple_test(suite, SCHANNEL, torture_rpc_schannel);
+   torture_suite_add_simple_test(suite, SCHANNEL2, 
torture_rpc_schannel2);
torture_suite_add_simple_test(suite, SRVSVC, torture_rpc_srvsvc);
torture_suite_add_simple_test(suite, SVCCTL, torture_rpc_svcctl);
torture_suite_add_simple_test(suite, EPMAPPER, torture_rpc_epmapper);

Modified: branches/SAMBA_4_0/source/torture/rpc/schannel.c
===
--- branches/SAMBA_4_0/source/torture/rpc/schannel.c2007-05-23 02:41:31 UTC 
(rev 23089)
+++ branches/SAMBA_4_0/source/torture/rpc/schannel.c2007-05-23 07:44:51 UTC 
(rev 23090)
@@ -30,6 +30,7 @@
 #include auth/gensec/schannel_proto.h
 #include libcli/auth/libcli_auth.h
 #include libcli/security/security.h
+#include system/filesys.h
 
 #define TEST_MACHINE_NAME schannel
 
@@ -446,6 +447,8 @@
return False;   
 }
 
+
+
 /*
   a schannel test suite
  */
@@ -485,3 +488,95 @@
 
return ret;
 }
+
+/*
+  test two schannel connections
+ */
+BOOL torture_rpc_schannel2(struct torture_context *torture)
+{
+   BOOL ret = True;
+   TALLOC_CTX *mem_ctx = talloc_new(torture);
+   struct test_join *join_ctx;
+   NTSTATUS status;
+   const char *binding = lp_parm_string(-1, torture, binding);
+   struct dcerpc_binding *b;
+   struct dcerpc_pipe *p1 = NULL, *p2 = NULL;
+   struct cli_credentials *credentials1, *credentials2;
+   uint16_t acct_flags = ACB_WSTRUST;
+   uint32_t dcerpc_flags = DCERPC_SCHANNEL | DCERPC_SIGN;
+   TALLOC_CTX *test_ctx = talloc_named(mem_ctx, 0, test_schannel2 
context);
+
+   join_ctx = torture_join_domain(talloc_asprintf(mem_ctx, %s2, 
TEST_MACHINE_NAME), 
+  acct_flags, credentials1);
+   if (!join_ctx) {
+   printf(Failed to join domain with acct_flags=0x%x\n, 
acct_flags);
+   talloc_free(test_ctx);
+   return False;
+   }
+
+   credentials2 = talloc_memdup(mem_ctx, credentials1, 
sizeof(*credentials1));
+   credentials1-netlogon_creds = NULL;
+   credentials2-netlogon_creds = NULL;
+
+   status = dcerpc_parse_binding(test_ctx, binding, b);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(Bad binding string %s\n, binding);
+   goto failed;
+   }
+
+   b-flags = ~DCERPC_AUTH_OPTIONS;
+   b-flags |= dcerpc_flags;
+
+   printf(Opening first connection\n);
+   status = dcerpc_pipe_connect_b(test_ctx, p1, b, dcerpc_table_netlogon,
+  credentials1, NULL);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(Failed to connect with schannel: %s\n, 
nt_errstr(status));
+   goto failed;
+   }
+
+   printf(Opening second connection\n);
+   status = dcerpc_pipe_connect_b(test_ctx, p2, b, dcerpc_table_netlogon,
+  credentials2, NULL);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(Failed to connect with schannel: %s\n, 
nt_errstr(status));
+   goto failed;
+   }
+
+   credentials1-netlogon_creds = NULL;
+   credentials2-netlogon_creds = NULL;
+
+   printf(Testing logon on pipe1\n);
+   if (!test_netlogon_ex_ops(p1, test_ctx, credentials1, NULL)) {
+   printf(Failed to process schannel secured NETLOGON ops\n);
+   ret = False;
+   }
+
+   printf(Testing logon on pipe2\n);
+   if (!test_netlogon_ex_ops(p2, test_ctx, credentials2, NULL)) {
+   printf(Failed to process schannel secured NETLOGON ops\n);
+   ret = False;
+   }
+
+   printf(Again on pipe1\n);
+   if (!test_netlogon_ex_ops(p1, test_ctx, credentials1, NULL)) {
+   printf(Failed to process schannel secured NETLOGON ops\n);
+   ret = False;
+   }
+
+   printf(Again on pipe2\n);
+   if (!test_netlogon_ex_ops(p2, test_ctx, credentials2, NULL)) {
+   printf(Failed to process schannel secured NETLOGON ops\n);
+   ret = False;
+   }
+
+

Rev 336: fixed %d which should be %u in http://samba.org/~tridge/ctdb

2007-05-23 Thread tridge

revno: 336
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Wed 2007-05-23 20:15:09 +1000
message:
  fixed %d which should be %u
modified:
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  common/ctdb_daemon.c   ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  common/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3

Diff too large for email (328, the limit is 200).


Rev 335: fixed some memory leaks on the traverse code in http://samba.org/~tridge/ctdb

2007-05-23 Thread tridge

revno: 335
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Wed 2007-05-23 20:06:37 +1000
message:
  fixed some memory leaks on the traverse code
modified:
  common/ctdb.c  ctdb.c-20061127094323-t50f58d65iaao5of-2
  common/ctdb_traverse.c 
ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
=== modified file 'common/ctdb.c'
--- a/common/ctdb.c 2007-05-23 04:50:41 +
+++ b/common/ctdb.c 2007-05-23 10:06:37 +
@@ -437,6 +437,7 @@
 {
struct queue_next *q = talloc_get_type(private_data, struct queue_next);
ctdb_input_pkt(q-ctdb, q-hdr);
+   talloc_free(q);
 }  
 
 /*

=== modified file 'common/ctdb_traverse.c'
--- a/common/ctdb_traverse.c2007-05-17 13:23:41 +
+++ b/common/ctdb_traverse.c2007-05-23 10:06:37 +
@@ -277,6 +277,7 @@
struct traverse_all_state *state = talloc_get_type(p, struct 
traverse_all_state);
int ret;
struct ctdb_rec_data *d;
+   TDB_DATA cdata;
 
d = ctdb_marshall_record(state, state-reqid, key, data);
if (d == NULL) {
@@ -285,14 +286,19 @@
return;
}
 
-   data.dptr = (uint8_t *)d;
-   data.dsize = d-length;
+   cdata.dptr = (uint8_t *)d;
+   cdata.dsize = d-length;
 
ret = ctdb_daemon_send_control(state-ctdb, state-srcnode, 0, 
CTDB_CONTROL_TRAVERSE_DATA,
-  0, CTDB_CTRL_FLAG_NOREPLY, data, NULL, 
NULL);
+  0, CTDB_CTRL_FLAG_NOREPLY, cdata, NULL, 
NULL);
if (ret != 0) {
DEBUG(0,(Failed to send traverse data\n));
}
+
+   if (key.dsize == 0  data.dsize == 0) {
+   /* we're done */
+   talloc_free(state);
+   }
 }
 
 /*
@@ -397,6 +403,7 @@
 {
struct traverse_start_state *state;
struct ctdb_rec_data *d;
+   TDB_DATA cdata;
 
state = talloc_get_type(p, struct traverse_start_state);
 
@@ -405,10 +412,10 @@
return;
}
 
-   data.dptr = (uint8_t *)d;
-   data.dsize = d-length;
+   cdata.dptr = (uint8_t *)d;
+   cdata.dsize = d-length;
 
-   ctdb_dispatch_message(state-ctdb, state-srvid, data);
+   ctdb_dispatch_message(state-ctdb, state-srvid, cdata);
if (key.dsize == 0  data.dsize == 0) {
/* end of traverse */
talloc_free(state);

=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-20 23:24:34 +
+++ b/tools/ctdb_control.c  2007-05-23 10:06:37 +
@@ -59,6 +59,7 @@
  setmonmode vnn modeset monitoring mode\n
  attach dbnameattach a database\n
  getpid vnn   get the pid of a ctdb 
daemon\n
+ dumpmemory vnn|all   dump memory map to log\n
  shutdown vnn shutdown a remote ctdb\n
  freeze vnn|all   freeze a node\n
  thaw vnn|all thaw a node\n



svn commit: samba r23091 - in branches: SAMBA_3_0/source/rpc_client SAMBA_3_0/source/rpc_parse SAMBA_3_0_26/source/rpc_client SAMBA_3_0_26/source/rpc_parse

2007-05-23 Thread vlendec
Author: vlendec
Date: 2007-05-23 15:17:49 + (Wed, 23 May 2007)
New Revision: 23091

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23091

Log:
Add rpccli_netlogon_sam_network_logon_ex, fix its parsing. This does not
use the credential chain and only works over netlogon, but it would
allow multiple outstanding auth requests for a single workstation
account.

Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0_26/source/rpc_client/cli_netlogon.c
   branches/SAMBA_3_0_26/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0_26/source/rpc_parse/parse_net.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c 2007-05-23 07:44:51 UTC 
(rev 23090)
+++ branches/SAMBA_3_0/source/rpc_client/cli_netlogon.c 2007-05-23 15:17:49 UTC 
(rev 23091)
@@ -946,6 +946,98 @@
 return result;
 }
 
+NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ uint32 logon_parameters,
+ const char *server,
+ const char *username,
+ const char *domain,
+ const char *workstation, 
+ const uint8 chal[8], 
+ DATA_BLOB lm_response,
+ DATA_BLOB nt_response,
+ NET_USER_INFO_3 *info3)
+{
+   prs_struct qbuf, rbuf;
+   NET_Q_SAM_LOGON_EX q;
+   NET_R_SAM_LOGON_EX r;
+   NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+   NET_ID_INFO_CTR ctr;
+   int validation_level = 3;
+   const char *workstation_name_slash;
+   const char *server_name_slash;
+   static uint8 zeros[16];
+   int i;
+   
+   ZERO_STRUCT(q);
+   ZERO_STRUCT(r);
+
+   if (server[0] != '\\'  server[1] != '\\') {
+   server_name_slash = talloc_asprintf(mem_ctx, %s, server);
+   } else {
+   server_name_slash = server;
+   }
+
+   if (workstation[0] != '\\'  workstation[1] != '\\') {
+   workstation_name_slash = talloc_asprintf(mem_ctx, %s, 
workstation);
+   } else {
+   workstation_name_slash = workstation;
+   }
+
+   if (!workstation_name_slash || !server_name_slash) {
+   DEBUG(0, (talloc_asprintf failed!\n));
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   /* Initialise input parameters */
+
+   q.validation_level = validation_level;
+
+ctr.switch_value = NET_LOGON_TYPE;
+
+   init_id_info2(ctr.auth.id2, domain,
+ logon_parameters, /* param_ctrl */
+ 0xdead, 0xbeef, /* LUID? */
+ username, workstation_name_slash, (const uchar*)chal,
+ lm_response.data, lm_response.length, nt_response.data,
+ nt_response.length);
+ 
+init_sam_info_ex(q.sam_id, server_name_slash, global_myname(),
+NET_LOGON_TYPE, ctr);
+
+r.user = info3;
+
+/* Marshall data and send request */
+
+   CLI_DO_RPC(cli, mem_ctx, PI_NETLOGON, NET_SAMLOGON_EX,
+  q, r, qbuf, rbuf,
+  net_io_q_sam_logon_ex,
+  net_io_r_sam_logon_ex,
+  NT_STATUS_UNSUCCESSFUL);
+
+   if (memcmp(zeros, info3-user_sess_key, 16) != 0) {
+   SamOEMhash(info3-user_sess_key, cli-dc-sess_key, 16);
+   } else {
+   memset(info3-user_sess_key, '\0', 16);
+   }
+
+   if (memcmp(zeros, info3-lm_sess_key, 8) != 0) {
+   SamOEMhash(info3-lm_sess_key, cli-dc-sess_key, 8);
+   } else {
+   memset(info3-lm_sess_key, '\0', 8);
+   }
+
+   for (i=0; i  7; i++) {
+   memset(info3-unknown[i], '\0', 4);
+   }
+
+/* Return results */
+
+   result = r.status;
+
+return result;
+}
+
 /***
 LSA Server Password Set.
 /

Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2007-05-23 07:44:51 UTC 
(rev 23090)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c2007-05-23 15:17:49 UTC 
(rev 23091)
@@ -1337,7 +1337,8 @@
  Inits a DOM_CLNT_SRV structure.
 

svn commit: samba r23092 - in branches/SAMBA_3_0_RELEASE: . source/smbd source/tdb/tools

2007-05-23 Thread jerry
Author: jerry
Date: 2007-05-23 15:28:47 + (Wed, 23 May 2007)
New Revision: 23092

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23092

Log:
Merge Herb's changes to tdbtool and Jeremy's fox 
for renames with the cifs fs client.



Modified:
   branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
   branches/SAMBA_3_0_RELEASE/source/smbd/reply.c
   branches/SAMBA_3_0_RELEASE/source/tdb/tools/tdbtool.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
===
--- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-23 15:17:49 UTC (rev 
23091)
+++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-23 15:28:47 UTC (rev 
23092)
@@ -54,6 +54,7 @@
   about that we retry the lock every 10 seconds instead of waiting
   for the standard select timeout.
 * BUG 4637: Fix samlogon reply regression that broke domain logons.
+* Fix rename for Linux cifs fs client.
 
 
 o   Alexander Bokovoy [EMAIL PROTECTED]
@@ -85,6 +86,11 @@
   uninitialized variables.
 
 
+o   Herb Lewis [EMAIL PROTECTED]
+* Update connection structure definition for tdbtool display
+  output.
+
+
 o   Derrell Lipman [EMAIL PROTECTED]
 * BUG 4601: Fix smbc_getxattr() to properly return the required
   size of the buffer needed to contain the extended attributes.

Modified: branches/SAMBA_3_0_RELEASE/source/smbd/reply.c
===
--- branches/SAMBA_3_0_RELEASE/source/smbd/reply.c  2007-05-23 15:17:49 UTC 
(rev 23091)
+++ branches/SAMBA_3_0_RELEASE/source/smbd/reply.c  2007-05-23 15:28:47 UTC 
(rev 23092)
@@ -4260,10 +4260,10 @@
return NT_STATUS_OBJECT_NAME_COLLISION;
}
 
-   status = can_rename(conn,newname,attrs,sbuf);
+   status = can_rename(conn,fsp-fsp_name,attrs,sbuf);
 
if (dest_exists  !NT_STATUS_IS_OK(status)) {
-   DEBUG(3,(rename_internals: Error %s rename %s - %s\n,
+   DEBUG(3,(rename_internals_fsp: Error %s rename %s - %s\n,
nt_errstr(status), fsp-fsp_name,newname));
if (NT_STATUS_EQUAL(status,NT_STATUS_SHARING_VIOLATION))
status = NT_STATUS_ACCESS_DENIED;

Modified: branches/SAMBA_3_0_RELEASE/source/tdb/tools/tdbtool.c
===
--- branches/SAMBA_3_0_RELEASE/source/tdb/tools/tdbtool.c   2007-05-23 
15:17:49 UTC (rev 23091)
+++ branches/SAMBA_3_0_RELEASE/source/tdb/tools/tdbtool.c   2007-05-23 
15:28:47 UTC (rev 23092)
@@ -116,7 +116,7 @@
int cnum;
uid_t uid;
gid_t gid;
-   char name[24];
+   char servicename[FSTRING_LEN];
char addr[24];
char machine[FSTRING_LEN];
time_t start;
@@ -373,7 +373,7 @@
printf( \ndata %d bytes\n, (int)dbuf.dsize);
printf( pid=%5d   , ((connections_data*)dbuf.dptr)-pid);
printf( cnum   =%10d  , ((connections_data*)dbuf.dptr)-cnum);
-   printf( name   =[%s]\n, ((connections_data*)dbuf.dptr)-name);
+   printf( name   =[%s]\n, ((connections_data*)dbuf.dptr)-servicename);

printf( uid=%5d   ,  ((connections_data*)dbuf.dptr)-uid);
printf( addr   =[%s]\n, ((connections_data*)dbuf.dptr)-addr);



svn commit: samba-docs r1117 - in tags: .

2007-05-23 Thread jerry
Author: jerry
Date: 2007-05-23 15:32:08 + (Wed, 23 May 2007)
New Revision: 1117

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=1117

Log:
tagging docs for 3.0.25a (these won't change)
Added:
   tags/release-3-0-25a/


Changeset:
Copied: tags/release-3-0-25a (from rev 1110, trunk)



svn commit: samba r23093 - in branches: SAMBA_3_0/source/script SAMBA_3_0_26/source/script

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 19:10:04 + (Wed, 23 May 2007)
New Revision: 23093

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23093

Log:
Allow modules with the same name but different types.

Modified:
   branches/SAMBA_3_0/source/script/installmodules.sh
   branches/SAMBA_3_0_26/source/script/installmodules.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/installmodules.sh
===
--- branches/SAMBA_3_0/source/script/installmodules.sh  2007-05-23 15:28:47 UTC 
(rev 23092)
+++ branches/SAMBA_3_0/source/script/installmodules.sh  2007-05-23 19:10:04 UTC 
(rev 23093)
@@ -19,11 +19,19 @@
 fi
 done
 
+# We expect the last component of LIBDIR to be the module type, eg. idmap,
+# pdb. By stripping this from the installation name, you can have multiple
+# modules of the same name but different types by creating eg. idmap_foo
+# and pdb_foo. This makes the most sense for idmap and pdb module, where
+# they need to be consistent.
+mtype=`basename $LIBDIR`
+
 for p in $*; do
  p2=`basename $p`
- echo Installing $p as $DESTDIR/$LIBDIR/$p2
- cp -f $p $DESTDIR/$LIBDIR/
- chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2
+ name=`echo $p2 | sed -es/${mtype}_//`
+ echo Installing $p as $DESTDIR/$LIBDIR/$name
+ cp -f $p $DESTDIR/$LIBDIR/$name
+ chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$name
 done
 
 exit 0

Modified: branches/SAMBA_3_0_26/source/script/installmodules.sh
===
--- branches/SAMBA_3_0_26/source/script/installmodules.sh   2007-05-23 
15:28:47 UTC (rev 23092)
+++ branches/SAMBA_3_0_26/source/script/installmodules.sh   2007-05-23 
19:10:04 UTC (rev 23093)
@@ -19,11 +19,19 @@
 fi
 done
 
+# We expect the last component of LIBDIR to be the module type, eg. idmap,
+# pdb. By stripping this from the installation name, you can have multiple
+# modules of the same name but different types by creating eg. idmap_foo
+# and pdb_foo. This makes the most sense for idmap and pdb module, where
+# they need to be consistent.
+mtype=`basename $LIBDIR`
+
 for p in $*; do
  p2=`basename $p`
- echo Installing $p as $DESTDIR/$LIBDIR/$p2
- cp -f $p $DESTDIR/$LIBDIR/
- chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2
+ name=`echo $p2 | sed -es/${mtype}_//`
+ echo Installing $p as $DESTDIR/$LIBDIR/$name
+ cp -f $p $DESTDIR/$LIBDIR/$name
+ chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$name
 done
 
 exit 0



svn commit: samba r23094 - in branches: SAMBA_3_0/source SAMBA_3_0/source/m4 SAMBA_3_0_26/source

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 19:57:13 + (Wed, 23 May 2007)
New Revision: 23094

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23094

Log:
Update the iconv detection to handle cross-compiles better. If we are
cross-compiling, we accept the first iconv library that we find (with a
warning).

Modified:
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/m4/aclocal.m4
   branches/SAMBA_3_0_26/source/aclocal.m4
   branches/SAMBA_3_0_26/source/configure.in


Changeset:
Sorry, the patch is too large (551 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23094


svn commit: samba r23095 - in branches: SAMBA_3_0/source SAMBA_3_0/source/auth SAMBA_3_0/source/lib SAMBA_3_0/source/nsswitch SAMBA_3_0/source/pam_smbpass SAMBA_3_0_26/source SAMBA_3_0_26/source/auth

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 20:31:28 + (Wed, 23 May 2007)
New Revision: 23095

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23095

Log:
Support systems that have their PAM headers in /usr/include/pam.

Modified:
   branches/SAMBA_3_0/source/auth/pampass.c
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/lib/pam_errors.c
   branches/SAMBA_3_0/source/nsswitch/pam_winbind.h
   branches/SAMBA_3_0/source/pam_smbpass/general.h
   branches/SAMBA_3_0/source/pam_smbpass/pam_smb_acct.c
   branches/SAMBA_3_0/source/pam_smbpass/pam_smb_auth.c
   branches/SAMBA_3_0/source/pam_smbpass/pam_smb_passwd.c
   branches/SAMBA_3_0_26/source/auth/pampass.c
   branches/SAMBA_3_0_26/source/configure.in
   branches/SAMBA_3_0_26/source/lib/pam_errors.c
   branches/SAMBA_3_0_26/source/nsswitch/pam_winbind.h
   branches/SAMBA_3_0_26/source/pam_smbpass/general.h
   branches/SAMBA_3_0_26/source/pam_smbpass/pam_smb_acct.c
   branches/SAMBA_3_0_26/source/pam_smbpass/pam_smb_auth.c
   branches/SAMBA_3_0_26/source/pam_smbpass/pam_smb_passwd.c


Changeset:
Modified: branches/SAMBA_3_0/source/auth/pampass.c
===
--- branches/SAMBA_3_0/source/auth/pampass.c2007-05-23 19:57:13 UTC (rev 
23094)
+++ branches/SAMBA_3_0/source/auth/pampass.c2007-05-23 20:31:28 UTC (rev 
23095)
@@ -41,7 +41,11 @@
  *   which determines what actions/limitations/allowances become affected.
  */
 
+#if defined(HAVE_SECURITY_PAM_APPL_H)
 #include security/pam_appl.h
+#elif defined(HAVE_PAM_PAM_APPL_H)
+#include pam/pam_appl.h
+#endif
 
 /*
  * Structure used to communicate between the conversation function

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2007-05-23 19:57:13 UTC (rev 
23094)
+++ branches/SAMBA_3_0/source/configure.in  2007-05-23 20:31:28 UTC (rev 
23095)
@@ -4399,7 +4399,11 @@
 
 
 #
-# check for a PAM clear-text auth, accounts, password and session support
+# Check for a PAM clear-text auth, accounts, password
+# and session support. Most PAM implementations keep their
+# headers in /usr/include/security. Darwin keeps its in
+# /usr/include/pam.
+
 with_pam_for_crypt=no
 try_pam=no
 AC_MSG_CHECKING(whether to try PAM support)
@@ -4419,10 +4423,13 @@
use_pam=yes
create_pam_modules=yes
 
-   AC_CHECK_HEADERS(security/pam_appl.h)
-   if test x$ac_cv_header_security_pam_appl_h != xyes; then
+   # Most systems have PAM headers in /usr/include/security, but Darwin
+   # has them in /usr/include/pam.
+   AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
+   if test x$ac_cv_header_security_pam_appl_h != xyes -a \
+   x$ac_cv_header_pam_pam_appl_h != xyes; then
if test x${try_pam} = xyes;then
-   AC_MSG_ERROR([--with-pam=yes but security/pam_appl.h 
not found])
+   AC_MSG_ERROR([--with-pam=yes but pam_appl.h not found])
fi
use_pam=no
create_pam_modules=no
@@ -4437,14 +,18 @@
create_pam_modules=no
fi
 
-   AC_CHECK_HEADERS(security/pam_modules.h,,,[[
+   AC_CHECK_HEADERS(security/pam_modules.h pam/pam_modules.h,,,[[
#if HAVE_SECURITY_PAM_APPL_H
#include security/pam_appl.h
#endif
+   #if HAVE_PAM_PAM_APPL_H
+   #include pam/pam_appl.h
+   #endif
]])
-   if test x$ac_cv_header_security_pam_modules_h = xno; then
+   if test x$ac_cv_header_security_pam_modules_h = xno -a \
+   x$ac_cv_header_pam_pam_modules_h = xno ; then
if test x${try_pam} = xyes;then
-   AC_MSG_ERROR([--with-pam=yes but security/pam_modules.h 
not found])
+   AC_MSG_ERROR([--with-pam=yes but pam_modules.h not 
found])
fi
create_pam_modules=no
fi
@@ -4460,6 +4471,7 @@
# this checks are optional,
# we don't care about the results here
AC_CHECK_HEADERS(security/pam_ext.h 
security/_pam_macros.h)
+   AC_CHECK_HEADERS(pam/pam_ext.h pam/_pam_macros.h)
AC_CHECK_FUNC_EXT(pam_vsyslog,$PAM_LIBS)
else
AC_MSG_WARN([PAM support detected but PAM MODULES 
support is missing])  

Modified: branches/SAMBA_3_0/source/lib/pam_errors.c
===
--- branches/SAMBA_3_0/source/lib/pam_errors.c  2007-05-23 19:57:13 UTC (rev 
23094)
+++ branches/SAMBA_3_0/source/lib/pam_errors.c  2007-05-23 20:31:28 UTC (rev 
23095)
@@ -21,7 +21,11 @@
 #include 

svn commit: samba r23096 - in branches: SAMBA_3_0/source/locking SAMBA_3_0_26/source/locking

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 20:38:14 + (Wed, 23 May 2007)
New Revision: 23096

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23096

Log:
Make the lock failure message prettier.

Modified:
   branches/SAMBA_3_0/source/locking/posix.c
   branches/SAMBA_3_0_26/source/locking/posix.c


Changeset:
Modified: branches/SAMBA_3_0/source/locking/posix.c
===
--- branches/SAMBA_3_0/source/locking/posix.c   2007-05-23 20:31:28 UTC (rev 
23095)
+++ branches/SAMBA_3_0/source/locking/posix.c   2007-05-23 20:38:14 UTC (rev 
23096)
@@ -195,8 +195,8 @@
 
DEBUG(0,(posix_fcntl_lock: WARNING: lock request at offset 
%.0f, length %.0f returned\n,
(double)offset,(double)count));
-   DEBUG(0,(an %s error. This can happen when using 64 bit lock 
offsets\n, strerror(errno)));
-   DEBUG(0,(on 32 bit NFS mounted file systems.\n));
+   DEBUGADD(0,(an %s error. This can happen when using 64 bit 
lock offsets\n, strerror(errno)));
+   DEBUGADD(0,(on 32 bit NFS mounted file systems.\n));
 
/*
 * If the offset is  0x7FFF then this will cause problems 
on
@@ -240,8 +240,8 @@
 
DEBUG(0,(posix_fcntl_getlock: WARNING: lock request at offset 
%.0f, length %.0f returned\n,
(double)*poffset,(double)*pcount));
-   DEBUG(0,(an %s error. This can happen when using 64 bit lock 
offsets\n, strerror(errno)));
-   DEBUG(0,(on 32 bit NFS mounted file systems.\n));
+   DEBUGADD(0,(an %s error. This can happen when using 64 bit 
lock offsets\n, strerror(errno)));
+   DEBUGADD(0,(on 32 bit NFS mounted file systems.\n));
 
/*
 * If the offset is  0x7FFF then this will cause problems 
on

Modified: branches/SAMBA_3_0_26/source/locking/posix.c
===
--- branches/SAMBA_3_0_26/source/locking/posix.c2007-05-23 20:31:28 UTC 
(rev 23095)
+++ branches/SAMBA_3_0_26/source/locking/posix.c2007-05-23 20:38:14 UTC 
(rev 23096)
@@ -195,8 +195,8 @@
 
DEBUG(0,(posix_fcntl_lock: WARNING: lock request at offset 
%.0f, length %.0f returned\n,
(double)offset,(double)count));
-   DEBUG(0,(an %s error. This can happen when using 64 bit lock 
offsets\n, strerror(errno)));
-   DEBUG(0,(on 32 bit NFS mounted file systems.\n));
+   DEBUGADD(0,(an %s error. This can happen when using 64 bit 
lock offsets\n, strerror(errno)));
+   DEBUGADD(0,(on 32 bit NFS mounted file systems.\n));
 
/*
 * If the offset is  0x7FFF then this will cause problems 
on
@@ -240,8 +240,8 @@
 
DEBUG(0,(posix_fcntl_getlock: WARNING: lock request at offset 
%.0f, length %.0f returned\n,
(double)*poffset,(double)*pcount));
-   DEBUG(0,(an %s error. This can happen when using 64 bit lock 
offsets\n, strerror(errno)));
-   DEBUG(0,(on 32 bit NFS mounted file systems.\n));
+   DEBUGADD(0,(an %s error. This can happen when using 64 bit 
lock offsets\n, strerror(errno)));
+   DEBUGADD(0,(on 32 bit NFS mounted file systems.\n));
 
/*
 * If the offset is  0x7FFF then this will cause problems 
on



svn commit: samba r23097 - in branches: SAMBA_3_0/source SAMBA_3_0_26/source

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 20:46:07 + (Wed, 23 May 2007)
New Revision: 23097

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23097

Log:
Add a new configure option to disable building SWAT (it is still built by
default).

Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0_26/source/Makefile.in
   branches/SAMBA_3_0_26/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2007-05-23 20:38:14 UTC (rev 
23096)
+++ branches/SAMBA_3_0/source/Makefile.in   2007-05-23 20:46:07 UTC (rev 
23097)
@@ -155,7 +155,7 @@
 
 # Note that all executable programs now provide for an optional executable 
suffix.
 
-SBIN_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL 
PROTECTED]@ @EXTRA_SBIN_PROGS@
+SBIN_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ @SWAT_SBIN_TARGETS@ 
@EXTRA_SBIN_PROGS@
 
 ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
 
@@ -1713,7 +1713,7 @@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(DYNEXP) script/tests/timelimit.o
 
-install: installservers installbin @INSTALL_CIFSMOUNT@ installman 
installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ 
@INSTALL_LIBMSRPC@ @INSTALL_PAM_MODULES@ @INSTALL_LIBSMBSHAREMODES@
+install: installservers installbin @INSTALL_CIFSMOUNT@ installman 
installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ 
@INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@ @INSTALL_PAM_MODULES@ 
@INSTALL_LIBSMBSHAREMODES@
 
 
 install-everything: install installmodules

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2007-05-23 20:38:14 UTC (rev 
23096)
+++ branches/SAMBA_3_0/source/configure.in  2007-05-23 20:46:07 UTC (rev 
23097)
@@ -338,6 +338,21 @@
 
 m4_include(lib/socket_wrapper/config.m4)
 
+
+AC_ARG_ENABLE(swat,
+[  --enable-swat   Build the SWAT tool (default=yes)],
+[
+case $enable_swat in
+   no) ;;
+   *)
+   SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
+   SWAT_INSTALL_TARGETS=installswat
+   ;;
+esac
+AC_SUBST(SWAT_SBIN_TARGETS)
+AC_SUBST(SWAT_INSTALL_TARGETS)
+])
+
 #
 # set prefix for 'make test'
 selftest_prefix=./

Modified: branches/SAMBA_3_0_26/source/Makefile.in
===
--- branches/SAMBA_3_0_26/source/Makefile.in2007-05-23 20:38:14 UTC (rev 
23096)
+++ branches/SAMBA_3_0_26/source/Makefile.in2007-05-23 20:46:07 UTC (rev 
23097)
@@ -148,7 +148,7 @@
 
 # Note that all executable programs now provide for an optional executable 
suffix.
 
-SBIN_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ bin/[EMAIL 
PROTECTED]@ @EXTRA_SBIN_PROGS@
+SBIN_PROGS = bin/[EMAIL PROTECTED]@ bin/[EMAIL PROTECTED]@ @SWAT_SBIN_TARGETS@ 
@EXTRA_SBIN_PROGS@
 
 ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
 
@@ -1593,7 +1593,7 @@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(DYNEXP) script/tests/timelimit.o
 
-install: installservers installbin @INSTALL_CIFSMOUNT@ installman 
installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ 
@INSTALL_LIBMSRPC@ @INSTALL_PAM_MODULES@ @INSTALL_LIBSMBSHAREMODES@
+install: installservers installbin @INSTALL_CIFSMOUNT@ installman 
installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ 
@INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@ @INSTALL_PAM_MODULES@ 
@INSTALL_LIBSMBSHAREMODES@
 
 
 install-everything: install installmodules

Modified: branches/SAMBA_3_0_26/source/configure.in
===
--- branches/SAMBA_3_0_26/source/configure.in   2007-05-23 20:38:14 UTC (rev 
23096)
+++ branches/SAMBA_3_0_26/source/configure.in   2007-05-23 20:46:07 UTC (rev 
23097)
@@ -337,6 +337,21 @@
 
 m4_include(lib/socket_wrapper/config.m4)
 
+
+AC_ARG_ENABLE(swat,
+[  --enable-swat   Build the SWAT tool (default=yes)],
+[
+case $enable_swat in
+   no) ;;
+   *)
+   SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
+   SWAT_INSTALL_TARGETS=installswat
+   ;;
+esac
+AC_SUBST(SWAT_SBIN_TARGETS)
+AC_SUBST(SWAT_INSTALL_TARGETS)
+])
+
 #
 # set prefix for 'make test'
 selftest_prefix=./



svn commit: samba r23098 - in branches: SAMBA_3_0/source/modules SAMBA_3_0_26/source/modules

2007-05-23 Thread jpeach
Author: jpeach
Date: 2007-05-23 20:48:53 + (Wed, 23 May 2007)
New Revision: 23098

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23098

Log:
Fix the case of the #include statements so this module can be built on a
case-sensitive filesystem.

Modified:
   branches/SAMBA_3_0/source/modules/charset_macosxfs.c
   branches/SAMBA_3_0_26/source/modules/charset_macosxfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/charset_macosxfs.c
===
--- branches/SAMBA_3_0/source/modules/charset_macosxfs.c2007-05-23 
20:46:07 UTC (rev 23097)
+++ branches/SAMBA_3_0/source/modules/charset_macosxfs.c2007-05-23 
20:48:53 UTC (rev 23098)
@@ -41,8 +41,8 @@
  * See if autoconf has found us the internal headers in some form.
  */
 #if HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H
-#  include Corefoundation/CFStringEncodingConverter.h
-#  include Corefoundation/CFUnicodePrecomposition.h
+#  include CoreFoundation/CFStringEncodingConverter.h
+#  include CoreFoundation/CFUnicodePrecomposition.h
 #  define USE_INTERNAL_API 1
 #elif HAVE_CFSTRINGENCODINGCONVERTER_H
 #  include CFStringEncodingConverter.h

Modified: branches/SAMBA_3_0_26/source/modules/charset_macosxfs.c
===
--- branches/SAMBA_3_0_26/source/modules/charset_macosxfs.c 2007-05-23 
20:46:07 UTC (rev 23097)
+++ branches/SAMBA_3_0_26/source/modules/charset_macosxfs.c 2007-05-23 
20:48:53 UTC (rev 23098)
@@ -41,8 +41,8 @@
  * See if autoconf has found us the internal headers in some form.
  */
 #if HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H
-#  include Corefoundation/CFStringEncodingConverter.h
-#  include Corefoundation/CFUnicodePrecomposition.h
+#  include CoreFoundation/CFStringEncodingConverter.h
+#  include CoreFoundation/CFUnicodePrecomposition.h
 #  define USE_INTERNAL_API 1
 #elif HAVE_CFSTRINGENCODINGCONVERTER_H
 #  include CFStringEncodingConverter.h



svn commit: samba r23100 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/locking SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/locking SAMBA_3_0_25/source/smbd SAMBA_3

2007-05-23 Thread jra
Author: jra
Date: 2007-05-23 21:32:10 + (Wed, 23 May 2007)
New Revision: 23100

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23100

Log:
Implement the delete on close semantics I've just tested for
in Samba4 smbtorture. Fix rename on an open file handle.
Needed for 3.0.25a.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/locking/locking.c
   branches/SAMBA_3_0/source/smbd/open.c
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0_25/source/include/smb.h
   branches/SAMBA_3_0_25/source/locking/locking.c
   branches/SAMBA_3_0_25/source/smbd/open.c
   branches/SAMBA_3_0_25/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/trans2.c
   branches/SAMBA_3_0_26/source/include/smb.h
   branches/SAMBA_3_0_26/source/locking/locking.c
   branches/SAMBA_3_0_26/source/smbd/open.c
   branches/SAMBA_3_0_26/source/smbd/reply.c
   branches/SAMBA_3_0_26/source/smbd/trans2.c


Changeset:
Sorry, the patch is too large (896 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23100


svn commit: samba r23101 - in branches/SAMBA_3_0_RELEASE/source: include locking smbd

2007-05-23 Thread jerry
Author: jerry
Date: 2007-05-23 22:46:30 + (Wed, 23 May 2007)
New Revision: 23101

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23101

Log:
grab remainder of rename fixes
Modified:
   branches/SAMBA_3_0_RELEASE/source/include/smb.h
   branches/SAMBA_3_0_RELEASE/source/locking/locking.c
   branches/SAMBA_3_0_RELEASE/source/smbd/open.c
   branches/SAMBA_3_0_RELEASE/source/smbd/reply.c
   branches/SAMBA_3_0_RELEASE/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/include/smb.h
===
--- branches/SAMBA_3_0_RELEASE/source/include/smb.h 2007-05-23 21:32:10 UTC 
(rev 23100)
+++ branches/SAMBA_3_0_RELEASE/source/include/smb.h 2007-05-23 22:46:30 UTC 
(rev 23101)
@@ -748,6 +748,7 @@
 };
 
 #define SHARE_MODE_FLAG_POSIX_OPEN 0x1
+#define SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE  0x2
 
 /* struct returned by get_share_modes */
 struct share_mode_entry {
@@ -765,7 +766,7 @@
SMB_INO_T inode;
unsigned long share_file_id;
uint32 uid; /* uid of file opener. */
-   uint16 flags;   /* POSIX_OPEN only defined so far... */
+   uint16 flags;   /* See SHARE_MODE_XX above. */
 };
 
 /* oplock break message definition - linearization of share_mode_entry.

Modified: branches/SAMBA_3_0_RELEASE/source/locking/locking.c
===
--- branches/SAMBA_3_0_RELEASE/source/locking/locking.c 2007-05-23 21:32:10 UTC 
(rev 23100)
+++ branches/SAMBA_3_0_RELEASE/source/locking/locking.c 2007-05-23 22:46:30 UTC 
(rev 23101)
@@ -993,10 +993,13 @@
 }
 
 void set_share_mode(struct share_mode_lock *lck, files_struct *fsp,
-   uid_t uid, uint16 mid, uint16 op_type)
+   uid_t uid, uint16 mid, uint16 op_type, BOOL 
initial_delete_on_close_allowed)
 {
struct share_mode_entry entry;
fill_share_mode_entry(entry, fsp, uid, mid, op_type);
+   if (initial_delete_on_close_allowed) {
+   entry.flags |= SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
+   }
add_share_mode_entry(lck, entry);
 }
 
@@ -1196,6 +1199,22 @@
return NT_STATUS_OK;
 }
 
+/
+ Do we have an open file handle that created this entry ?
+/
+
+BOOL can_set_initial_delete_on_close(const struct share_mode_lock *lck)
+{
+   int i;
+
+   for (i=0; ilck-num_share_modes; i++) {
+   if (lck-share_modes[i].flags  
SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE) {
+   return True;
+   }
+   }
+   return False;
+}
+
 /*
  Return a talloced copy of a UNIX_USER_TOKEN. NULL on fail.
  (Should this be in locking.c ?).
@@ -1296,6 +1315,31 @@
return True;
 }
 
+/
+ Sets the allow initial delete on close flag for this share mode.
+/
+
+BOOL set_allow_initial_delete_on_close(struct share_mode_lock *lck, 
files_struct *fsp, BOOL delete_on_close)
+{
+   struct share_mode_entry entry, *e;
+
+   /* Don't care about the pid owner being correct here - just a search. */
+   fill_share_mode_entry(entry, fsp, (uid_t)-1, 0, NO_OPLOCK);
+
+   e = find_share_mode_entry(lck, entry);
+   if (e == NULL) {
+   return False;
+   }
+
+   if (delete_on_close) {
+   e-flags |= SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
+   } else {
+   e-flags = ~SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE;
+   }
+   lck-modified = True;
+   return True;
+}
+
 struct forall_state {
void (*fn)(const struct share_mode_entry *entry,
   const char *sharepath,

Modified: branches/SAMBA_3_0_RELEASE/source/smbd/open.c
===
--- branches/SAMBA_3_0_RELEASE/source/smbd/open.c   2007-05-23 21:32:10 UTC 
(rev 23100)
+++ branches/SAMBA_3_0_RELEASE/source/smbd/open.c   2007-05-23 22:46:30 UTC 
(rev 23101)
@@ -47,7 +47,12 @@
NTSTATUS status = NT_STATUS_OK;
 
 #ifdef O_NOFOLLOW
-   if (!lp_symlinks(SNUM(conn))) {
+   /* 
+* Never follow symlinks on a POSIX client. The
+* client should be doing this.
+*/
+
+   if (fsp-posix_open || !lp_symlinks(SNUM(conn))) {
flags |= O_NOFOLLOW;
}
 #endif
@@ -1120,6 +1125,7 @@
BOOL file_existed = VALID_STAT(*psbuf);
BOOL def_acl = False;
BOOL posix_open = False;
+   BOOL new_file_created = False;
SMB_DEV_T dev = 0;
SMB_INO_T inode = 0;
NTSTATUS fsp_open = 

svn commit: samba r23102 - in branches/SAMBA_3_0_RELEASE: .

2007-05-23 Thread jerry
Author: jerry
Date: 2007-05-23 22:48:52 + (Wed, 23 May 2007)
New Revision: 23102

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23102

Log:
update release notes for jra's changes
Modified:
   branches/SAMBA_3_0_RELEASE/WHATSNEW.txt


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt
===
--- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-23 22:46:30 UTC (rev 
23101)
+++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2007-05-23 22:48:52 UTC (rev 
23102)
@@ -54,7 +54,8 @@
   about that we retry the lock every 10 seconds instead of waiting
   for the standard select timeout.
 * BUG 4637: Fix samlogon reply regression that broke domain logons.
-* Fix rename for Linux cifs fs client.
+* Fix rename on open files and improved cdelete-on-close semantics.
+* Fix POSIX setfilepathinfo to use lstat.
 
 
 o   Alexander Bokovoy [EMAIL PROTECTED]



svn commit: samba r23103 - in branches/SAMBA_4_0/source/torture/basic: .

2007-05-23 Thread jra
Author: jra
Date: 2007-05-23 23:11:16 + (Wed, 23 May 2007)
New Revision: 23103

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23103

Log:
Add a torture test for the insane semantics Steve's cifsfs client
uses so we don't regress :-).
Jeremy.

Modified:
   branches/SAMBA_4_0/source/torture/basic/delete.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/delete.c
===
--- branches/SAMBA_4_0/source/torture/basic/delete.c2007-05-23 22:48:52 UTC 
(rev 23102)
+++ branches/SAMBA_4_0/source/torture/basic/delete.c2007-05-23 23:11:16 UTC 
(rev 23103)
@@ -1257,6 +1257,109 @@
return correct;
 }
 
+/* Test 20b ... */
+static bool deltest20b(struct torture_context *tctx, struct smbcli_state 
*cli1, struct smbcli_state *cli2)
+{
+   int fnum1 = -1;
+   int fnum2 = -1;
+   bool correct = True;
+
+   del_clean_area(cli1, cli2);
+
+   /* Test 20a. */
+
+   /* Ensure the file doesn't already exist. */
+   smbcli_close(cli1-tree, fnum1);
+   smbcli_close(cli1-tree, fnum2);
+   smbcli_setatr(cli1-tree, fname, 0, 0);
+   smbcli_unlink(cli1-tree, fname);
+   smbcli_setatr(cli1-tree, fname_new, 0, 0);
+   smbcli_unlink(cli1-tree, fname_new);
+
+   /* Firstly open and create with all access */
+   fnum1 = smbcli_nt_create_full(cli1-tree, fname, 0, 
+ SEC_RIGHTS_FILE_ALL,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_READ|
+ NTCREATEX_SHARE_ACCESS_WRITE|
+ NTCREATEX_SHARE_ACCESS_DELETE,
+ NTCREATEX_DISP_CREATE, 
+ 0, 0);
+   torture_assert(tctx, fnum1 != -1, talloc_asprintf(tctx, open - 1 of %s 
failed (%s), 
+  fname, smbcli_errstr(cli1-tree)));
+
+   /* And close - just to create the file. */
+   smbcli_close(cli1-tree, fnum1);
+   
+   /* Firstly open and create with all access */
+   fnum1 = smbcli_nt_create_full(cli1-tree, fname, 0, 
+ SEC_RIGHTS_FILE_ALL,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_READ|
+ NTCREATEX_SHARE_ACCESS_WRITE|
+ NTCREATEX_SHARE_ACCESS_DELETE,
+ NTCREATEX_DISP_OPEN, 
+ 0, 0);
+   torture_assert(tctx, fnum1 != -1, talloc_asprintf(tctx, open - 1 of %s 
failed (%s), 
+  fname, smbcli_errstr(cli1-tree)));
+
+   /* Next open with all access, but add delete on close. */
+   fnum2 = smbcli_nt_create_full(cli2-tree, fname, 0, 
+ SEC_RIGHTS_FILE_ALL,
+ FILE_ATTRIBUTE_NORMAL,
+ NTCREATEX_SHARE_ACCESS_READ|
+ NTCREATEX_SHARE_ACCESS_WRITE|
+ NTCREATEX_SHARE_ACCESS_DELETE,
+ NTCREATEX_DISP_OPEN,
+ NTCREATEX_OPTIONS_DELETE_ON_CLOSE, 0);
+   
+   torture_assert(tctx, fnum2 != -1, talloc_asprintf(tctx, open - 2 of %s 
failed (%s), 
+  fname, smbcli_errstr(cli2-tree)));
+
+   /* The delete on close bit is *not* reported as being set. */
+   correct = check_delete_on_close(tctx, cli1, fnum1, fname, False, 
__location__);
+   correct = check_delete_on_close(tctx, cli2, fnum2, fname, False, 
__location__);
+
+   smbcli_close(cli1-tree, fnum1);
+
+   correct = check_delete_on_close(tctx, cli2, fnum2, fname, False, 
__location__);
+
+   /* Rename the file by handle. */
+
+   {
+   union smb_setfileinfo sfinfo;
+   NTSTATUS status;
+
+   memset(sfinfo, '\0', sizeof(sfinfo));
+   sfinfo.generic.level = RAW_SFILEINFO_RENAME_INFORMATION;
+   sfinfo.generic.in.file.fnum = fnum2;
+   sfinfo.rename_information.in.root_fid  = 0;
+   /* Don't start the filename with '\\', we get 
NT_STATUS_NOT_SUPPORTED if so. */
+   sfinfo.rename_information.in.new_name  = fname_new + 1;
+   sfinfo.rename_information.in.overwrite = 1;
+
+   status = smb_raw_setfileinfo(cli2-tree, sfinfo);
+
+   
torture_assert_ntstatus_equal(tctx,status,NT_STATUS_OK,talloc_asprintf(tctx, 
rename of %s to %s failed (%s),
+   fname, fname_new, smbcli_errstr(cli2-tree)));
+   }
+
+   correct = check_delete_on_close(tctx, cli2, fnum2, fname_new, False, 
__location__);
+
+   smbcli_close(cli2-tree, fnum2);
+
+   /* See if the file is deleted - 

svn commit: samba r23104 - in branches/SAMBA_4_0/source/torture/basic: .

2007-05-23 Thread jra
Author: jra
Date: 2007-05-23 23:14:48 + (Wed, 23 May 2007)
New Revision: 23104

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23104

Log:
Add comment explaining the new test.
Jeremy.

Modified:
   branches/SAMBA_4_0/source/torture/basic/delete.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/delete.c
===
--- branches/SAMBA_4_0/source/torture/basic/delete.c2007-05-23 23:11:16 UTC 
(rev 23103)
+++ branches/SAMBA_4_0/source/torture/basic/delete.c2007-05-23 23:14:48 UTC 
(rev 23104)
@@ -1258,6 +1258,12 @@
 }
 
 /* Test 20b ... */
+/* This is the delete semantics that the cifsfs client depends on when
+ * trying to delete an open file on a Windows server. It
+ * opens a file with initial delete on close set, renames it then closes
+ * all open handles. The file goes away on Windows.
+ */
+
 static bool deltest20b(struct torture_context *tctx, struct smbcli_state 
*cli1, struct smbcli_state *cli2)
 {
int fnum1 = -1;
@@ -1266,7 +1272,7 @@
 
del_clean_area(cli1, cli2);
 
-   /* Test 20a. */
+   /* Test 20b. */
 
/* Ensure the file doesn't already exist. */
smbcli_close(cli1-tree, fnum1);



svn commit: samba r23105 - in branches: SAMBA_3_0/examples/VFS SAMBA_3_0/source SAMBA_3_0/source/include SAMBA_3_0/source/lib SAMBA_3_0/source/modules SAMBA_3_0_26/examples/VFS SAMBA_3_0_26/source SAM

2007-05-23 Thread jra
Author: jra
Date: 2007-05-23 23:55:12 + (Wed, 23 May 2007)
New Revision: 23105

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23105

Log:
Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.

Modified:
   branches/SAMBA_3_0/examples/VFS/skel_opaque.c
   branches/SAMBA_3_0/examples/VFS/skel_transparent.c
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/smbprofile.h
   branches/SAMBA_3_0/source/include/vfs.h
   branches/SAMBA_3_0/source/include/vfs_macros.h
   branches/SAMBA_3_0/source/lib/system.c
   branches/SAMBA_3_0/source/modules/vfs_cap.c
   branches/SAMBA_3_0/source/modules/vfs_catia.c
   branches/SAMBA_3_0/source/modules/vfs_default.c
   branches/SAMBA_3_0/source/modules/vfs_full_audit.c
   branches/SAMBA_3_0/source/modules/vfs_netatalk.c
   branches/SAMBA_3_0_26/examples/VFS/skel_opaque.c
   branches/SAMBA_3_0_26/examples/VFS/skel_transparent.c
   branches/SAMBA_3_0_26/source/configure.in
   branches/SAMBA_3_0_26/source/include/smbprofile.h
   branches/SAMBA_3_0_26/source/include/vfs.h
   branches/SAMBA_3_0_26/source/include/vfs_macros.h
   branches/SAMBA_3_0_26/source/lib/system.c
   branches/SAMBA_3_0_26/source/modules/vfs_cap.c
   branches/SAMBA_3_0_26/source/modules/vfs_catia.c
   branches/SAMBA_3_0_26/source/modules/vfs_default.c
   branches/SAMBA_3_0_26/source/modules/vfs_full_audit.c
   branches/SAMBA_3_0_26/source/modules/vfs_netatalk.c


Changeset:
Sorry, the patch is too large (759 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23105


Build status as of Thu May 24 00:00:04 2007

2007-05-23 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-05-23 
00:00:57.0 +
+++ /home/build/master/cache/broken_results.txt 2007-05-24 00:02:04.0 
+
@@ -1,10 +1,10 @@
-Build status as of Wed May 23 00:00:02 2007
+Build status as of Thu May 24 00:00:04 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   36 6  0 
+ccache   37 6  0 
 ctdb 0  0  0 
 distcc   3  0  0 
 ldb  36 7  0 
@@ -17,7 +17,7 @@
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk3  3  0 
-samba4   34 21 5 
+samba4   34 27 5 
 samba_3_037 20 0 
 smb-build33 33 0 
 talloc   37 2  0 


Rev 337: merge from ronnie in http://samba.org/~tridge/ctdb

2007-05-23 Thread tridge

revno: 337
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: tridge
timestamp: Thu 2007-05-24 10:10:02 +1000
message:
  merge from ronnie
modified:
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

revno: 326.1.5
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-05-24 08:08:45 +1000
message:
  add a new command for ctdb_control to trigger a recovery

revno: 326.1.4
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg [EMAIL PROTECTED]
branch nick: ctdb
timestamp: Thu 2007-05-24 07:33:04 +1000
message:
  merge from tridge
=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-23 10:06:37 +
+++ b/tools/ctdb_control.c  2007-05-23 22:08:45 +
@@ -61,6 +61,7 @@
  getpid vnn   get the pid of a ctdb 
daemon\n
  dumpmemory vnn|all   dump memory map to log\n
  shutdown vnn shutdown a remote ctdb\n
+ recovery vnn trigger a recovery\n
  freeze vnn|all   freeze a node\n
  thaw vnn|all thaw a node\n
);
@@ -374,6 +375,28 @@
 }
 
 /*
+  trigger a recovery
+ */
+static int control_recovery(struct ctdb_context *ctdb, int argc, const char 
**argv)
+{
+   int ret;
+
+
+   ret = ctdb_ctrl_freeze(ctdb, timeval_current_ofs(timelimit, 0), 
CTDB_CURRENT_NODE);
+   if (ret != 0) {
+   printf(Unable to freeze node\n);
+   return ret;
+   }
+   ret = ctdb_ctrl_setrecmode(ctdb, timeval_current_ofs(timelimit, 0), 
CTDB_CURRENT_NODE, CTDB_RECOVERY_ACTIVE);
+   if (ret != 0) {
+   printf(Unable to set recovery mode\n);
+   return ret;
+   }
+
+   return 0;
+}
+
+/*
   display recovery mode of a remote node
  */
 static int control_getrecmode(struct ctdb_context *ctdb, int argc, const char 
**argv)
@@ -1056,6 +1079,7 @@
{ dumpmemory, control_dumpmemory },
{ getpid, control_getpid },
{ shutdown, control_shutdown },
+   { recovery, control_recovery },
{ freeze, control_freeze },
{ thaw, control_thaw },
};



svn commit: samba r23106 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_26/source/smbd

2007-05-23 Thread jra
Author: jra
Date: 2007-05-24 00:13:24 + (Thu, 24 May 2007)
New Revision: 23106

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23106

Log:
Use lchown for symlinks.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0_26/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===
--- branches/SAMBA_3_0/source/smbd/trans2.c 2007-05-23 23:55:12 UTC (rev 
23105)
+++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-05-24 00:13:24 UTC (rev 
23106)
@@ -5268,9 +5268,18 @@
 */
 
if ((set_owner != (uid_t)SMB_UID_NO_CHANGE)  (psbuf-st_uid != 
set_owner)) {
-   DEBUG(10,(smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC 
changing owner %u for file %s\n,
+   int ret;
+
+   DEBUG(10,(smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC 
changing owner %u for path %s\n,
(unsigned int)set_owner, fname ));
-   if (SMB_VFS_CHOWN(conn, fname, set_owner, (gid_t)-1) != 0) {
+
+   if (S_ISLNK(psbuf-st_mode)) {
+   ret = SMB_VFS_LCHOWN(conn, fname, set_owner, (gid_t)-1);
+   } else {
+   ret = SMB_VFS_CHOWN(conn, fname, set_owner, (gid_t)-1);
+   }
+
+   if (ret != 0) {
status = map_nt_error_from_unix(errno);
if (delete_on_fail) {
SMB_VFS_UNLINK(conn,fname);

Modified: branches/SAMBA_3_0_26/source/smbd/trans2.c
===
--- branches/SAMBA_3_0_26/source/smbd/trans2.c  2007-05-23 23:55:12 UTC (rev 
23105)
+++ branches/SAMBA_3_0_26/source/smbd/trans2.c  2007-05-24 00:13:24 UTC (rev 
23106)
@@ -5214,9 +5214,18 @@
 */
 
if ((set_owner != (uid_t)SMB_UID_NO_CHANGE)  (psbuf-st_uid != 
set_owner)) {
-   DEBUG(10,(smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC 
changing owner %u for file %s\n,
+   int ret;
+
+   DEBUG(10,(smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC 
changing owner %u for path %s\n,
(unsigned int)set_owner, fname ));
-   if (SMB_VFS_CHOWN(conn, fname, set_owner, (gid_t)-1) != 0) {
+
+   if (S_ISLNK(psbuf-st_mode)) {
+   ret = SMB_VFS_LCHOWN(conn, fname, set_owner, (gid_t)-1);
+   } else {
+   ret = SMB_VFS_CHOWN(conn, fname, set_owner, (gid_t)-1);
+   }
+
+   if (ret != 0) {
status = map_nt_error_from_unix(errno);
if (delete_on_fail) {
SMB_VFS_UNLINK(conn,fname);



svn commit: samba r23107 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd SAMBA_3_0_26/source/smbd

2007-05-23 Thread jra
Author: jra
Date: 2007-05-24 01:57:02 + (Thu, 24 May 2007)
New Revision: 23107

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=23107

Log:
Fix renames on file descriptors that are supposed to overwrite the
target. Needs merging for 3.0.25a (sorry).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0_25/source/smbd/reply.c
   branches/SAMBA_3_0_26/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4245,9 +4245,10 @@
ZERO_STRUCT(sbuf);
 
status = unix_convert(conn, newname, False, newname_last_component, 
sbuf);
-   /* We expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
-   if (!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
-   return NT_STATUS_OBJECT_NAME_COLLISION;
+
+   /* If an error we expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
+
+   if (!NT_STATUS_IS_OK(status)  
!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
return status;
}
 

Modified: branches/SAMBA_3_0_25/source/smbd/reply.c
===
--- branches/SAMBA_3_0_25/source/smbd/reply.c   2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0_25/source/smbd/reply.c   2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4195,9 +4195,10 @@
ZERO_STRUCT(sbuf);
 
status = unix_convert(conn, newname, False, newname_last_component, 
sbuf);
-   /* We expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
-   if (!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
-   return NT_STATUS_OBJECT_NAME_COLLISION;
+
+   /* If an error we expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
+
+   if (!NT_STATUS_IS_OK(status)  
!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
return status;
}
 

Modified: branches/SAMBA_3_0_26/source/smbd/reply.c
===
--- branches/SAMBA_3_0_26/source/smbd/reply.c   2007-05-24 00:13:24 UTC (rev 
23106)
+++ branches/SAMBA_3_0_26/source/smbd/reply.c   2007-05-24 01:57:02 UTC (rev 
23107)
@@ -4243,9 +4243,10 @@
ZERO_STRUCT(sbuf);
 
status = unix_convert(conn, newname, False, newname_last_component, 
sbuf);
-   /* We expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
-   if (!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
-   return NT_STATUS_OBJECT_NAME_COLLISION;
+
+   /* If an error we expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
+
+   if (!NT_STATUS_IS_OK(status)  
!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
return status;
}