svn commit: samba r22659 - in branches/SAMBA_3_0/source/lib/replace: . test

2007-05-03 Thread metze
Author: metze
Date: 2007-05-04 06:59:26 + (Fri, 04 May 2007)
New Revision: 22659

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22659

Log:
merge from SAMBA_4_0:

- add AC_GNU_SOURCE macro for systems which don't have it
  (sles8)
- fix compiler warning on some systems

metze
Modified:
   branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_3_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:02 UTC (rev 22658)
+++ branches/SAMBA_3_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:26 UTC (rev 22659)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_3_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:02 UTC (rev 22658)
+++ branches/SAMBA_3_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:26 UTC (rev 22659)
@@ -511,7 +511,7 @@
   "\tptr: %p - %p = %d != %d\n" \
   "]\n", \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



svn commit: samba r22658 - in branches/SAMBA_4_0/source/lib/replace: . test

2007-05-03 Thread metze
Author: metze
Date: 2007-05-04 06:59:02 + (Fri, 04 May 2007)
New Revision: 22658

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22658

Log:
- add AC_GNU_SOURCE macro for systems which don't have it
  (sles8)
- fix compiler warning on some systems

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4
===
--- branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2007-05-03 
20:52:48 UTC (rev 22657)
+++ branches/SAMBA_4_0/source/lib/replace/autoconf-2.60.m4  2007-05-04 
06:59:02 UTC (rev 22658)
@@ -1,3 +1,16 @@
+# AC_GNU_SOURCE
+# --
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+])
+
 # _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST,
 #  ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE)
 # --

Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-05-03 
20:52:48 UTC (rev 22657)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c  2007-05-04 
06:59:02 UTC (rev 22658)
@@ -511,7 +511,7 @@
   "\tptr: %p - %p = %d != %d\n" \
   "]\n", \
   __STRING(func), __location__, __STRING(func), \
-  str, diff, base, res, _v, _ep, _p, diff - (_ep - _p), 
diff); \
+  str, diff, base, res, _v, _ep, _p, (int)(diff - (_ep - 
_p)), diff); \
return false; \
} \
 } while (0)



Rev 248: added a tdb_enable_seqnum() function in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 248
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 15:29:10 +1000
message:
  added a tdb_enable_seqnum() function
modified:
  lib/tdb/common/tdb.c   tdb.c-20070220022425-m1wibgjq7n5hahs6-9
  lib/tdb/include/tdb.h  tdb.h-20070125040949-7t3f5zdl1q4z9hyv-101
=== modified file 'lib/tdb/common/tdb.c'
--- a/lib/tdb/common/tdb.c  2007-04-16 12:52:58 +
+++ b/lib/tdb/common/tdb.c  2007-05-04 05:29:10 +
@@ -649,3 +649,11 @@
return tdb->flags;
 }
 
+
+/*
+  enable sequence number handling on an open tdb
+*/
+void tdb_enable_seqnum(struct tdb_context *tdb)
+{
+   tdb->flags |= TDB_SEQNUM;
+}

=== modified file 'lib/tdb/include/tdb.h'
--- a/lib/tdb/include/tdb.h 2007-04-16 13:03:36 +
+++ b/lib/tdb/include/tdb.h 2007-05-04 05:29:10 +
@@ -131,6 +131,7 @@
 int tdb_hash_size(struct tdb_context *tdb);
 size_t tdb_map_size(struct tdb_context *tdb);
 int tdb_get_flags(struct tdb_context *tdb);
+void tdb_enable_seqnum(struct tdb_context *tdb);
 
 /* Low level locking functions: use with care */
 int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);



Rev 249: added a ctdb control for enabling the tdb seqnum in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 249
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 15:33:28 +1000
message:
  added a ctdb control for enabling the tdb seqnum
modified:
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
=== modified file 'common/ctdb_control.c'
--- a/common/ctdb_control.c 2007-05-04 01:41:29 +
+++ b/common/ctdb_control.c 2007-05-04 05:33:28 +
@@ -395,6 +395,16 @@
case CTDB_CONTROL_DEREGISTER_SRVID:
return daemon_deregister_message_handler(ctdb, client_id, 
srvid);
 
+   case CTDB_CONTROL_ENABLE_SEQNUM: {
+   uint32_t db_id;
+   struct ctdb_db_context *ctdb_db;
+   CHECK_CONTROL_DATA_SIZE(sizeof(db_id));
+   ctdb_db = find_ctdb_db(ctdb, db_id);
+   if (!ctdb_db) return -1;
+   tdb_enable_seqnum(ctdb_db->ltdb->tdb);
+   return 0;
+   }
+
default:
DEBUG(0,(__location__ " Unknown CTDB control opcode %u\n", 
opcode));
return -1;

=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h2007-05-04 01:41:29 +
+++ b/include/ctdb_private.h2007-05-04 05:33:28 +
@@ -282,6 +282,7 @@
CTDB_CONTROL_TRAVERSE_DATA,
CTDB_CONTROL_REGISTER_SRVID,
CTDB_CONTROL_DEREGISTER_SRVID,
+   CTDB_CONTROL_ENABLE_SEQNUM,
 };
 
 



Re: svn commit: samba r22651 - in branches: .

2007-05-03 Thread Stefan (metze) Metzmacher
> Author: jerry
> Date: 2007-05-03 16:59:58 + (Thu, 03 May 2007)
> New Revision: 22651
>
> WebSVN:
> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22651
>
> Log:
> branch SAMBA_3_0_26 from the 3.0.25 tree
> Added:
>branches/SAMBA_3_0_26/

Hi Jerry,

wouldn't it be better to branch from the SAMBA_3_0 tree?
then svn blame would give better results...

metze


Rev 247: make catdb take a dbname instead of an id in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 247
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 13:25:30 +1000
message:
  make catdb take a dbname instead of an id
modified:
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1
=== modified file 'tools/ctdb_control.c'
--- a/tools/ctdb_control.c  2007-05-04 02:18:39 +
+++ b/tools/ctdb_control.c  2007-05-04 03:25:30 +
@@ -46,7 +46,7 @@
"  getdbmap  lists databases on a 
node\n"
"  getnodemaplists nodes known to a 
ctdb daemon\n"
"  createdb  create a database\n"
-   "  catdblists all keys/data in a 
db\n"
+   "  catdb  lists all keys/data in a 
db\n"
"  cpdb lists all keys in a 
remote tdb\n"
"  setdmaster sets new dmaster for all 
records in the database\n"
"  cleardb deletes all records in a 
db\n"
@@ -512,7 +512,7 @@
  */
 static int control_catdb(struct ctdb_context *ctdb, int argc, const char 
**argv)
 {
-   uint32_t dbid;
+   const char *db_name;
struct ctdb_db_context *ctdb_db;
int ret;
 
@@ -520,11 +520,10 @@
usage();
}
 
-   dbid = strtoul(argv[0], NULL, 0);
-   
-   ctdb_db = find_ctdb_db(ctdb, dbid);
+   db_name = argv[0];
+   ctdb_db = ctdb_attach(ctdb, db_name);
if (ctdb_db == NULL) {
-   printf("Unable to find database 0x%x\n", dbid);
+   DEBUG(0,("Unable to attach to database '%s'\n", db_name));
return -1;
}
 
@@ -534,6 +533,8 @@
return -1;
}
 
+   talloc_free(ctdb_db);
+
printf("Dumped %d records\n", ret);
return 0;
 }



Rev 246: nicer interface to ctdb traverse in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 246
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 12:18:39 +1000
message:
  nicer interface to ctdb traverse
modified:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  tests/ctdb_test.c  ctdb_test.c-20061117234101-o3qt14umlg9en8z0-16
  tests/ctdbd.sh ctdbd.sh-20070411085038-phusiewluwzyqjpc-2
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

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


Rev 245: - changed the REQ_REGISTER PDU to be a control in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 245
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 11:41:29 +1000
message:
  - changed the REQ_REGISTER PDU to be a control
  
  - allow controls to know which client invoked them
  
  - added a client_id to clients, so they can be identified remotely
  
  - added the ability to remove registered srvids
  
  - in the list_keys code, register a temp srvid, then remove it afterwards
modified:
  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_ltdb.c ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
  common/ctdb_message.c  
ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1
  common/ctdb_traverse.c 
ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1
  direct/ctdbd_test.cctdbd_test.c-20070411085057-17kgjzfktsh28g99-1
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tests/ctdbd.sh ctdbd.sh-20070411085038-phusiewluwzyqjpc-2
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

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


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

2007-05-03 Thread tridge

revno: 244
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Fri 2007-05-04 10:43:39 +1000
message:
  merge from ronnie
added:
  direct/recoverd.c  recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  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
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tests/ctdbd.sh ctdbd.sh-20070411085038-phusiewluwzyqjpc-2
  tools/ctdb_control.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

revno: 197.1.49
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-05-04 09:45:53 +1000
message:
  update getvnnmap control to take a timeout parameter
  dont explicitely free the vnnmap pointer in the getvnnmap control  this 
  is freed by the mem_ctx instead
  
  add code to the recoverd to detect when/if recovery is required
  veiry that the number of active nodes, the nodemap and the vnn map is 
  consistent across the entire cluster and if not   trigger a recovery 
  (which right now just prints "we need to do recovery" to the screen.

revno: 197.1.48
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-05-04 09:01:01 +1000
message:
  change the signature for ctdb_ctrl_getnodemap() so that a timeout 
  parameter is added.
  change ctdb_get_connected_nodes in the same way

revno: 197.1.47
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-05-04 08:32:02 +1000
message:
  ctdb_control should use the provided timeout and not hardcode to 1.0 
  seconds

revno: 197.1.46
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-05-04 08:30:18 +1000
message:
  start working on a recovery daemon
  
  change ctdb_control so it takes a timeval pointer as argument.
  this is the timeout. if the node has not responded within hte timeout
  ctdb_control will return an error instead of hanging.
  if the timeval pointer is NULL then the call will block indefinitely if 
  there is no response.
  
  this is used for now in the createdb control   but all the helpers 
  ctdb_ctrl_* should probably be updated to take a timeout parameter as 
  well.

revno: 197.1.45
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Thu 2007-05-03 17:16:38 +1000
message:
  merge from tridge

revno: 197.1.44
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Thu 2007-05-03 16:18:03 +1000
message:
  cleanup the control "write record"

revno: 197.1.43
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Thu 2007-05-03 14:42:53 +1000
message:
  merge from tridge

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


Build status as of Fri May 4 00:00:02 2007

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

--- /home/build/master/cache/broken_results.txt.old 2007-05-03 
00:01:13.0 +
+++ /home/build/master/cache/broken_results.txt 2007-05-04 00:00:46.0 
+
@@ -1,25 +1,25 @@
-Build status as of Thu May  3 00:00:02 2007
+Build status as of Fri May  4 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   37 6  0 
+ccache   36 5  0 
 ctdb 0  0  0 
-distcc   4  0  0 
-ldb  36 10 0 
+distcc   3  0  0 
+ldb  35 10 0 
 libreplace   33 11 0 
 lorikeet-heimdal 31 16 0 
-pidl 20 16 0 
+pidl 19 16 0 
 ppp  15 0  0 
 python   0  0  0 
-rsync37 19 0 
+rsync36 19 0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba-gtk4  4  0 
-samba4   39 34 4 
-samba_3_042 42 1 
-smb-build33 32 0 
-talloc   37 2  0 
-tdb  36 3  0 
+samba4   37 33 4 
+samba_3_041 41 1 
+smb-build32 31 0 
+talloc   36 2  0 
+tdb  35 3  0 
 


svn commit: samba r22657 - in branches/SAMBA_3_0_RELEASE/source/libsmb: .

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 20:52:48 + (Thu, 03 May 2007)
New Revision: 22657

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22657

Log:
merge gd netsamlogon talloc fix
Modified:
   branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c   2007-05-03 
20:14:50 UTC (rev 22656)
+++ branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c   2007-05-03 
20:52:48 UTC (rev 22657)
@@ -195,7 +195,6 @@

if ( data.dptr ) {
 
-
user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
if (user == NULL) {
return NULL;
@@ -206,12 +205,12 @@

if ( !prs_uint32( "timestamp", &ps, 0, &t ) ) {
prs_mem_free( &ps );
-   SAFE_FREE(user);
+   TALLOC_FREE(user);
return False;
}

if ( !net_io_user_info3("", user, &ps, 0, 3, 0) ) {
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}

prs_mem_free( &ps );
@@ -230,7 +229,7 @@
if ( (time_diff < 0 ) || (time_diff > lp_winbind_cache_time()) 
) {
DEBUG(10,("netsamlogon_cache_get: cache entry expired 
\n"));
tdb_delete( netsamlogon_tdb, key );
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}
 #endif
}



svn commit: samba r22656 - in branches/SAMBA_3_0_26/source/libsmb: .

2007-05-03 Thread gd
Author: gd
Date: 2007-05-03 20:14:50 + (Thu, 03 May 2007)
New Revision: 22656

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22656

Log:
merge to 3_0_26 as well.

Guenther

Modified:
   branches/SAMBA_3_0_26/source/libsmb/samlogon_cache.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0_26/source/libsmb/samlogon_cache.c2007-05-03 
20:12:00 UTC (rev 22655)
+++ branches/SAMBA_3_0_26/source/libsmb/samlogon_cache.c2007-05-03 
20:14:50 UTC (rev 22656)
@@ -195,7 +195,6 @@

if ( data.dptr ) {
 
-
user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
if (user == NULL) {
return NULL;
@@ -206,12 +205,12 @@

if ( !prs_uint32( "timestamp", &ps, 0, &t ) ) {
prs_mem_free( &ps );
-   SAFE_FREE(user);
+   TALLOC_FREE(user);
return False;
}

if ( !net_io_user_info3("", user, &ps, 0, 3, 0) ) {
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}

prs_mem_free( &ps );
@@ -230,7 +229,7 @@
if ( (time_diff < 0 ) || (time_diff > lp_winbind_cache_time()) 
) {
DEBUG(10,("netsamlogon_cache_get: cache entry expired 
\n"));
tdb_delete( netsamlogon_tdb, key );
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}
 #endif
}



svn commit: samba r22655 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_25/source/libsmb

2007-05-03 Thread gd
Author: gd
Date: 2007-05-03 20:12:00 + (Thu, 03 May 2007)
New Revision: 22655

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22655

Log:
Call correct free-macros in netsamlogon_cache_get() error paths. Forgot those
in the previous commit.

Guenther

Modified:
   branches/SAMBA_3_0/source/libsmb/samlogon_cache.c
   branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0/source/libsmb/samlogon_cache.c   2007-05-03 17:05:25 UTC 
(rev 22654)
+++ branches/SAMBA_3_0/source/libsmb/samlogon_cache.c   2007-05-03 20:12:00 UTC 
(rev 22655)
@@ -193,7 +193,6 @@

if ( data.dptr ) {
 
-
user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
if (user == NULL) {
return NULL;
@@ -204,12 +203,12 @@

if ( !prs_uint32( "timestamp", &ps, 0, &t ) ) {
prs_mem_free( &ps );
-   SAFE_FREE(user);
+   TALLOC_FREE(user);
return False;
}

if ( !net_io_user_info3("", user, &ps, 0, 3, 0) ) {
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}

prs_mem_free( &ps );
@@ -228,7 +227,7 @@
if ( (time_diff < 0 ) || (time_diff > lp_winbind_cache_time()) 
) {
DEBUG(10,("netsamlogon_cache_get: cache entry expired 
\n"));
tdb_delete( netsamlogon_tdb, key );
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}
 #endif
}

Modified: branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-05-03 
17:05:25 UTC (rev 22654)
+++ branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-05-03 
20:12:00 UTC (rev 22655)
@@ -195,7 +195,6 @@

if ( data.dptr ) {
 
-
user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
if (user == NULL) {
return NULL;
@@ -206,12 +205,12 @@

if ( !prs_uint32( "timestamp", &ps, 0, &t ) ) {
prs_mem_free( &ps );
-   SAFE_FREE(user);
+   TALLOC_FREE(user);
return False;
}

if ( !net_io_user_info3("", user, &ps, 0, 3, 0) ) {
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}

prs_mem_free( &ps );
@@ -230,7 +229,7 @@
if ( (time_diff < 0 ) || (time_diff > lp_winbind_cache_time()) 
) {
DEBUG(10,("netsamlogon_cache_get: cache entry expired 
\n"));
tdb_delete( netsamlogon_tdb, key );
-   SAFE_FREE( user );
+   TALLOC_FREE( user );
}
 #endif
}



svn commit: samba r22654 - in branches/SAMBA_3_0/source: .

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 17:05:25 + (Thu, 03 May 2007)
New Revision: 22654

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22654

Log:
And this is now Samba 3.0.27pre1-SVN
Modified:
   branches/SAMBA_3_0/source/VERSION


Changeset:
Modified: branches/SAMBA_3_0/source/VERSION
===
--- branches/SAMBA_3_0/source/VERSION   2007-05-03 17:03:25 UTC (rev 22653)
+++ branches/SAMBA_3_0/source/VERSION   2007-05-03 17:05:25 UTC (rev 22654)
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=0
-SAMBA_VERSION_RELEASE=26
+SAMBA_VERSION_RELEASE=27
 
 
 # If a official release has a serious bug  #



svn commit: samba r22653 - in branches/SAMBA_3_0_26/source: .

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 17:03:25 + (Thu, 03 May 2007)
New Revision: 22653

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22653

Log:
This is Samba 3.0.26pre1-SVN
Modified:
   branches/SAMBA_3_0_26/source/VERSION


Changeset:
Modified: branches/SAMBA_3_0_26/source/VERSION
===
--- branches/SAMBA_3_0_26/source/VERSION2007-05-03 17:02:12 UTC (rev 
22652)
+++ branches/SAMBA_3_0_26/source/VERSION2007-05-03 17:03:25 UTC (rev 
22653)
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=0
-SAMBA_VERSION_RELEASE=25
+SAMBA_VERSION_RELEASE=26
 
 
 # Bug fix releases use a letter for the patch revision #
@@ -46,7 +46,7 @@
 # e.g. SAMBA_VERSION_PRE_RELEASE=1 #
 #  ->  "2.2.9pre1" #
 
-SAMBA_VERSION_PRE_RELEASE=
+SAMBA_VERSION_PRE_RELEASE=1
 
 
 # For 'rc' releases the version will be#
@@ -56,7 +56,7 @@
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=4
+SAMBA_VERSION_RC_RELEASE=
 
 
 # To mark SVN snapshots this should be set to 'yes'#



svn commit: samba r22652 - in branches/SAMBA_3_0_26/source: include smbd

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 17:02:12 + (Thu, 03 May 2007)
New Revision: 22652

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22652

Log:
re-add Jeremy objectID changes
Modified:
   branches/SAMBA_3_0_26/source/include/ntioctl.h
   branches/SAMBA_3_0_26/source/smbd/nttrans.c
   branches/SAMBA_3_0_26/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/include/ntioctl.h
===
--- branches/SAMBA_3_0_26/source/include/ntioctl.h  2007-05-03 16:59:58 UTC 
(rev 22651)
+++ branches/SAMBA_3_0_26/source/include/ntioctl.h  2007-05-03 17:02:12 UTC 
(rev 22652)
@@ -47,7 +47,7 @@
 #define FSCTL_SET_REPARSE_POINT  0x000900A4
 #define FSCTL_GET_REPARSE_POINT  0x000900A8
 #define FSCTL_DELETE_REPARSE_POINT   0x000900AC
-#define FSCTL_0x000900C00x000900C0
+#define FSCTL_CREATE_OR_GET_OBJECT_ID 0x000900C0
 #define FSCTL_SET_SPARSE 0x000900C4
 #define FSCTL_SET_ZERO_DATA  0x000900C8
 #define FSCTL_SET_ENCRYPTION 0x000900D7

Modified: branches/SAMBA_3_0_26/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0_26/source/smbd/nttrans.c 2007-05-03 16:59:58 UTC (rev 
22651)
+++ branches/SAMBA_3_0_26/source/smbd/nttrans.c 2007-05-03 17:02:12 UTC (rev 
22652)
@@ -2279,15 +2279,29 @@
0);
return -1;

-   case FSCTL_0x000900C0:
-   /* pretend this succeeded - don't know what this really is
-  but works ok like this --metze
+   case FSCTL_CREATE_OR_GET_OBJECT_ID:
+   {
+   unsigned char objid[16];
+
+   /* This should return the object-id on this file.
+* I think I'll make this be the inode+dev. JRA.
 */
 
-   DEBUG(10,("FSCTL_0x000900C0: called on FID[0x%04X](but not 
implemented)\n",fidnum));
-   send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, NULL,
-   0);
+   DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on 
FID[0x%04X]\n",fidnum));
+
+   data_count = 64;
+   pdata = nttrans_realloc(ppdata, data_count);
+   if (pdata == NULL) {
+   return ERROR_NT(NT_STATUS_NO_MEMORY);
+   }   
+   SINO_T_VAL(pdata,0,fsp->inode);
+   SDEV_T_VAL(pdata,8,fsp->dev);
+   memcpy(pdata+16,create_volume_objectid(conn,objid),16);
+   SINO_T_VAL(pdata,32,fsp->inode);
+   SDEV_T_VAL(pdata,40,fsp->dev);
+   send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, pdata, 
data_count);
return -1;
+   }
 
case FSCTL_GET_REPARSE_POINT:
/* pretend this fail - my winXP does it like this
@@ -2295,9 +2309,7 @@
 */
 
DEBUG(10,("FSCTL_GET_REPARSE_POINT: called on FID[0x%04X](but 
not implemented)\n",fidnum));
-   send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT,
-   NULL, 0, NULL, 0);
-   return -1;
+   return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT);
 
case FSCTL_SET_REPARSE_POINT:
/* pretend this fail - I'm assuming this because of the 
FSCTL_GET_REPARSE_POINT case.
@@ -2305,9 +2317,7 @@
 */
 
DEBUG(10,("FSCTL_SET_REPARSE_POINT: called on FID[0x%04X](but 
not implemented)\n",fidnum));
-   send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT,
-   NULL, 0, NULL, 0);
-   return -1;
+   return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT);

case FSCTL_GET_SHADOW_COPY_DATA: /* don't know if this name is 
right...*/
{

Modified: branches/SAMBA_3_0_26/source/smbd/trans2.c
===
--- branches/SAMBA_3_0_26/source/smbd/trans2.c  2007-05-03 16:59:58 UTC (rev 
22651)
+++ branches/SAMBA_3_0_26/source/smbd/trans2.c  2007-05-03 17:02:12 UTC (rev 
22652)
@@ -2219,6 +2219,12 @@
return(-1);
 }
 
+unsigned char *create_volume_objectid(connection_struct *conn, unsigned char 
objid[16])
+{
+   E_md4hash(lp_servicename(SNUM(conn)),objid);
+   return objid;
+}
+
 /
  Reply to a TRANS2_QFSINFO (query filesystem info).
 /
@@ -2326,6 +2332,8 @@
 

SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH|
(lp_nt_acl_support(SNUM(conn)) ? 
FILE_PERSISTENT_ACLS : 0)|
+   FILE_SUPPORTS_OBJECT_IDS|
+   FILE_UNICODE_ON_DISK|
  

svn commit: samba r22651 - in branches: .

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 16:59:58 + (Thu, 03 May 2007)
New Revision: 22651

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22651

Log:
branch SAMBA_3_0_26 from the 3.0.25 tree
Added:
   branches/SAMBA_3_0_26/


Changeset:
Copied: branches/SAMBA_3_0_26 (from rev 22650, branches/SAMBA_3_0_25)



svn commit: samba r22650 - in branches/SAMBA_3_0_RELEASE: examples/VFS source source/auth source/client source/groupdb source/include source/lib source/lib/talloc source/libaddns source/libads source/

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 16:58:30 + (Thu, 03 May 2007)
New Revision: 22650

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22650

Log:
sync up with SMABA_3_0_25 as of svn r22649
Modified:
   branches/SAMBA_3_0_RELEASE/examples/VFS/shadow_copy_test.c
   branches/SAMBA_3_0_RELEASE/source/VERSION
   branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c
   branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c
   branches/SAMBA_3_0_RELEASE/source/groupdb/mapping.c
   branches/SAMBA_3_0_RELEASE/source/include/smb_macros.h
   branches/SAMBA_3_0_RELEASE/source/lib/data_blob.c
   branches/SAMBA_3_0_RELEASE/source/lib/privileges.c
   branches/SAMBA_3_0_RELEASE/source/lib/secace.c
   branches/SAMBA_3_0_RELEASE/source/lib/secdesc.c
   branches/SAMBA_3_0_RELEASE/source/lib/talloc/talloc.c
   branches/SAMBA_3_0_RELEASE/source/lib/talloc/talloc.h
   branches/SAMBA_3_0_RELEASE/source/lib/util.c
   branches/SAMBA_3_0_RELEASE/source/lib/util_sid.c
   branches/SAMBA_3_0_RELEASE/source/libaddns/dns.h
   branches/SAMBA_3_0_RELEASE/source/libaddns/dnsrecord.c
   branches/SAMBA_3_0_RELEASE/source/libaddns/dnssock.c
   branches/SAMBA_3_0_RELEASE/source/libads/dns.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap.c
   branches/SAMBA_3_0_RELEASE/source/libgpo/gpo_ldap.c
   branches/SAMBA_3_0_RELEASE/source/libmsrpc/cac_lsarpc.c
   branches/SAMBA_3_0_RELEASE/source/libmsrpc/cac_samr.c
   branches/SAMBA_3_0_RELEASE/source/libmsrpc/cac_winreg.c
   branches/SAMBA_3_0_RELEASE/source/libmsrpc/libmsrpc_internal.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/cliconnect.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/clifile.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/cliquota.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c
   branches/SAMBA_3_0_RELEASE/source/locking/brlock.c
   branches/SAMBA_3_0_RELEASE/source/locking/locking.c
   branches/SAMBA_3_0_RELEASE/source/modules/nfs4_acls.c
   branches/SAMBA_3_0_RELEASE/source/modules/vfs_afsacl.c
   branches/SAMBA_3_0_RELEASE/source/modules/vfs_aixacl2.c
   branches/SAMBA_3_0_RELEASE/source/modules/vfs_gpfs.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ad.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_rid.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/idmap_tdb.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/wb_client.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_ads.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_passdb.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_util.c
   branches/SAMBA_3_0_RELEASE/source/passdb/lookup_sid.c
   branches/SAMBA_3_0_RELEASE/source/printing/notify.c
   branches/SAMBA_3_0_RELEASE/source/printing/nt_printing.c
   branches/SAMBA_3_0_RELEASE/source/registry/reg_objects.c
   branches/SAMBA_3_0_RELEASE/source/registry/regfio.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_ds.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_lsarpc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_spoolss.c
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_srvsvc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_buffer.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_dfs.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_eventlog.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_lsa.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_ntsvcs.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_prs.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_spoolss.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_svcctl.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_dfs_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_echo_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_samr_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_spoolss_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_spoolss.c
   branches/SAMBA_3_0_RELEASE/source/smbd/conn.c
   branches/SAMBA_3_0_RELEASE/source/smbd/fake_file.c
   branches/SAMBA_3_0_RELEASE/source/smbd/lanman.c
   branches/SAMBA_3_0_RELEASE/source/smbd/msdfs.c
   branches/SAMBA_3_0_RELEASE/source/smbd/notify_inotify.c
   branches/SAMBA_3_0_RELEASE/source/smbd/notify_internal.c
   branches/SAMBA_3_0_RELEASE/source/smbd/ntquotas.c
   branches/SAMBA_3_0_RELEASE/source/smbd/nttrans.c
   branches/SAMBA_3_0_RELEASE/source/smbd/posix_acls.c
  

svn commit: samba r22649 - in branches/SAMBA_3_0_25/source: include smbd

2007-05-03 Thread jerry
Author: jerry
Date: 2007-05-03 16:57:54 + (Thu, 03 May 2007)
New Revision: 22649

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22649

Log:
revert the objectID changes (for now) and leave these for 3.0.26
Modified:
   branches/SAMBA_3_0_25/source/include/ntioctl.h
   branches/SAMBA_3_0_25/source/smbd/nttrans.c
   branches/SAMBA_3_0_25/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/include/ntioctl.h
===
--- branches/SAMBA_3_0_25/source/include/ntioctl.h  2007-05-03 16:14:22 UTC 
(rev 22648)
+++ branches/SAMBA_3_0_25/source/include/ntioctl.h  2007-05-03 16:57:54 UTC 
(rev 22649)
@@ -47,7 +47,7 @@
 #define FSCTL_SET_REPARSE_POINT  0x000900A4
 #define FSCTL_GET_REPARSE_POINT  0x000900A8
 #define FSCTL_DELETE_REPARSE_POINT   0x000900AC
-#define FSCTL_CREATE_OR_GET_OBJECT_ID 0x000900C0
+#define FSCTL_0x000900C00x000900C0
 #define FSCTL_SET_SPARSE 0x000900C4
 #define FSCTL_SET_ZERO_DATA  0x000900C8
 #define FSCTL_SET_ENCRYPTION 0x000900D7

Modified: branches/SAMBA_3_0_25/source/smbd/nttrans.c
===
--- branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-05-03 16:14:22 UTC (rev 
22648)
+++ branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-05-03 16:57:54 UTC (rev 
22649)
@@ -2279,29 +2279,15 @@
0);
return -1;

-   case FSCTL_CREATE_OR_GET_OBJECT_ID:
-   {
-   unsigned char objid[16];
-
-   /* This should return the object-id on this file.
-* I think I'll make this be the inode+dev. JRA.
+   case FSCTL_0x000900C0:
+   /* pretend this succeeded - don't know what this really is
+  but works ok like this --metze
 */
 
-   DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on 
FID[0x%04X]\n",fidnum));
-
-   data_count = 64;
-   pdata = nttrans_realloc(ppdata, data_count);
-   if (pdata == NULL) {
-   return ERROR_NT(NT_STATUS_NO_MEMORY);
-   }   
-   SINO_T_VAL(pdata,0,fsp->inode);
-   SDEV_T_VAL(pdata,8,fsp->dev);
-   memcpy(pdata+16,create_volume_objectid(conn,objid),16);
-   SINO_T_VAL(pdata,32,fsp->inode);
-   SDEV_T_VAL(pdata,40,fsp->dev);
-   send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, pdata, 
data_count);
+   DEBUG(10,("FSCTL_0x000900C0: called on FID[0x%04X](but not 
implemented)\n",fidnum));
+   send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, NULL,
+   0);
return -1;
-   }
 
case FSCTL_GET_REPARSE_POINT:
/* pretend this fail - my winXP does it like this
@@ -2309,7 +2295,9 @@
 */
 
DEBUG(10,("FSCTL_GET_REPARSE_POINT: called on FID[0x%04X](but 
not implemented)\n",fidnum));
-   return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT);
+   send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT,
+   NULL, 0, NULL, 0);
+   return -1;
 
case FSCTL_SET_REPARSE_POINT:
/* pretend this fail - I'm assuming this because of the 
FSCTL_GET_REPARSE_POINT case.
@@ -2317,7 +2305,9 @@
 */
 
DEBUG(10,("FSCTL_SET_REPARSE_POINT: called on FID[0x%04X](but 
not implemented)\n",fidnum));
-   return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT);
+   send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT,
+   NULL, 0, NULL, 0);
+   return -1;

case FSCTL_GET_SHADOW_COPY_DATA: /* don't know if this name is 
right...*/
{

Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c
===
--- branches/SAMBA_3_0_25/source/smbd/trans2.c  2007-05-03 16:14:22 UTC (rev 
22648)
+++ branches/SAMBA_3_0_25/source/smbd/trans2.c  2007-05-03 16:57:54 UTC (rev 
22649)
@@ -2219,12 +2219,6 @@
return(-1);
 }
 
-unsigned char *create_volume_objectid(connection_struct *conn, unsigned char 
objid[16])
-{
-   E_md4hash(lp_servicename(SNUM(conn)),objid);
-   return objid;
-}
-
 /
  Reply to a TRANS2_QFSINFO (query filesystem info).
 /
@@ -2332,8 +2326,6 @@
 

SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH|
(lp_nt_acl_support(SNUM(conn)) ? 
FILE_PERSISTENT_ACLS : 0)|
-   FILE_SUPPORTS_OBJECT_IDS|
-   FILE_U

svn commit: samba r22648 - in branches/SAMBA_3_0/source/param: .

2007-05-03 Thread jpeach
Author: jpeach
Date: 2007-05-03 16:14:22 + (Thu, 03 May 2007)
New Revision: 22648

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22648

Log:
Fix comment to match the code.

Modified:
   branches/SAMBA_3_0/source/param/loadparm.c


Changeset:
Modified: branches/SAMBA_3_0/source/param/loadparm.c
===
--- branches/SAMBA_3_0/source/param/loadparm.c  2007-05-03 12:29:32 UTC (rev 
22647)
+++ branches/SAMBA_3_0/source/param/loadparm.c  2007-05-03 16:14:22 UTC (rev 
22648)
@@ -2577,7 +2577,7 @@
 }
 
 /***
-  Convert a string to uppercase and remove whitespaces.
+  Canonicalize by converting to lowercase.
 ***/
 
 static char *canonicalize_servicename(const char *src)



svn commit: samba r22647 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/libsmb SAMBA_3_0_25/source/nsswitch

2007-05-03 Thread gd
Author: gd
Date: 2007-05-03 12:29:32 + (Thu, 03 May 2007)
New Revision: 22647

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22647

Log:
Avoid leaking a full info3 structure on each winbindd cached login by making
netsamlogon_cache_get() return a talloc'ed structure.

Guenther

Modified:
   branches/SAMBA_3_0/source/libsmb/samlogon_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
   branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0/source/libsmb/samlogon_cache.c   2007-05-03 12:28:25 UTC 
(rev 22646)
+++ branches/SAMBA_3_0/source/libsmb/samlogon_cache.c   2007-05-03 12:29:32 UTC 
(rev 22647)
@@ -192,10 +192,13 @@
data = tdb_fetch_bystring( netsamlogon_tdb, keystr );

if ( data.dptr ) {
-   
-   if ( (user = SMB_MALLOC_P(NET_USER_INFO_3)) == NULL )
+
+
+   user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
+   if (user == NULL) {
return NULL;
-   
+   }
+
prs_init( &ps, 0, mem_ctx, UNMARSHALL );
prs_give_memory( &ps, (char *)data.dptr, data.dsize, True );

@@ -247,7 +250,6 @@
result = (user != NULL);
 
talloc_destroy(mem_ctx);
-   SAFE_FREE(user);
 
return result;
 }

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2007-05-03 12:28:25 UTC 
(rev 22646)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c   2007-05-03 12:29:32 UTC 
(rev 22647)
@@ -422,7 +422,7 @@
user_info->shell = NULL;
user_info->primary_gid = (gid_t)-1;

-   SAFE_FREE(user);
+   TALLOC_FREE(user);

return NT_STATUS_OK;
}

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2007-05-03 12:28:25 UTC 
(rev 22646)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2007-05-03 12:29:32 UTC 
(rev 22647)
@@ -984,7 +984,7 @@
}
 
if (info3->num_groups == 0) {
-   SAFE_FREE(info3);
+   TALLOC_FREE(info3);
return NT_STATUS_UNSUCCESSFUL;
}

@@ -992,7 +992,7 @@
sid_compose(&primary_group, &info3->dom_sid.sid, info3->user_rid);

if (!add_sid_to_array(mem_ctx, &primary_group, user_sids, &num_groups)) 
{
-   SAFE_FREE(info3);
+   TALLOC_FREE(info3);
return NT_STATUS_NO_MEMORY;
}
 
@@ -1002,12 +1002,12 @@
 
if (!add_sid_to_array(mem_ctx, &group_sid, user_sids,
 &num_groups)) {
-   SAFE_FREE(info3);
+   TALLOC_FREE(info3);
return NT_STATUS_NO_MEMORY;
}
}
 
-   SAFE_FREE(info3);
+   TALLOC_FREE(info3);
*p_num_groups = num_groups;
status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;


Modified: branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c
===
--- branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-05-03 
12:28:25 UTC (rev 22646)
+++ branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-05-03 
12:29:32 UTC (rev 22647)
@@ -194,10 +194,13 @@
data = tdb_fetch( netsamlogon_tdb, key );

if ( data.dptr ) {
-   
-   if ( (user = SMB_MALLOC_P(NET_USER_INFO_3)) == NULL )
+
+
+   user = TALLOC_ZERO_P(mem_ctx, NET_USER_INFO_3);
+   if (user == NULL) {
return NULL;
-   
+   }
+
prs_init( &ps, 0, mem_ctx, UNMARSHALL );
prs_give_memory( &ps, data.dptr, data.dsize, True );

@@ -249,7 +252,6 @@
result = (user != NULL);
 
talloc_destroy(mem_ctx);
-   SAFE_FREE(user);
 
return result;
 }

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c2007-05-03 
12:28:25 UTC (rev 22646)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c2007-05-03 
12:29:32 UTC (rev 22647)
@@ -422,7 +422,7 @@
user_info->shell =

svn commit: samba r22646 - in branches/SAMBA_3_0/source/nsswitch: .

2007-05-03 Thread idra
Author: idra
Date: 2007-05-03 12:28:25 + (Thu, 03 May 2007)
New Revision: 22646

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22646

Log:

segfault fix in idmap_ldap.c from 3_0_25


Modified:
   branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c
===
--- branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c 2007-05-03 12:27:31 UTC 
(rev 22645)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_ldap.c 2007-05-03 12:28:25 UTC 
(rev 22646)
@@ -80,11 +80,17 @@
tmp = lp_parm_const_string(-1, config_option, "ldap_user_dn", NULL);
 
if ( tmp ) {
-   secret = idmap_fetch_secret("ldap", false, dom->name, tmp);
+   if (!dom) {
+   /* only the alloc backend is allowed to pass in a NULL 
dom */
+   secret = idmap_fetch_secret("ldap", true, NULL, tmp);
+   } else {
+   secret = idmap_fetch_secret("ldap", false, dom->name, 
tmp);
+   } 
+
if (!secret) {
DEBUG(0, ("get_credentials: Unable to fetch "
  "auth credentials for %s in %s\n",
- tmp, dom->name));
+ tmp, (dom==NULL)?"ALLOC":dom->name));
ret = NT_STATUS_ACCESS_DENIED;
goto done;
}   



svn commit: samba r22645 - in branches/SAMBA_3_0_25/source/nsswitch: .

2007-05-03 Thread idra
Author: idra
Date: 2007-05-03 12:27:31 + (Thu, 03 May 2007)
New Revision: 22645

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22645

Log:

Fix bug in idmap_ldap's get_credentials() code.
We were dereferencing null for the alloc backend.

Jerry, thits need to be in 3.0.25 final.

Simo.


Modified:
   branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c  2007-05-03 11:49:32 UTC 
(rev 22644)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c  2007-05-03 12:27:31 UTC 
(rev 22645)
@@ -79,11 +79,17 @@
tmp = lp_parm_const_string(-1, config_option, "ldap_user_dn", NULL);
 
if ( tmp ) {
-   secret = idmap_fetch_secret("ldap", false, dom->name, tmp);
+   if (!dom) {
+   /* only the alloc backend is allowed to pass in a NULL 
dom */
+   secret = idmap_fetch_secret("ldap", true, NULL, tmp);
+   } else {
+   secret = idmap_fetch_secret("ldap", false, dom->name, 
tmp);
+   } 
+
if (!secret) {
DEBUG(0, ("get_credentials: Unable to fetch "
  "auth credentials for %s in %s\n",
- tmp, dom->name));
+ tmp, (dom==NULL)?"ALLOC":dom->name));
ret = NT_STATUS_ACCESS_DENIED;
goto done;
}   



svn commit: samba r22644 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_25/source/libsmb

2007-05-03 Thread gd
Author: gd
Date: 2007-05-03 11:49:32 + (Thu, 03 May 2007)
New Revision: 22644

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22644

Log:
Fix memleak.

Guenther

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c
   branches/SAMBA_3_0_25/source/libsmb/cliconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c   2007-05-03 11:44:18 UTC 
(rev 22643)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c   2007-05-03 11:49:32 UTC 
(rev 22644)
@@ -536,6 +536,7 @@
int32 cur = 0;
DATA_BLOB send_blob = data_blob(NULL, 0);
int32 max_blob_size = 0;
+   DATA_BLOB receive_blob = data_blob(NULL, 0);
 
if (cli->max_xmit < BASE_SESSSETUP_BLOB_PACKET_SIZE + 1) {
DEBUG(0,("cli_session_setup_blob: cli->max_xmit too small "
@@ -575,7 +576,8 @@
return False;
}
 
-   cli_session_setup_blob_receive(cli);
+   receive_blob = cli_session_setup_blob_receive(cli);
+   data_blob_free(&receive_blob);
 
if (cli_is_error(cli) &&
!NT_STATUS_EQUAL( cli_get_nt_error(cli), 

Modified: branches/SAMBA_3_0_25/source/libsmb/cliconnect.c
===
--- branches/SAMBA_3_0_25/source/libsmb/cliconnect.c2007-05-03 11:44:18 UTC 
(rev 22643)
+++ branches/SAMBA_3_0_25/source/libsmb/cliconnect.c2007-05-03 11:49:32 UTC 
(rev 22644)
@@ -536,6 +536,7 @@
int32 cur = 0;
DATA_BLOB send_blob = data_blob(NULL, 0);
int32 max_blob_size = 0;
+   DATA_BLOB receive_blob = data_blob(NULL, 0);
 
if (cli->max_xmit < BASE_SESSSETUP_BLOB_PACKET_SIZE + 1) {
DEBUG(0,("cli_session_setup_blob: cli->max_xmit too small "
@@ -575,7 +576,8 @@
return False;
}
 
-   cli_session_setup_blob_receive(cli);
+   receive_blob = cli_session_setup_blob_receive(cli);
+   data_blob_free(&receive_blob);
 
if (cli_is_error(cli) &&
!NT_STATUS_EQUAL( cli_get_nt_error(cli), 



svn commit: samba r22643 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch

2007-05-03 Thread gd
Author: gd
Date: 2007-05-03 11:44:18 + (Thu, 03 May 2007)
New Revision: 22643

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22643

Log:
Don't clear cached U/SID and UG/SID entries when we want to logon offline.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2007-05-02 22:05:48 UTC 
(rev 22642)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2007-05-03 11:44:18 UTC 
(rev 22643)
@@ -2162,7 +2162,14 @@
NET_USER_INFO_3 *info3)
 {
struct winbind_cache *cache;
-   
+
+   /* dont clear cached U/SID and UG/SID entries when we want to logon
+* offline - gd */
+
+   if (lp_winbind_offline_logon()) {
+   return;
+   }
+
if (!domain)
return;
 

Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c  2007-05-02 
22:05:48 UTC (rev 22642)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c  2007-05-03 
11:44:18 UTC (rev 22643)
@@ -2140,7 +2140,14 @@
NET_USER_INFO_3 *info3)
 {
struct winbind_cache *cache;
-   
+
+   /* dont clear cached U/SID and UG/SID entries when we want to logon
+* offline - gd */
+
+   if (lp_winbind_offline_logon()) {
+   return;
+   }
+
if (!domain)
return;
 



Rev 243: first version of traverse is working in http://samba.org/~tridge/ctdb

2007-05-03 Thread tridge

revno: 243
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Thu 2007-05-03 17:12:23 +1000
message:
  first version of traverse is working
modified:
  common/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  common/ctdb_message.c  
ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1
  common/ctdb_traverse.c 
ctdb_traverse.c-20070503021550-ztfs5rwx8jfm8qqx-1
  common/ctdb_util.c ctdb_util.c-20061128065342-to93h6eejj5kon81-3
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  tests/ctdb_test.c  ctdb_test.c-20061117234101-o3qt14umlg9en8z0-16

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