svn commit: samba r18500 - in branches/SAMBA_4_0/source/build/m4: .

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 06:22:02 + (Thu, 14 Sep 2006)
New Revision: 18500

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

Log:
move make related checks into its own file

metze

Added:
   branches/SAMBA_4_0/source/build/m4/check_make.m4
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4
   branches/SAMBA_4_0/source/build/m4/env.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-09-14 05:33:54 UTC 
(rev 18499)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-09-14 06:22:02 UTC 
(rev 18500)
@@ -203,40 +203,3 @@
 AC_SUBST(HOSTCC)
 
 AC_PATH_PROG(GCOV,gcov)
-
-AC_PATH_PROG(MAKE,make)
-
-AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [
-if $ac_cv_path_MAKE --version | head -1 | grep GNU 2/dev/null /dev/null
-then
-   samba_cv_gnu_make=yes
-else
-   samba_cv_gnu_make=no
-fi
-])
-
-GNU_MAKE=$samba_cv_gnu_make
-AC_SUBST(GNU_MAKE)
-
-if test x$GNU_MAKE = xyes; then
-   AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[
-   samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 
| cut -d   -f 3 2/dev/null`
-   ])
-   GNU_MAKE_VERSION=$samba_cv_gnu_make_version
-   AC_SUBST(GNU_MAKE_VERSION)
-fi
-
-
-new_make=no
-AC_MSG_CHECKING([for GNU make = 3.81])
-if test x$GNU_MAKE = xyes; then
-   if $PERL -e  \$_ = '$GNU_MAKE_VERSION'; s/@:@^\d\.@:@.*//g; exit 
(\$_  3.81);; then
-   new_make=yes
-   fi
-fi
-AC_MSG_RESULT($new_make)
-automatic_dependencies=no
-AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ 
automatic_dependencies=$new_make ], [])
-AC_MSG_CHECKING([Whether to use automatic dependencies])
-AC_MSG_RESULT($automatic_dependencies)
-AC_SUBST(automatic_dependencies)

Copied: branches/SAMBA_4_0/source/build/m4/check_make.m4 (from rev 18498, 
branches/SAMBA_4_0/source/build/m4/check_cc.m4)
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-09-14 05:13:20 UTC 
(rev 18498)
+++ branches/SAMBA_4_0/source/build/m4/check_make.m42006-09-14 06:22:02 UTC 
(rev 18500)
@@ -0,0 +1,43 @@
+dnl SMB Build Environment make Checks
+dnl ---
+dnl  Copyright (C) Stefan (metze) Metzmacher 2004
+dnl  Released under the GNU GPL
+dnl ---
+dnl
+
+AC_PATH_PROG(MAKE,make)
+
+AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [
+if $ac_cv_path_MAKE --version | head -1 | grep GNU 2/dev/null /dev/null
+then
+   samba_cv_gnu_make=yes
+else
+   samba_cv_gnu_make=no
+fi
+])
+
+GNU_MAKE=$samba_cv_gnu_make
+AC_SUBST(GNU_MAKE)
+
+if test x$GNU_MAKE = xyes; then
+   AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[
+   samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 
| cut -d   -f 3 2/dev/null`
+   ])
+   GNU_MAKE_VERSION=$samba_cv_gnu_make_version
+   AC_SUBST(GNU_MAKE_VERSION)
+fi
+
+
+new_make=no
+AC_MSG_CHECKING([for GNU make = 3.81])
+if test x$GNU_MAKE = xyes; then
+   if $PERL -e  \$_ = '$GNU_MAKE_VERSION'; s/@:@^\d\.@:@.*//g; exit 
(\$_  3.81);; then
+   new_make=yes
+   fi
+fi
+AC_MSG_RESULT($new_make)
+automatic_dependencies=no
+AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ 
automatic_dependencies=$new_make ], [])
+AC_MSG_CHECKING([Whether to use automatic dependencies])
+AC_MSG_RESULT($automatic_dependencies)
+AC_SUBST(automatic_dependencies)

Modified: branches/SAMBA_4_0/source/build/m4/env.m4
===
--- branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 05:33:54 UTC (rev 
18499)
+++ branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 06:22:02 UTC (rev 
18500)
@@ -37,5 +37,6 @@
 m4_include(build/m4/check_perl.m4)
 m4_include(build/m4/check_cc.m4)
 m4_include(build/m4/check_ld.m4)
+m4_include(build/m4/check_make.m4)
 m4_include(build/m4/check_types.m4)
 m4_include(build/m4/check_doc.m4)



svn commit: samba r18501 - in branches/SAMBA_4_0/source: build/m4 lib/replace

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 06:39:48 + (Thu, 14 Sep 2006)
New Revision: 18501

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

Log:
libreplace needs 'long long', bailout if not present
or the size is not 8 bytes or more.

samba4 doesn't need type checks anymore

metze 

Removed:
   branches/SAMBA_4_0/source/build/m4/check_types.m4
Modified:
   branches/SAMBA_4_0/source/build/m4/env.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4


Changeset:
Deleted: branches/SAMBA_4_0/source/build/m4/check_types.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_types.m4   2006-09-14 06:22:02 UTC 
(rev 18500)
+++ branches/SAMBA_4_0/source/build/m4/check_types.m4   2006-09-14 06:39:48 UTC 
(rev 18501)
@@ -1,17 +0,0 @@
-dnl SMB Build Environment Types Checks
-dnl ---
-dnl  Copyright (C) Stefan (metze) Metzmacher 2004
-dnl  Released under the GNU GPL
-dnl ---
-dnl
-
-AC_CHECK_SIZEOF(short,cross)
-AC_CHECK_SIZEOF(int,cross)
-AC_CHECK_SIZEOF(long,cross)
-AC_CHECK_SIZEOF(long long,cross)
-if test x$ac_cv_type_long_long != xyes;then
-   AC_MSG_ERROR([Sorry we need type 'long long'])
-fi
-if test $ac_cv_sizeof_long_long -lt 8;then
-   AC_MSG_ERROR([Sorry we need sizeof(long long) = 8])
-fi

Modified: branches/SAMBA_4_0/source/build/m4/env.m4
===
--- branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 06:22:02 UTC (rev 
18500)
+++ branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 06:39:48 UTC (rev 
18501)
@@ -38,5 +38,4 @@
 m4_include(build/m4/check_cc.m4)
 m4_include(build/m4/check_ld.m4)
 m4_include(build/m4/check_make.m4)
-m4_include(build/m4/check_types.m4)
 m4_include(build/m4/check_doc.m4)

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-14 
06:22:02 UTC (rev 18500)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-14 
06:39:48 UTC (rev 18501)
@@ -90,5 +90,12 @@
 AC_CHECK_TYPE(intptr_t, unsigned long long)
 AC_CHECK_TYPE(ptrdiff_t, unsigned long long)
 
+if test x$ac_cv_type_long_long != xyes;then
+   AC_MSG_ERROR([LIBREPLACE needs type 'long long'])
+fi
+if test $ac_cv_sizeof_long_long -lt 8;then
+   AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) = 8])
+fi
+
 AC__LIBREPLACE_ONLY_CC_CHECKS_END
 ]) dnl end AC_LIBREPLACE_CC_CHECKS



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

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 07:22:38 + (Thu, 14 Sep 2006)
New Revision: 18502

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

Log:
remove unused lines

metze

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-14 
06:39:48 UTC (rev 18501)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4  2006-09-14 
07:22:38 UTC (rev 18502)
@@ -28,16 +28,6 @@
 savedCFLAGS=$CFLAGS
 AC_PROG_CC
 CFLAGS=$savedCFLAGS
-dnl AC_PROG_CPP
-dnl AC_PROG_EGREP
-dnl AC_GNU_SOURCE
-dnl AC_AIX
-dnl AC_MINIX
-dnl AC_GNU_SOURCE
-dnl AC_INCLUDES_DEFAULT
-dnl AC_USE_SYSTEM_EXTENSIONS
-dnl AC_INCLUDES_DEFAULT
-dnl AC_HEADER_STDC
 AC_ISC_POSIX
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC_C99



svn commit: samba r18503 - in branches/SAMBA_4_0/source: build/m4 lib/replace

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 07:30:46 + (Thu, 14 Sep 2006)
New Revision: 18503

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

Log:
- _GNU_SOURCE is defined by libreplace
- move AS_HELP_STRING replacement to libreplace

metze

Modified:
   branches/SAMBA_4_0/source/build/m4/env.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/env.m4
===
--- branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 07:22:38 UTC (rev 
18502)
+++ branches/SAMBA_4_0/source/build/m4/env.m4   2006-09-14 07:30:46 UTC (rev 
18503)
@@ -10,11 +10,6 @@
 AC_SUBST(srcdir)
 export srcdir;
 
-dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is 
deprecated
-dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it 
is already
-dnl defined.
-m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], 
m4_defn([AC_HELP_STRING]))])
-
 # we always set builddir to . as that's nicer than
 # having the absolute path of the current work directory
 builddir=.
@@ -31,8 +26,6 @@
echo BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}
 fi
 
-AC_DEFINE([_GNU_SOURCE],[],[Pull in GNU extensions])
-
 m4_include(build/m4/check_path.m4)
 m4_include(build/m4/check_perl.m4)
 m4_include(build/m4/check_cc.m4)

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
07:22:38 UTC (rev 18502)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
07:30:46 UTC (rev 18503)
@@ -264,3 +264,7 @@
 EOF
 ])
 
+dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is 
deprecated
+dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it 
is already
+dnl defined.
+m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], 
m4_defn([AC_HELP_STRING]))])



svn commit: samba r18504 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/ldb/modules

2006-09-14 Thread abartlet
Author: abartlet
Date: 2006-09-14 07:57:49 + (Thu, 14 Sep 2006)
New Revision: 18504

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

Log:
Handle mappings for RENAME and KEEP attributes better.  We don't need
to mess with the values in these cases.

Where we do convert the values, try and convert substrings.  This
isn't going to be perfect, but we should try rather than segfault.

This also avoids using the wrong arm of the union for the attribute
name

The change in the entryUUID module is to correct the case of
sAMAccountName, due to the case sensitive ldap.js test.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c
   branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c
2006-09-14 07:30:46 UTC (rev 18503)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c
2006-09-14 07:57:49 UTC (rev 18504)
@@ -284,11 +284,11 @@
}
},
{
-   .local_name = samAccountType,
+   .local_name = sAMAccountType,
.type = MAP_CONVERT,
.u = {
.convert = {
-.remote_name = samAccountType,
+.remote_name = sAMAccountType,
 .convert_local = normalise_to_signed32,
 .convert_remote = val_copy,
 },

Modified: branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
2006-09-14 07:30:46 UTC (rev 18503)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/ldb_map_outbound.c
2006-09-14 07:57:49 UTC (rev 18504)
@@ -180,37 +180,6 @@
return 0;
 }
 
-/* Mapping ldb values
- * == */
-
-/* Map an ldb value from a parse tree into the remote partition. */
-static struct ldb_val ldb_val_map_subtree(struct ldb_module *module, struct 
ldb_parse_tree *new, const struct ldb_map_attribute *map, const struct 
ldb_parse_tree *tree)
-{
-   struct ldb_val val;
-
-   /* Extract the old value */
-   switch (tree-operation) {
-   case LDB_OP_EQUALITY:
-   val = tree-u.equality.value;
-   break;
-   case LDB_OP_LESS:
-   case LDB_OP_GREATER:
-   case LDB_OP_APPROX:
-   val = tree-u.comparison.value;
-   break;
-   case LDB_OP_EXTENDED:
-   val = tree-u.extended.value;
-   break;
-   default:
-   val.length = 0;
-   val.data = NULL;
-   return ldb_val_dup(new, val);
-   }
-
-   /* Convert to the new value */
-   return ldb_val_map_local(module, new, map, val);
-}
-
 /* Mapping message elements
  *  */
 
@@ -677,46 +646,99 @@
 int map_subtree_collect_remote_simple(struct ldb_module *module, void 
*mem_ctx, struct ldb_parse_tree **new, const struct ldb_parse_tree *tree, const 
struct ldb_map_attribute *map)
 {
const char *attr;
-   struct ldb_val val;
 
/* Prepare new tree */
-   *new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
+   *new = talloc(mem_ctx, struct ldb_parse_tree);
if (*new == NULL) {
map_oom(module);
return -1;
}
-
-   /* Map attribute and value */
-   attr = map_attr_map_local(*new, map, tree-u.equality.attr);
-   if (attr == NULL) {
-   talloc_free(*new);
-   *new = NULL;
+   **new = *tree;
+   
+   if (map-type == MAP_KEEP) {
+   /* Nothing to do here */
return 0;
}
-   val = ldb_val_map_subtree(module, *new, map, tree);
 
/* Store attribute and value in new tree */
switch (tree-operation) {
case LDB_OP_PRESENT:
+   attr = map_attr_map_local(*new, map, tree-u.present.attr);
(*new)-u.present.attr = attr;
break;
case LDB_OP_SUBSTRING:
+   {
+   attr = map_attr_map_local(*new, map, tree-u.substring.attr);
(*new)-u.substring.attr = attr;
-   (*new)-u.substring.chunks = NULL;  /* FIXME! */
break;
+   }
case LDB_OP_EQUALITY:
+   attr = map_attr_map_local(*new, map, tree-u.equality.attr);
(*new)-u.equality.attr = attr;
-   (*new)-u.equality.value = val;
break;
case LDB_OP_LESS:
case LDB_OP_GREATER:
case LDB_OP_APPROX:
+   attr = map_attr_map_local(*new, map, tree-u.comparison.attr);

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

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 08:26:41 + (Thu, 14 Sep 2006)
New Revision: 18505

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

Log:
add configure checks for telldir() and seekdir()

telldir() is different on older OpenBSD versions
seekdir() is different Tru64

tridge: OpenBSD seems to like this replacement:-)
while MAC OS 10 gets 134 runtime error:-(
lets wait what Tru64 will give

metze

Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
   branches/SAMBA_4_0/source/lib/replace/repdir.m4
   branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
07:57:49 UTC (rev 18504)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
08:26:41 UTC (rev 18505)
@@ -268,3 +268,23 @@
 dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it 
is already
 dnl defined.
 m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], 
m4_defn([AC_HELP_STRING]))])
+
+dnl check if the prototype in the header matches the given one
+dnl 
AC_VERIFY_C_PROTOTYPE(prototype,functionbody,[IF-TRUE].[IF-FALSE],[extraheaders])
+AC_DEFUN(AC_VERIFY_C_PROTOTYPE,
+[AC_CACHE_CHECK([for prototype $1], AS_TR_SH([ac_cv_c_prototype_$1]),
+   AC_COMPILE_IFELSE([
+   AC_INCLUDES_DEFAULT
+   $5
+   $1
+   {
+   $2
+   }
+   ],[
+   AS_TR_SH([ac_cv_c_prototype_$1])=yes
+   $3
+   ],[
+   AS_TR_SH([ac_cv_c_prototype_$1])=no
+   $4
+   ])
+)])

Modified: branches/SAMBA_4_0/source/lib/replace/repdir.m4
===
--- branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-09-14 07:57:49 UTC 
(rev 18504)
+++ branches/SAMBA_4_0/source/lib/replace/repdir.m4 2006-09-14 08:26:41 UTC 
(rev 18505)
@@ -14,7 +14,7 @@
 AC_CHECK_FUNCS(getdents)
 AC_CACHE_CHECK([for replacing readdir using 
getdents()],libreplace_READDIR_GETDENTS,[
AC_TRY_RUN([
-#include confdefs.h
+#define _LIBREPLACE_REPLACE_H
 #include $libreplacedir/repdir_getdents.c
 #define test_readdir_os2_delete main
 #include $libreplacedir/test/os2_delete.c],
@@ -34,9 +34,26 @@
 #
 if test x$libreplace_READDIR_NEEDED = xyes; then
 AC_CHECK_FUNCS(getdirentries)
+AC_VERIFY_C_PROTOTYPE([long telldir(const DIR *dir)],
+   [
+   return 0;
+   ],[
+   AC_DEFINE(TELLDIR_TAKES_CONST_DIR, 1, [Whether telldir takes a const 
pointer])
+   ],[],[
+   #include dirent.h
+   ])
+
+AC_VERIFY_C_PROTOTYPE([int seekdir(DIR *dir, long ofs)],
+   [
+   return 0;
+   ],[
+   AC_DEFINE(SEEKDIR_RETURNS_INT, 1, [Whether seekdir returns an int])
+   ],[],[
+   #include dirent.h
+   ])
 AC_CACHE_CHECK([for replacing readdir using 
getdirentries()],libreplace_READDIR_GETDIRENTRIES,[
AC_TRY_RUN([
-#include confdefs.h
+#define _LIBREPLACE_REPLACE_H
 #include $libreplacedir/repdir_getdirentries.c
 #define test_readdir_os2_delete main
 #include $libreplacedir/test/os2_delete.c],

Modified: branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
===
--- branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
2006-09-14 07:57:49 UTC (rev 18504)
+++ branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
2006-09-14 08:26:41 UTC (rev 18505)
@@ -48,6 +48,7 @@
   well. Contact the author.
 */
 
+#include replace.h
 #include stdlib.h
 #include sys/stat.h
 #include unistd.h
@@ -104,8 +105,6 @@
return de;
 }
 
-#define TELLDIR_TAKES_CONST_DIR
-
 #ifdef TELLDIR_TAKES_CONST_DIR
 long telldir(const DIR *dir)
 #else
@@ -126,7 +125,11 @@
return d-seekpos + d-ofs;
 }
 
+#ifdef SEEKDIR_RETURNS_INT
+int seekdir(DIR *dir, long ofs)
+#else
 void seekdir(DIR *dir, long ofs)
+#endif
 {
struct dir_buf *d = (struct dir_buf *)dir;
long pos;
@@ -136,6 +139,9 @@
while (d-ofs  (ofs  (DIR_BUF_SIZE-1))) {
if (readdir(dir) == NULL) break;
}
+#ifdef SEEKDIR_RETURNS_INT
+   return -1;
+#endif
 }
 
 void rewinddir(DIR *dir)



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

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 09:11:30 + (Thu, 14 Sep 2006)
New Revision: 18506

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

Log:
Fix online requests to cause an immediate DC connection.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-14 08:26:41 UTC 
(rev 18505)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-14 09:11:30 UTC 
(rev 18506)
@@ -144,7 +144,7 @@
  Set domain online - if allowed.
 /
 
-void set_domain_online(struct winbindd_domain *domain)
+static void set_domain_online(struct winbindd_domain *domain)
 {
struct timeval now;
 
@@ -160,11 +160,36 @@
/* If we are waiting to get a krb5 ticket, trigger immediately. */
GetTimeOfDay(now);
set_event_dispatch_time(krb5_ticket_gain_handler, now);
-
domain-online = True;
 }
 
 /
+ Request init_dc_connection to set a domain online.
+/
+
+void set_domain_online_request(struct winbindd_domain *domain)
+{
+   DEBUG(10,(set_domain_online_request: called for domain %s\n,
+   domain-name ));
+
+   if (get_global_winbindd_state_offline()) {
+   DEBUG(10,(set_domain_online_request: domain %s remaining 
globally offline\n,
+   domain-name ));
+   return;
+   }
+
+   /* If we were called from a message request, initiate
+  a DC connection immediately. */
+
+   init_dc_connection(domain);
+
+   if (domain-online == False) {
+   DEBUG(10,(set_domain_online_request: failed to init connection 
to DC. 
+   Domain %s staying offline.\n, domain-name ));
+   }
+}
+
+/
  Add -ve connection cache entries for domain and realm.
 /
 
@@ -1083,24 +1108,29 @@
 static BOOL connection_ok(struct winbindd_domain *domain)
 {
if (domain-conn.cli == NULL) {
-   DEBUG(8, (Connection to %s for domain %s has NULL 
+   DEBUG(8, (connection_ok: Connection to %s for domain %s has 
NULL 
  cli!\n, domain-dcname, domain-name));
return False;
}
 
if (!domain-conn.cli-initialised) {
-   DEBUG(3, (Connection to %s for domain %s was never 
+   DEBUG(3, (connection_ok: Connection to %s for domain %s was 
never 
  initialised!\n, domain-dcname, domain-name));
return False;
}
 
if (domain-conn.cli-fd == -1) {
-   DEBUG(3, (Connection to %s for domain %s has died or was 
+   DEBUG(3, (connection_ok: Connection to %s for domain %s has 
died or was 
  never started (fd == -1)\n, 
  domain-dcname, domain-name));
return False;
}
 
+   if (domain-online == False) {
+   DEBUG(3, (connection_ok: Domain %s is offline\n, 
domain-name));
+   return False;
+   }
+
return True;
 }


Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-09-14 08:26:41 UTC 
(rev 18505)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-09-14 09:11:30 UTC 
(rev 18506)
@@ -608,13 +608,13 @@
 
winbindd_flush_nscd_cache();
 
-   /* Mark everything online - delete any negative cache entries
-  to force a reconnect on the next query from the parent to this 
child. */
+   /* Try and mark everything online - delete any negative cache entries
+  to force a reconnect now. */
 
for (domain = domain_list(); domain; domain = domain-next) {
DEBUG(5,(child_msg_online: marking %s online.\n, 
domain-name));
-   set_domain_online(domain);
winbindd_flush_negative_conn_cache(domain);
+   set_domain_online_request(domain);
}
 }
 



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

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 09:27:10 + (Thu, 14 Sep 2006)
New Revision: 18507

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

Log:
Added debug log for returned username.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c
===
--- branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-14 09:11:30 UTC 
(rev 18506)
+++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2006-09-14 09:27:10 UTC 
(rev 18507)
@@ -1024,6 +1024,7 @@
 out:
if (username_ret) {
pam_set_item (pamh, PAM_USER, username_ret);
+   _pam_log_debug(pamh, ctrl, LOG_INFO, Returned user was '%s', 
username_ret);
free(username_ret);
}
 



svn commit: samba r18508 - in branches: SAMBA_3_0/source/libads SAMBA_3_0_23/source/libads

2006-09-14 Thread gd
Author: gd
Date: 2006-09-14 09:44:48 + (Thu, 14 Sep 2006)
New Revision: 18508

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

Log:
A query for the LDAP schema can never be done anonymously against AD.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/ldap_schema.c
   branches/SAMBA_3_0_23/source/libads/ldap_schema.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap_schema.c
===
--- branches/SAMBA_3_0/source/libads/ldap_schema.c  2006-09-14 09:27:10 UTC 
(rev 18507)
+++ branches/SAMBA_3_0/source/libads/ldap_schema.c  2006-09-14 09:44:48 UTC 
(rev 18508)
@@ -181,7 +181,7 @@
  * Check for Services for Unix or rfc2307 Schema and load some attributes 
into the ADS_STRUCT
  * @param ads connection to ads server
  * @param enum mapping type
- * @return BOOL status of search (False if one or more attributes couldn't be
+ * @return ADS_STATUS status of search (False if one or more attributes 
couldn't be
  * found in Active Directory)
  **/ 
 ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum 
wb_posix_mapping map_type) 
@@ -191,7 +191,6 @@
char **oids_out, **names_out;
size_t num_names;
char *schema_path = NULL;
-   ADS_STRUCT *ads_s = ads;
int i;
 
const char *oids_sfu[] = {  ADS_ATTR_SFU_UIDNUMBER_OID,
@@ -236,22 +235,6 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
 
-   /* establish a new ldap tcp session if necessary */
-
-   if (!ads-ld) {
-   if ((ads_s = ads_init(ads-server.realm, ads-server.workgroup, 
- ads-server.ldap_server)) == NULL) {
-   status = ADS_ERROR(LDAP_SERVER_DOWN);
-   goto done;
-   }
-
-   ads_s-auth.flags = ADS_AUTH_ANON_BIND;
-   status = ads_connect(ads_s);
-   if (!ADS_ERR_OK(status)) {
-   goto done;
-   }
-   }
-
status = ads_schema_path(ads, ctx, schema_path);
if (!ADS_ERR_OK(status)) {
DEBUG(3,(ads_check_posix_mapping: Unable to retrieve schema 
DN!\n));
@@ -321,10 +304,6 @@

ads-schema.map_type = map_type;
 done:
-   /* free any temporary ads connections */
-   if (ads_s != ads) {
-   ads_destroy(ads_s);
-   }
if (ctx) {
talloc_destroy(ctx);
}

Modified: branches/SAMBA_3_0_23/source/libads/ldap_schema.c
===
--- branches/SAMBA_3_0_23/source/libads/ldap_schema.c   2006-09-14 09:27:10 UTC 
(rev 18507)
+++ branches/SAMBA_3_0_23/source/libads/ldap_schema.c   2006-09-14 09:44:48 UTC 
(rev 18508)
@@ -181,7 +181,7 @@
  * Check for Services for Unix or rfc2307 Schema and load some attributes 
into the ADS_STRUCT
  * @param ads connection to ads server
  * @param enum mapping type
- * @return BOOL status of search (False if one or more attributes couldn't be
+ * @return ADS_STATUS status of search (False if one or more attributes 
couldn't be
  * found in Active Directory)
  **/ 
 ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum 
wb_posix_mapping map_type) 
@@ -191,7 +191,6 @@
char **oids_out, **names_out;
size_t num_names;
char *schema_path = NULL;
-   ADS_STRUCT *ads_s = ads;
int i;
 
const char *oids_sfu[] = {  ADS_ATTR_SFU_UIDNUMBER_OID,
@@ -236,22 +235,6 @@
return ADS_ERROR(LDAP_NO_MEMORY);
}
 
-   /* establish a new ldap tcp session if necessary */
-
-   if (!ads-ld) {
-   if ((ads_s = ads_init(ads-server.realm, ads-server.workgroup, 
- ads-server.ldap_server)) == NULL) {
-   status = ADS_ERROR(LDAP_SERVER_DOWN);
-   goto done;
-   }
-
-   ads_s-auth.flags = ADS_AUTH_ANON_BIND;
-   status = ads_connect(ads_s);
-   if (!ADS_ERR_OK(status)) {
-   goto done;
-   }
-   }
-
status = ads_schema_path(ads, ctx, schema_path);
if (!ADS_ERR_OK(status)) {
DEBUG(3,(ads_check_posix_mapping: Unable to retrieve schema 
DN!\n));
@@ -321,10 +304,6 @@

ads-schema.map_type = map_type;
 done:
-   /* free any temporary ads connections */
-   if (ads_s != ads) {
-   ads_destroy(ads_s);
-   }
if (ctx) {
talloc_destroy(ctx);
}



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

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 09:58:20 + (Thu, 14 Sep 2006)
New Revision: 18509

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

Log:
We must always canonicalise the usernames to be UPPERCASE DOMAIN,
lowercase username. We cache names as keys in this form, and we weren't
always returning this
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2006-09-14 09:44:48 UTC 
(rev 18508)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2006-09-14 09:58:20 UTC 
(rev 18509)
@@ -886,7 +886,8 @@
 
 Also, if omit DOMAIN if 'winbind trusted domains only = true', as the 
 username is then unqualified in unix
-
+
+We always canonicalize as UPPERCASE DOMAIN, lowercase username.
 */
 void fill_domain_username(fstring name, const char *domain, const char *user, 
BOOL can_assume)
 {
@@ -896,7 +897,7 @@
strlower_m(tmp_user);
 
if (can_assume  assume_domain(domain)) {
-   strlcpy(name, user, sizeof(fstring));
+   strlcpy(name, tmp_user, sizeof(fstring));
} else {
slprintf(name, sizeof(fstring) - 1, %s%c%s,
 domain, *lp_winbind_separator(),



svn commit: samba r18510 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_23/source/nsswitch

2006-09-14 Thread gd
Author: gd
Date: 2006-09-14 10:08:36 + (Thu, 14 Sep 2006)
New Revision: 18510

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

Log:
Protect against storing null-sids in the winbind cache.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_23/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 2006-09-14 09:58:20 UTC 
(rev 18509)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-09-14 10:08:36 UTC 
(rev 18510)
@@ -788,6 +788,10 @@
struct cache_entry *centry;
fstring sid_string;
 
+   if (is_null_sid(sid)) {
+   return;
+   }
+
centry = centry_start(domain, status);
if (!centry)
return;
@@ -807,6 +811,10 @@
struct cache_entry *centry;
fstring sid_string;
 
+   if (is_null_sid(info-user_sid)) {
+   return;
+   }
+
centry = centry_start(domain, status);
if (!centry)
return;

Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c  2006-09-14 
09:58:20 UTC (rev 18509)
+++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c  2006-09-14 
10:08:36 UTC (rev 18510)
@@ -771,6 +771,10 @@
struct cache_entry *centry;
fstring sid_string;
 
+   if (is_null_sid(sid)) {
+   return;
+   }
+
centry = centry_start(domain, status);
if (!centry)
return;
@@ -790,6 +794,10 @@
struct cache_entry *centry;
fstring sid_string;
 
+   if (is_null_sid(info-user_sid)) {
+   return;
+   }
+
centry = centry_start(domain, status);
if (!centry)
return;



svn commit: samba r18511 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_23/source/nsswitch

2006-09-14 Thread gd
Author: gd
Date: 2006-09-14 10:11:22 + (Thu, 14 Sep 2006)
New Revision: 18511

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

Log:
Ops, fix the build.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_23/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 2006-09-14 10:08:36 UTC 
(rev 18510)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-09-14 10:11:22 UTC 
(rev 18511)
@@ -788,7 +788,7 @@
struct cache_entry *centry;
fstring sid_string;
 
-   if (is_null_sid(sid)) {
+   if (is_null_sid(sid)) {
return;
}
 

Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c  2006-09-14 
10:08:36 UTC (rev 18510)
+++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c  2006-09-14 
10:11:22 UTC (rev 18511)
@@ -771,7 +771,7 @@
struct cache_entry *centry;
fstring sid_string;
 
-   if (is_null_sid(sid)) {
+   if (is_null_sid(sid)) {
return;
}
 



svn commit: samba r18512 - in branches/SAMBA_3_0/source/libads: .

2006-09-14 Thread gd
Author: gd
Date: 2006-09-14 10:21:46 + (Thu, 14 Sep 2006)
New Revision: 18512

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

Log:
Add krb5conf file environment to debug statement.

Guenther

Modified:
   branches/SAMBA_3_0/source/libads/kerberos.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/kerberos.c
===
--- branches/SAMBA_3_0/source/libads/kerberos.c 2006-09-14 10:11:22 UTC (rev 
18511)
+++ branches/SAMBA_3_0/source/libads/kerberos.c 2006-09-14 10:21:46 UTC (rev 
18512)
@@ -86,8 +86,9 @@
krb5_set_real_time(ctx, time(NULL) + time_offset, 0);
}
 
-   DEBUG(10,(kerberos_kinit_password: using %s as ccache\n,
-   cache_name ? cache_name: krb5_cc_default_name(ctx)));
+   DEBUG(10,(kerberos_kinit_password: using [%s] as ccache and config 
[%s]\n,
+   cache_name ? cache_name: krb5_cc_default_name(ctx),
+   getenv(KRB5_CONFIG)));
 
if ((code = krb5_cc_resolve(ctx, cache_name ? cache_name : 
krb5_cc_default_name(ctx), cc))) {
krb5_free_context(ctx);



svn commit: samba r18513 - in branches/SAMBA_3_0_23/source/nsswitch: .

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 10:25:44 + (Thu, 14 Sep 2006)
New Revision: 18513

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

Log:
Ensure we always return the canonicalized name even with
the evil use default domain case.
Jeremy.

Modified:
   branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c
===
--- branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c   2006-09-14 
10:21:46 UTC (rev 18512)
+++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_util.c   2006-09-14 
10:25:44 UTC (rev 18513)
@@ -886,7 +886,8 @@
 
 Also, if omit DOMAIN if 'winbind trusted domains only = true', as the 
 username is then unqualified in unix
-
+
+We always canonicalize as UPPERCASE DOMAIN, lowercase username.
 */
 void fill_domain_username(fstring name, const char *domain, const char *user, 
BOOL can_assume)
 {
@@ -896,7 +897,7 @@
strlower_m(tmp_user);
 
if (can_assume  assume_domain(domain)) {
-   strlcpy(name, user, sizeof(fstring));
+   strlcpy(name, tmp_user, sizeof(fstring));
} else {
slprintf(name, sizeof(fstring) - 1, %s%c%s,
 domain, *lp_winbind_separator(),



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

2006-09-14 Thread metze
Author: metze
Date: 2006-09-14 10:34:03 + (Thu, 14 Sep 2006)
New Revision: 18514

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

Log:
fix configure caching of AC_VERIFY_C_PROTOTYPE() macro

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4
===
--- branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
10:25:44 UTC (rev 18513)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace_macros.m4  2006-09-14 
10:34:03 UTC (rev 18514)
@@ -282,9 +282,9 @@
}
],[
AS_TR_SH([ac_cv_c_prototype_$1])=yes
-   $3
],[
AS_TR_SH([ac_cv_c_prototype_$1])=no
-   $4
])
-)])
+)
+AS_IF([test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4])
+])



svn commit: samba r18515 - in branches/SAMBA_4_0/source/lib/ldb/tests: .

2006-09-14 Thread jelmer
Author: jelmer
Date: 2006-09-14 10:35:56 + (Thu, 14 Sep 2006)
New Revision: 18515

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

Log:
Remove calls to time for now as some sh implementations don't have it, 
causing this test to fail.

Modified:
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
10:34:03 UTC (rev 18514)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
10:35:56 UTC (rev 18515)
@@ -25,7 +25,7 @@
 $VALGRIND ldbsearch '(uid=uham)' || exit 1
 
 echo Starting ldbtest
-time $VALGRIND ldbtest --num-records 100 --num-searches 10  || exit 1
+$VALGRIND ldbtest --num-records 100 --num-searches 10  || exit 1
 
 if [ $LDB_SPECIALS = 1 ]; then
  echo Adding index
@@ -62,7 +62,7 @@
 $VALGRIND ldbsearch '(cn=test*multi*test*multi*multi_*)' || exit 1
 
 echo Starting ldbtest indexed
-time $VALGRIND ldbtest --num-records 100 --num-searches 500  || exit 1
+$VALGRIND ldbtest --num-records 100 --num-searches 500  || exit 1
 
 echo Testing one level search
 count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s 
one 'objectclass=*' none |grep '^dn' | wc -l`



svn commit: samba r18516 - in branches/SAMBA_4_0/source/torture/local: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 11:43:59 + (Thu, 14 Sep 2006)
New Revision: 18516

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

Log:

I'm surprised that compilers allowed this at all

Modified:
   branches/SAMBA_4_0/source/torture/local/irpc.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/irpc.c
===
--- branches/SAMBA_4_0/source/torture/local/irpc.c  2006-09-14 10:35:56 UTC 
(rev 18515)
+++ branches/SAMBA_4_0/source/torture/local/irpc.c  2006-09-14 11:43:59 UTC 
(rev 18516)
@@ -81,12 +81,12 @@
   test a addone call over the internal messaging system
 */
 static BOOL test_addone(struct torture_context *test, const void *_data,
-   const void *_value)
+   const void *_value)
 {
struct echo_AddOne r;
NTSTATUS status;
const struct irpc_test_data *data = _data;
-   uint32_t value = (uint32_t)value;
+   uint32_t value = (uint32_t)_value;
 
/* make the call */
r.in.in_data = value;



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

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 11:47:13 + (Thu, 14 Sep 2006)
New Revision: 18517

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

Log:

I find it less confusing if tests are run in the order they are
added.

Modified:
   branches/SAMBA_4_0/source/torture/ui.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/ui.c
===
--- branches/SAMBA_4_0/source/torture/ui.c  2006-09-14 11:43:59 UTC (rev 
18516)
+++ branches/SAMBA_4_0/source/torture/ui.c  2006-09-14 11:47:13 UTC (rev 
18517)
@@ -93,7 +93,7 @@
test-dangerous = False;
test-data = data;
 
-   DLIST_ADD(tcase-tests, test);
+   DLIST_ADD_END(tcase-tests, test, struct torture_test *);
 
return test;
 }



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

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 11:55:49 + (Thu, 14 Sep 2006)
New Revision: 18518

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

Log:

we replace snprintf() if its not C99, so we should also add the rep_
prototype in that case

Modified:
   branches/SAMBA_4_0/source/lib/replace/replace.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-14 11:47:13 UTC 
(rev 18517)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-09-14 11:55:49 UTC 
(rev 18518)
@@ -223,12 +223,12 @@
 int rep_vasprintf(char **ptr, const char *format, va_list ap);
 #endif
 
-#ifndef HAVE_SNPRINTF
+#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
 #define snprintf rep_snprintf
 int rep_snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
 #endif
 
-#ifndef HAVE_VSNPRINTF
+#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
 #define vsnprintf rep_vsnprintf
 int rep_vsnprintf(char *,size_t ,const char *, va_list ap);
 #endif



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

2006-09-14 Thread vlendec
Author: vlendec
Date: 2006-09-14 11:58:22 + (Thu, 14 Sep 2006)
New Revision: 18519

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

Log:
Copy over the Samba4 code to figure out options for the named initializers.

Volker

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


Changeset:
Modified: branches/SAMBA_3_0/source/aclocal.m4
===
--- branches/SAMBA_3_0/source/aclocal.m42006-09-14 11:55:49 UTC (rev 
18518)
+++ branches/SAMBA_3_0/source/aclocal.m42006-09-14 11:58:22 UTC (rev 
18519)
@@ -796,3 +796,75 @@
])
 ])
 
+
+# Check if the compiler handles c99 struct initialization, and if not try 
-AC99 and -c99 flags
+# Usage: LIBREPLACE_C99_STRUCT_INIT(success-action,failure-action)
+# changes CFLAGS to add -AC99 or -c99 if needed
+AC_DEFUN([LIBREPLACE_C99_STRUCT_INIT],
+[
+saved_CFLAGS=$CFLAGS;
+c99_init=no
+if test x$c99_init = xno; then
+AC_MSG_CHECKING(for C99 designated initializers)
+CFLAGS=$saved_CFLAGS;
+AC_TRY_COMPILE([#include stdio.h],
+ [ struct foo {int x;char y;};
+   struct foo bar = { .y = 'X', .x = 1 };   
+ ],
+ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)])
+fi
+if test x$c99_init = xno; then
+AC_MSG_CHECKING(for C99 designated initializers with -AC99)
+CFLAGS=$saved_CFLAGS -AC99;
+AC_TRY_COMPILE([#include stdio.h],
+ [ struct foo {int x;char y;};
+   struct foo bar = { .y = 'X', .x = 1 };   
+ ],
+ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)])
+fi
+if test x$c99_init = xno; then
+AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=extc99)
+CFLAGS=$saved_CFLAGS -qlanglvl=extc99;
+AC_TRY_COMPILE([#include stdio.h],
+ [ struct foo {int x;char y;};
+   struct foo bar = { .y = 'X', .x = 1 };   
+ ],
+ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)])
+fi
+if test x$c99_init = xno; then
+AC_MSG_CHECKING(for C99 designated initializers with -qlanglvl=stdc99)
+CFLAGS=$saved_CFLAGS -qlanglvl=stdc99;
+AC_TRY_COMPILE([#include stdio.h],
+ [ struct foo {int x;char y;};
+   struct foo bar = { .y = 'X', .x = 1 };   
+ ],
+ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)])
+fi
+if test x$c99_init = xno; then
+AC_MSG_CHECKING(for C99 designated initializers with -c99)
+CFLAGS=$saved_CFLAGS -c99
+AC_TRY_COMPILE([#include stdio.h],
+ [ struct foo {int x;char y;};
+   struct foo bar = { .y = 'X', .x = 1 };   
+ ],
+ [AC_MSG_RESULT(yes); c99_init=yes],[AC_MSG_RESULT(no)])
+fi
+
+if test `uname` = HP-UX; then
+  if test $ac_cv_c_compiler_gnu = no; then
+   # special override for broken HP-UX compiler - I can't find a way to 
test
+   # this properly (its a compiler bug)
+   CFLAGS=$CFLAGS -AC99;
+   c99_init=yes;
+  fi
+fi
+
+if test x$c99_init = xyes; then
+saved_CFLAGS=
+$1
+else
+CFLAGS=$saved_CFLAGS
+saved_CFLAGS=
+$2
+fi
+])

Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-14 11:55:49 UTC (rev 
18518)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-14 11:58:22 UTC (rev 
18519)
@@ -540,6 +540,10 @@
AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
 fi
 
+dnl Figure out the flags to support named structure initializers
+
+LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not 
supported])])
+
 UNAME_S=`(uname -s) 2/dev/null` || UNAME_S=unknown
 AC_MSG_CHECKING(uname -s)
 AC_MSG_RESULT(${UNAME_S})



svn commit: samba r18520 - in branches/SAMBA_4_0/source/pidl: .

2006-09-14 Thread jelmer
Author: jelmer
Date: 2006-09-14 12:08:06 + (Thu, 14 Sep 2006)
New Revision: 18520

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

Log:
Add note about warnings on [out] arrays.

Modified:
   branches/SAMBA_4_0/source/pidl/TODO


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/TODO
===
--- branches/SAMBA_4_0/source/pidl/TODO 2006-09-14 11:58:22 UTC (rev 18519)
+++ branches/SAMBA_4_0/source/pidl/TODO 2006-09-14 12:08:06 UTC (rev 18520)
@@ -1,3 +1,5 @@
+- warn about [out] attributes on pointers (midl/samba3 compatibility)
+
 - true multiple dimension array / strings in arrays support
 
 - compatibility mode for generating MIDL-readable data:



svn commit: samba r18521 - in branches/SAMBA_4_0/source/lib/talloc: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 12:18:44 + (Thu, 14 Sep 2006)
New Revision: 18521

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

Log:

implement volkers suggestion for avoiding the type punning warnings

Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.c
   branches/SAMBA_4_0/source/lib/talloc/talloc.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c   2006-09-14 12:08:06 UTC 
(rev 18520)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c   2006-09-14 12:18:44 UTC 
(rev 18521)
@@ -741,8 +741,9 @@
   a wrapper around talloc_steal() for situations where you are moving a pointer
   between two structures, and want the old pointer to be set to NULL
 */
-void *_talloc_move(const void *new_ctx, const void **pptr)
+void *_talloc_move(const void *new_ctx, const void *_pptr)
 {
+   const void **pptr = (const void **)_pptr;
void *ret = _talloc_steal(new_ctx, *pptr);
(*pptr) = NULL;
return ret;

Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.h
===
--- branches/SAMBA_4_0/source/lib/talloc/talloc.h   2006-09-14 12:08:06 UTC 
(rev 18520)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.h   2006-09-14 12:18:44 UTC 
(rev 18521)
@@ -73,7 +73,7 @@
 #endif
 
 #define talloc_reference(ctx, ptr) 
(_TALLOC_TYPEOF(ptr))_talloc_reference((ctx),(ptr))
-#define talloc_move(ctx, ptr) 
(_TALLOC_TYPEOF(*(ptr)))_talloc_move((ctx),(const void **)(ptr))
+#define talloc_move(ctx, ptr) (_TALLOC_TYPEOF(*(ptr)))_talloc_move((ctx),(void 
*)(ptr))
 
 /* useful macros for creating type checked pointers */
 #define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
@@ -128,7 +128,7 @@
 void talloc_free_children(void *ptr);
 void *_talloc_realloc(const void *context, void *ptr, size_t size, const char 
*name);
 void *_talloc_steal(const void *new_ctx, const void *ptr);
-void *_talloc_move(const void *new_ctx, const void **pptr);
+void *_talloc_move(const void *new_ctx, const void *pptr);
 size_t talloc_total_size(const void *ptr);
 size_t talloc_total_blocks(const void *ptr);
 void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,



svn commit: samba r18522 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .

2006-09-14 Thread jelmer
Author: jelmer
Date: 2006-09-14 12:23:02 + (Thu, 14 Sep 2006)
New Revision: 18522

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

Log:
It's probably not a good idea to use rpc_netdfs_init() as initialization 
function name for _all_ RPC servers...

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm   
2006-09-14 12:18:44 UTC (rev 18521)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm   
2006-09-14 12:23:02 UTC (rev 18522)
@@ -143,8 +143,8 @@
pidl };
pidl ;
 
-   pidl_hdr NTSTATUS rpc_netdfs_init(void);;
-   pidl NTSTATUS rpc_netdfs_init(void);
+   pidl_hdr NTSTATUS rpc_$if-{NAME}_init(void);;
+   pidl NTSTATUS rpc_$if-{NAME}_init(void);
pidl {;
pidl \treturn rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, 
\$if-{NAME}\, \$if-{NAME}\, api_$if-{NAME}_cmds, 
sizeof(api_$if-{NAME}_cmds) / sizeof(struct api_struct));;
pidl };



svn commit: samba r18523 - in branches/SAMBA_4_0/source: librpc/idl pidl/lib/Parse/Pidl pidl/lib/Parse/Pidl/Samba3

2006-09-14 Thread jelmer
Author: jelmer
Date: 2006-09-14 12:25:41 + (Thu, 14 Sep 2006)
New Revision: 18523

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

Log:
Allow [out] on arrays as well as pointers, use in unixinfo.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl   2006-09-14 12:23:02 UTC 
(rev 18522)
+++ branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl   2006-09-14 12:25:41 UTC 
(rev 18523)
@@ -51,6 +51,6 @@
 NTSTATUS unixinfo_GetPWUid (
[in,out,ref,range(0,1023)] uint32 *count,
[in,size_is(*count)] hyper uids[],
-   [out,size_is(*count)] unixinfo_GetPWUidInfo *infos
+   [out,size_is(*count)] unixinfo_GetPWUidInfo infos[*]
 );
 }

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2006-09-14 
12:23:02 UTC (rev 18522)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm2006-09-14 
12:25:41 UTC (rev 18523)
@@ -543,9 +543,10 @@
push (@{$e-{DIRECTION}}, in) if (has_property($x, in));
push (@{$e-{DIRECTION}}, out) if (has_property($x, out));
 
-   nonfatal($x, `$e-{NAME}' is [out] argument but not a pointer)
-   if ($e-{LEVELS}[0]-{TYPE} ne POINTER) and 
-   grep(/out/, @{$e-{DIRECTION}});
+   nonfatal($x, `$e-{NAME}' is [out] argument but not a pointer 
or array)
+   if ($e-{LEVELS}[0]-{TYPE} ne POINTER and 
+   $e-{LEVELS}[0]-{TYPE} ne ARRAY and
+   grep(/out/, @{$e-{DIRECTION}}));
 
push (@elements, $e);
}

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm   
2006-09-14 12:23:02 UTC (rev 18522)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm   
2006-09-14 12:25:41 UTC (rev 18523)
@@ -61,7 +61,7 @@
foreach my $e (@{$fn-{ELEMENTS}}) {
next unless (grep(/out/, @{$e-{DIRECTION}}));
 
-   fatal($e, [out] argument is not a pointer) if 
($e-{LEVELS}[0]-{TYPE} ne POINTER);
+   fatal($e, [out] argument is not a pointer or array) if 
($e-{LEVELS}[0]-{TYPE} ne POINTER and $e-{LEVELS}[0]-{TYPE} ne ARRAY);
 
pidl *$e-{NAME} = *r.out.$e-{NAME};;
}



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

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 14:26:33 + (Thu, 14 Sep 2006)
New Revision: 18525

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

Log:
Be a little less agressive about going back online when requested.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-14 13:37:17 UTC 
(rev 18524)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2006-09-14 14:26:33 UTC 
(rev 18525)
@@ -164,7 +164,7 @@
 }
 
 /
- Request init_dc_connection to set a domain online.
+ Requested to set a domain online.
 /
 
 void set_domain_online_request(struct winbindd_domain *domain)
@@ -178,14 +178,19 @@
return;
}
 
-   /* If we were called from a message request, initiate
-  a DC connection immediately. */
+   /* We've been told it's safe to go online and
+  try and connect to a DC. But I don't believe it...
+  Wait at least 5 seconds. Heuristics suck... */
 
-   init_dc_connection(domain);
+   if (!domain-check_online_event) {
+   DEBUG(5,(set_domain_online_request: no 
check_domain_online_handler 
+   registered. Were we online (%d) ?\n, 
(int)domain-online ));
+   } else {
+   struct timeval tev;
 
-   if (domain-online == False) {
-   DEBUG(10,(set_domain_online_request: failed to init connection 
to DC. 
-   Domain %s staying offline.\n, domain-name ));
+   GetTimeOfDay(tev);
+   tev.tv_sec += 5;
+   set_event_dispatch_time(check_domain_online_handler, tev);
}
 }
 
@@ -906,6 +911,9 @@
if ( !open_any_socket_out(addrs, num_addrs, 5000, fd_index, fd) ) 
{
for (i=0; inum_dcs; i++) {
+   DEBUG(10, (find_new_dc: open_any_socket_out failed for 

+   domain %s address %s\n,
+   domain-name, inet_ntoa(dcs[i].ip) ));
winbind_add_failed_connection_entry(domain,
dcs[i].name, NT_STATUS_UNSUCCESSFUL);
}



svn commit: samba r18526 - in branches/SAMBA_3_0/source: . include librpc/gen_ndr rpc_parse rpc_server

2006-09-14 Thread jelmer
Author: jelmer
Date: 2006-09-14 14:51:16 + (Thu, 14 Sep 2006)
New Revision: 18526

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

Log:
Use generated server for unixinfo RPC interface.

Removed:
   branches/SAMBA_3_0/source/include/rpc_unixinfo.h
   branches/SAMBA_3_0/source/rpc_parse/parse_unixinfo.c
   branches/SAMBA_3_0/source/rpc_server/srv_unixinfo.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_unixinfo.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_dfs.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_lsa.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_lsa.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_unixinfo.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_unixinfo.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/unixinfo.h
   branches/SAMBA_3_0/source/rpc_server/srv_unixinfo_nt.c


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


svn commit: samba r18527 - in branches/SAMBA_3_0/source/passdb: .

2006-09-14 Thread vlendec
Author: vlendec
Date: 2006-09-14 16:02:58 + (Thu, 14 Sep 2006)
New Revision: 18527

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

Log:
Janitor for Jeremy ;-)
Modified:
   branches/SAMBA_3_0/source/passdb/lookup_sid.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/lookup_sid.c
===
--- branches/SAMBA_3_0/source/passdb/lookup_sid.c   2006-09-14 14:51:16 UTC 
(rev 18526)
+++ branches/SAMBA_3_0/source/passdb/lookup_sid.c   2006-09-14 16:02:58 UTC 
(rev 18527)
@@ -458,10 +458,10 @@
return False;
}
 
-   become_root();
+   become_root_uid_only();
result = pdb_lookup_rids(domain_sid, num_rids, rids,
 *names, *types);
-   unbecome_root();
+   unbecome_root_uid_only();
 
return (NT_STATUS_IS_OK(result) ||
NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) ||
@@ -1132,9 +1132,9 @@
goto done;
}
 
-   become_root();
+   become_root_uid_only();
ret = pdb_uid_to_rid(uid, rid);
-   unbecome_root();
+   unbecome_root_uid_only();
 
if (ret) {
/* This is a mapped user */
@@ -1177,9 +1177,9 @@
goto done;
}
 
-   become_root();
+   become_root_uid_only();
ret = pdb_gid_to_sid(gid, psid);
-   unbecome_root();
+   unbecome_root_uid_only();
 
if (ret) {
/* This is a mapped group */
@@ -1225,9 +1225,9 @@
union unid_t id;
BOOL ret;
 
-   become_root();
+   become_root_uid_only();
ret = pdb_sid_to_id(psid, id, type);
-   unbecome_root();
+   unbecome_root_uid_only();
 
if (ret) {
if (type != SID_NAME_USER) {
@@ -1305,9 +1305,9 @@
 sid_check_is_in_wellknown_domain(psid))) {
BOOL ret;
 
-   become_root();
+   become_root_uid_only();
ret = pdb_getgrsid(map, *psid);
-   unbecome_root();
+   unbecome_root_uid_only();
 
if (ret) {
*pgid = map.gid;
@@ -1319,9 +1319,9 @@
if (sid_peek_check_rid(get_global_sam_sid(), psid, rid)) {
BOOL ret;
 
-   become_root();
+   become_root_uid_only();
ret = pdb_sid_to_id(psid, id, type);
-   unbecome_root();
+   unbecome_root_uid_only();
 
if (ret) {
if ((type != SID_NAME_DOM_GRP) 



svn commit: samba r18528 - in branches/SAMBA_4_0/source/heimdal/lib/gssapi: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 16:08:13 + (Thu, 14 Sep 2006)
New Revision: 18528

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

Log:

work around what appears to be a compiler bug in gcc on irix. It
caused the RPC-SECRETS test to crash smbd in an inlined version of
this memcmp() call. This patch should have absolutely no effect at
all, but in fact it prevents the crash. 

Disassembling at the point of the crash, it shows that gcc is inlining
the memcmp(). I don't know enough MIPS assembler to actually spot the
bug. In case anyone reading this does know MIPS assembler, here is the
gcc generated code that crashes:

0x105e0218 gssapi_krb5_verify_header+168: lw  $t1,52($sp)
0x105e021c gssapi_krb5_verify_header+172: lw  $t1,0($t1)
0x105e0220 gssapi_krb5_verify_header+176: lhu $t1,0($t1)
0x105e0224 gssapi_krb5_verify_header+180: lw  $t2,68($sp)
0x105e0228 gssapi_krb5_verify_header+184: lhu $t2,0($t2)
0x105e022c gssapi_krb5_verify_header+188: subu$t1,$t1,$t2

it gets a segv at 0x105e0220.

lha, what do you think of this? The change should be innocuous on all
other platforms, apart from making the code harder to read :(

Modified:
   branches/SAMBA_4_0/source/heimdal/lib/gssapi/decapsulate.c


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/lib/gssapi/decapsulate.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/gssapi/decapsulate.c  2006-09-14 
16:02:58 UTC (rev 18527)
+++ branches/SAMBA_4_0/source/heimdal/lib/gssapi/decapsulate.c  2006-09-14 
16:08:13 UTC (rev 18528)
@@ -110,7 +110,7 @@
 if (len  2)
return GSS_S_DEFECTIVE_TOKEN;
 
-if (memcmp (*str, type, 2) != 0)
+if ((*str)[0] != type[0] || (*str)[1] != type[1])
return GSS_S_DEFECTIVE_TOKEN;
 *str += 2;
 



svn commit: samba r18529 - in branches/SAMBA_3_0/source/lib: .

2006-09-14 Thread idra
Author: idra
Date: 2006-09-14 16:29:07 + (Thu, 14 Sep 2006)
New Revision: 18529

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

Log:

warn the user that putting the machine host name on the
127.0.0.1 line in /etc/hosts is not ok for Kerberos.


Modified:
   branches/SAMBA_3_0/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===
--- branches/SAMBA_3_0/source/lib/util.c2006-09-14 16:08:13 UTC (rev 
18528)
+++ branches/SAMBA_3_0/source/lib/util.c2006-09-14 16:29:07 UTC (rev 
18529)
@@ -2847,6 +2847,14 @@
}
}
}
+   if (full  (StrCaseCmp(full, localhost.localdomain) == 0)) {
+   DEBUG(1, (WARNING: your /etc/hosts file may be 
broken!\n));
+   DEBUGADD(1, (specifing the machine hostname for 
address 127.0.0.1 may lead\n));
+   DEBUGADD(1, (to Kerberos authentication probelms 
as localhost.localdomain\n));
+   DEBUGADD(1, (may end up to be used instead of the 
real machine FQDN.\n));
+   full = hp-h_name;
+   }
+   
if (!full) {
full = hp-h_name;
}



svn commit: samba r18530 - in branches/SAMBA_3_0/source/lib: .

2006-09-14 Thread idra
Author: idra
Date: 2006-09-14 16:33:47 + (Thu, 14 Sep 2006)
New Revision: 18530

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

Log:

typos


Modified:
   branches/SAMBA_3_0/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===
--- branches/SAMBA_3_0/source/lib/util.c2006-09-14 16:29:07 UTC (rev 
18529)
+++ branches/SAMBA_3_0/source/lib/util.c2006-09-14 16:33:47 UTC (rev 
18530)
@@ -2835,7 +2835,7 @@
if ( hp  hp-h_name  *hp-h_name ) {
char *full = NULL;
 
-   /* find out i fthe fqdn is returned as an alias
+   /* find out if the fqdn is returned as an alias
 * to cope with /etc/hosts files where the first
 * name is not the fqdn but the short name */
if (hp-h_aliases  (! strchr_m(hp-h_name, '.'))) {
@@ -2849,7 +2849,7 @@
}
if (full  (StrCaseCmp(full, localhost.localdomain) == 0)) {
DEBUG(1, (WARNING: your /etc/hosts file may be 
broken!\n));
-   DEBUGADD(1, (specifing the machine hostname for 
address 127.0.0.1 may lead\n));
+   DEBUGADD(1, (Specifing the machine hostname for 
address 127.0.0.1 may lead\n));
DEBUGADD(1, (to Kerberos authentication probelms 
as localhost.localdomain\n));
DEBUGADD(1, (may end up to be used instead of the 
real machine FQDN.\n));
full = hp-h_name;



svn commit: samba r18532 - in branches/SAMBA_3_0_23/source/lib: .

2006-09-14 Thread idra
Author: idra
Date: 2006-09-14 16:35:22 + (Thu, 14 Sep 2006)
New Revision: 18532

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

Log:

back port name_to_fqdn enhancements


Modified:
   branches/SAMBA_3_0_23/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0_23/source/lib/util.c
===
--- branches/SAMBA_3_0_23/source/lib/util.c 2006-09-14 16:34:04 UTC (rev 
18531)
+++ branches/SAMBA_3_0_23/source/lib/util.c 2006-09-14 16:35:22 UTC (rev 
18532)
@@ -2828,9 +2828,36 @@
 void name_to_fqdn(fstring fqdn, const char *name)
 {
struct hostent *hp = sys_gethostbyname(name);
+
if ( hp  hp-h_name  *hp-h_name ) {
-   DEBUG(10,(name_to_fqdn: lookup for %s - %s.\n, name, 
hp-h_name));
-   fstrcpy(fqdn,hp-h_name);
+   char *full = NULL;
+
+   /* find out if the fqdn is returned as an alias
+* to cope with /etc/hosts files where the first
+* name is not the fqdn but the short name */
+   if (hp-h_aliases  (! strchr_m(hp-h_name, '.'))) {
+   int i;
+   for (i = 0; hp-h_aliases[i]; i++) {
+   if (strchr_m(hp-h_aliases[i], '.')) {
+   full = hp-h_aliases[i];
+   break;
+   }
+   }
+   }
+   if (full  (StrCaseCmp(full, localhost.localdomain) == 0)) {
+   DEBUG(1, (WARNING: your /etc/hosts file may be 
broken!\n));
+   DEBUGADD(1, (Specifing the machine hostname for 
address 127.0.0.1 may lead\n));
+   DEBUGADD(1, (to Kerberos authentication probelms 
as localhost.localdomain\n));
+   DEBUGADD(1, (may end up to be used instead of the 
real machine FQDN.\n));
+   full = hp-h_name;
+   }
+   
+   if (!full) {
+   full = hp-h_name;
+   }
+
+   DEBUG(10,(name_to_fqdn: lookup for %s - %s.\n, name, full));
+   fstrcpy(fqdn, full);
} else {
DEBUG(10,(name_to_fqdn: lookup for %s failed.\n, name));
fstrcpy(fqdn, name);
@@ -2987,4 +3014,3 @@
return 0;
 #endif
 }
-



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

2006-09-14 Thread jra
Author: jra
Date: 2006-09-14 16:37:13 + (Thu, 14 Sep 2006)
New Revision: 18533

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

Log:
Ensure we clear out the failed connection cache for an entire
domain when going back online.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/libsmb/conncache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/conncache.c
===
--- branches/SAMBA_3_0/source/libsmb/conncache.c2006-09-14 16:35:22 UTC 
(rev 18532)
+++ branches/SAMBA_3_0/source/libsmb/conncache.c2006-09-14 16:37:13 UTC 
(rev 18533)
@@ -162,3 +162,31 @@
}
 
 }
+
+/
+ Remove all negative entries for a domain. Used when going to online state in
+ winbindd.
+/
+ 
+void flush_negative_conn_cache_for_domain(const char *domain)
+{
+   struct failed_connection_cache *fcc;
+   
+   fcc = failed_connection_cache;
+
+   while (fcc) {
+   struct failed_connection_cache *fcc_next;
+
+   fcc_next = fcc-next;
+
+   if (strequal(fcc-domain_name, domain)) {
+   DEBUG(10,(flush_negative_conn_cache_for_domain: 
removed server %s 
+from failed cache for domain %s\n,
+   fcc-controller, domain));
+   DLIST_REMOVE(failed_connection_cache, fcc);
+   free(fcc);
+   }
+
+   fcc = fcc_next;
+   }
+}

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-09-14 16:35:22 UTC 
(rev 18532)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c  2006-09-14 16:37:13 UTC 
(rev 18533)
@@ -584,9 +584,9 @@
 
 static void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain)
 {
-   check_negative_conn_cache_timeout(domain-name, domain-dcname, 0);
+   flush_negative_conn_cache_for_domain(domain-name);
if (*domain-alt_name) {
-   check_negative_conn_cache_timeout(domain-alt_name, 
domain-dcname, 0);
+   flush_negative_conn_cache_for_domain(domain-alt_name);
}
 }
 



Re: svn commit: samba r18529 - in branches/SAMBA_3_0/source/lib: .

2006-09-14 Thread derrell
[EMAIL PROTECTED] writes:

 + DEBUG(1, (WARNING: your /etc/hosts file may be 
 broken!\n));
 + DEBUGADD(1, (specifing the machine hostname for 
 address 127.0.0.1 may lead\n));
 + DEBUGADD(1, (to Kerberos authentication probelms 
 as localhost.localdomain\n));
 + DEBUGADD(1, (may end up to be used instead of the 
 real machine FQDN.\n));

Verb conjugation in English of to be is really strange.  This should say:

DEBUGADD(1, (may end up being used instead of the 
real machine FQDN.\n));

Derrell


Re: svn commit: samba r18529 - in branches/SAMBA_3_0/source/lib: .

2006-09-14 Thread simo
On Thu, 2006-09-14 at 13:56 -0400, [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] writes:
 
  +   DEBUG(1, (WARNING: your /etc/hosts file may be 
  broken!\n));
  +   DEBUGADD(1, (specifing the machine hostname for 
  address 127.0.0.1 may lead\n));
  +   DEBUGADD(1, (to Kerberos authentication probelms 
  as localhost.localdomain\n));
  +   DEBUGADD(1, (may end up to be used instead of the 
  real machine FQDN.\n));
 
 Verb conjugation in English of to be is really strange.  This should say:
 
   DEBUGADD(1, (may end up being used instead of the 
 real machine FQDN.\n));

Thanks,
will change it.
Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org



svn commit: samba r18534 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_23/source/lib

2006-09-14 Thread idra
Author: idra
Date: 2006-09-14 18:07:59 + (Thu, 14 Sep 2006)
New Revision: 18534

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

Log:

Fix grammar


Modified:
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0_23/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===
--- branches/SAMBA_3_0/source/lib/util.c2006-09-14 16:37:13 UTC (rev 
18533)
+++ branches/SAMBA_3_0/source/lib/util.c2006-09-14 18:07:59 UTC (rev 
18534)
@@ -2851,7 +2851,7 @@
DEBUG(1, (WARNING: your /etc/hosts file may be 
broken!\n));
DEBUGADD(1, (Specifing the machine hostname for 
address 127.0.0.1 may lead\n));
DEBUGADD(1, (to Kerberos authentication probelms 
as localhost.localdomain\n));
-   DEBUGADD(1, (may end up to be used instead of the 
real machine FQDN.\n));
+   DEBUGADD(1, (may end up being used instead of the 
real machine FQDN.\n));
full = hp-h_name;
}


Modified: branches/SAMBA_3_0_23/source/lib/util.c
===
--- branches/SAMBA_3_0_23/source/lib/util.c 2006-09-14 16:37:13 UTC (rev 
18533)
+++ branches/SAMBA_3_0_23/source/lib/util.c 2006-09-14 18:07:59 UTC (rev 
18534)
@@ -2848,7 +2848,7 @@
DEBUG(1, (WARNING: your /etc/hosts file may be 
broken!\n));
DEBUGADD(1, (Specifing the machine hostname for 
address 127.0.0.1 may lead\n));
DEBUGADD(1, (to Kerberos authentication probelms 
as localhost.localdomain\n));
-   DEBUGADD(1, (may end up to be used instead of the 
real machine FQDN.\n));
+   DEBUGADD(1, (may end up being used instead of the 
real machine FQDN.\n));
full = hp-h_name;
}




Re: svn commit: samba r18529 - in branches/SAMBA_3_0/source/lib: .

2006-09-14 Thread Rafal Szczesniak
On Thu, Sep 14, 2006 at 02:06:35PM -0400, simo wrote:
 On Thu, 2006-09-14 at 13:56 -0400, [EMAIL PROTECTED] wrote:
  [EMAIL PROTECTED] writes:
  
   + DEBUG(1, (WARNING: your /etc/hosts file may be 
   broken!\n));
   + DEBUGADD(1, (specifing the machine hostname for 
   address 127.0.0.1 may lead\n));
   + DEBUGADD(1, (to Kerberos authentication probelms 
   as localhost.localdomain\n));
   + DEBUGADD(1, (may end up to be used instead of the 
   real machine FQDN.\n));
  
  Verb conjugation in English of to be is really strange.  This should say:
  
  DEBUGADD(1, (may end up being used instead of the 
  real machine FQDN.\n));
 
 Thanks,
 will change it.

Just for the sake of completeness - in the same shot you could fix
a typo: s/probelms/problems/  :-)


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



signature.asc
Description: Digital signature


svn commit: samba r18535 - in branches/SAMBA_4_0/source: build/m4 lib/ldb lib/ldb/tests lib/replace lib/talloc lib/tdb

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 18:46:10 + (Thu, 14 Sep 2006)
New Revision: 18535

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

Log:

move the AC_CANONICAL_HOST and host specific flag tests into
libreplace. This should fix the standalone build of tdb on HPUX, where
we need to blacklist mmap.

Unfortunately this requires that we have a copy of config.guess and
config.sub in each of our project subdirectories. I tried to find a
way to use something like AC_CONFIG_AUX_DIR($libreplacedir) and just
put config.{guess,sub} in the lib/replace/ directory, but I couldn't
figure out how to do that in a way that kept autoconf happy for each
of our separate builds. Any autoconf guru out there see a way to do
this?

Added:
   branches/SAMBA_4_0/source/lib/ldb/config.guess
   branches/SAMBA_4_0/source/lib/ldb/config.sub
   branches/SAMBA_4_0/source/lib/replace/config.guess
   branches/SAMBA_4_0/source/lib/replace/config.sub
   branches/SAMBA_4_0/source/lib/talloc/config.guess
   branches/SAMBA_4_0/source/lib/talloc/config.sub
   branches/SAMBA_4_0/source/lib/tdb/config.guess
   branches/SAMBA_4_0/source/lib/tdb/config.sub
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4
   branches/SAMBA_4_0/source/build/m4/env.m4
   branches/SAMBA_4_0/source/lib/ldb/tests/photo.ldif
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4
   branches/SAMBA_4_0/source/lib/replace/libreplace_cc.m4


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


svn commit: samba r18536 - in branches/SAMBA_4_0/source/lib/ldb: common tests

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 18:50:12 + (Thu, 14 Sep 2006)
New Revision: 18536

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

Log:

fixed the loading of external binary files from ldif into ldb

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c 2006-09-14 18:46:10 UTC 
(rev 18535)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c 2006-09-14 18:50:12 UTC 
(rev 18536)
@@ -50,8 +50,14 @@
int count, size, bytes;
int ret;
int f;
+   const char *fname = (const char *)value-data;
 
-   f = open((const char *)value-data, O_RDONLY);
+   if (strncmp(fname, file://, 7) != 0) {
+   return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+   }
+   fname += 7;
+
+   f = open(fname, O_RDONLY);
if (f == -1) {
return -1;
}

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
18:46:10 UTC (rev 18535)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
18:50:12 UTC (rev 18536)
@@ -73,9 +73,12 @@
 
 echo Testing binary file attribute value
 cp $LDBDIR/tests/samba4.png tests/tmp/samba4.png
-#$VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || exit 1
-#exit 1
-#$VALGRIND ldbsearch '(cn=Hampster Ursula)' jpegPhoto
+$VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || exit 1
+count=`$VALGRIND ldbsearch '(cn=Hampster Ursula)' jpegPhoto || grep '^dn' | wc 
-l`
+if [ $count != 1 ]; then
+echo returned $count records - expected 1
+exit 1
+fi
 rm -f tests/tmp/samba4.png
 
 echo *TODO* Testing UTF8 upper lower case searches !!



svn commit: samba r18537 - in branches/SAMBA_4_0/source/lib/popt: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 19:36:26 + (Thu, 14 Sep 2006)
New Revision: 18537

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

Log:

after testing for poptGetContext, if the test fails, don't try to use
the external popt (this affects hpisgr8)

Modified:
   branches/SAMBA_4_0/source/lib/popt/libpopt.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/popt/libpopt.m4
===
--- branches/SAMBA_4_0/source/lib/popt/libpopt.m4   2006-09-14 18:50:12 UTC 
(rev 18536)
+++ branches/SAMBA_4_0/source/lib/popt/libpopt.m4   2006-09-14 19:36:26 UTC 
(rev 18537)
@@ -11,7 +11,7 @@
 if test x$INCLUDED_POPT != xyes; then
AC_CHECK_HEADERS(popt.h)
AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS=-lpopt ])
-   if test x$ac_cv_header_popt_h = xno; then
+   if test x$ac_cv_header_popt_h = xno -o 
x$ac_cv_lib_popt_poptGetContext = xno; then
INCLUDED_POPT=yes
POPT_CFLAGS=
else



svn commit: samba r18538 - in branches/SAMBA_4_0/source/lib/ldb/tests: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 20:07:45 + (Thu, 14 Sep 2006)
New Revision: 18538

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

Log:

we need a pipe here, not a logical OR

also fix cn name for this record, and ensure tests/tmp is created

Modified:
   branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh
===
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
19:36:26 UTC (rev 18537)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2006-09-14 
20:07:45 UTC (rev 18538)
@@ -72,9 +72,10 @@
 fi
 
 echo Testing binary file attribute value
+mkdir -p tests/tmp
 cp $LDBDIR/tests/samba4.png tests/tmp/samba4.png
 $VALGRIND ldbmodify $LDBDIR/tests/photo.ldif || exit 1
-count=`$VALGRIND ldbsearch '(cn=Hampster Ursula)' jpegPhoto || grep '^dn' | wc 
-l`
+count=`$VALGRIND ldbsearch '(cn=Ursula Hampster)' jpegPhoto | grep '^dn' | wc 
-l`
 if [ $count != 1 ]; then
 echo returned $count records - expected 1
 exit 1



svn commit: samba r18539 - in branches/SAMBA_4_0/source/lib: ldb replace talloc tdb

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-14 20:08:21 + (Thu, 14 Sep 2006)
New Revision: 18539

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

Log:

'make distclean' should delete config.cache

Modified:
   branches/SAMBA_4_0/source/lib/ldb/Makefile.in
   branches/SAMBA_4_0/source/lib/replace/Makefile.in
   branches/SAMBA_4_0/source/lib/talloc/Makefile.in
   branches/SAMBA_4_0/source/lib/tdb/Makefile.in


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2006-09-14 20:07:45 UTC 
(rev 18538)
+++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in   2006-09-14 20:08:21 UTC 
(rev 18539)
@@ -121,7 +121,7 @@
 distclean: clean
rm -f *~ */*~
rm -rf bin lib
-   rm -f config.log config.status include/config.h
+   rm -f config.log config.status config.cache include/config.h
rm -f ldb.pc
rm -f Makefile
 

Modified: branches/SAMBA_4_0/source/lib/replace/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/replace/Makefile.in   2006-09-14 20:07:45 UTC 
(rev 18538)
+++ branches/SAMBA_4_0/source/lib/replace/Makefile.in   2006-09-14 20:08:21 UTC 
(rev 18539)
@@ -53,7 +53,7 @@
 
 distclean: clean
rm -f *~ */*~
-   rm -f config.log config.status config.h
+   rm -f config.log config.status config.h config.cache
rm -f Makefile
 
 realdistclean: distclean

Modified: branches/SAMBA_4_0/source/lib/talloc/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/talloc/Makefile.in2006-09-14 20:07:45 UTC 
(rev 18538)
+++ branches/SAMBA_4_0/source/lib/talloc/Makefile.in2006-09-14 20:08:21 UTC 
(rev 18539)
@@ -65,9 +65,7 @@
 distclean: clean
rm -f *~ */*~
rm -f Makefile
-   rm -f config.log \
-   config.status \
-   config.h
+   rm -f config.log config.status config.h config.cache
 
 realdistclean: distclean
rm -f configure config.h.in

Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in
===
--- branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2006-09-14 20:07:45 UTC 
(rev 18538)
+++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in   2006-09-14 20:08:21 UTC 
(rev 18539)
@@ -74,7 +74,7 @@
 
 distclean: clean
rm -f *~ */*~
-   rm -f config.log config.status include/config.h
+   rm -f config.log config.status include/config.h config.cache
rm -f Makefile
 
 realdistclean: distclean



Re: svn commit: samba r18528 - in branches/SAMBA_4_0/source/heimdal/lib/gssapi: .

2006-09-14 Thread tridge
  work around what appears to be a compiler bug in gcc on irix.

arrgh, sorry, the above should say 'cc' not 'gcc'. With gcc the old
code was fine.

The bug occurs with MIPSpro Compilers: Version 7.4.

The compilation options are cc -c99 -g

Cheers, Tridge


svn commit: linux-cifs-client r81 - in branches/linux-converged-for-old-kernels/fs/cifs: .

2006-09-14 Thread sfrench
Author: sfrench
Date: 2006-09-14 21:20:14 + (Thu, 14 Sep 2006)
New Revision: 81

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=81

Log:
Merge updated cifs 2.4 backport patches from Yehuda Sadeh Weinraub

Added:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsfs24.c
Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
   branches/linux-converged-for-old-kernels/fs/cifs/file.c
   branches/linux-converged-for-old-kernels/fs/cifs/readdir.c


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


Build status as of Fri Sep 15 00:00:01 2006

2006-09-14 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-09-14 
00:00:23.0 +
+++ /home/build/master/cache/broken_results.txt 2006-09-15 00:00:36.0 
+
@@ -1,21 +1,21 @@
-Build status as of Thu Sep 14 00:00:02 2006
+Build status as of Fri Sep 15 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   43 8  0 
-distcc   43 7  0 
-ldb  41 8  0 
-libreplace   39 7  0 
+ccache   47 8  0 
+distcc   47 7  0 
+ldb  45 7  0 
+libreplace   44 3  0 
 lorikeet-heimdal 4  0  0 
 ppp  19 0  0 
-rsync41 5  0 
-samba0  0  0 
+rsync45 5  0 
+samba1  0  0 
 samba-docs   0  0  0 
-samba4   45 16 2 
-samba_3_045 25 0 
+samba4   46 18 4 
+samba_3_045 24 0 
 smb-build32 4  0 
-talloc   43 3  0 
-tdb  41 7  0 
+talloc   48 3  0 
+tdb  46 5  0 
 


svn commit: samba r18540 - in branches/SAMBA_4_0/source/script/tests: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-15 03:24:15 + (Fri, 15 Sep 2006)
New Revision: 18540

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

Log:

show the additional smbd output from each test, rather than only
showing on test failure and showing all the smbd output each time.

Modified:
   branches/SAMBA_4_0/source/script/tests/test_functions.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh2006-09-14 
20:08:21 UTC (rev 18539)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh2006-09-15 
03:24:15 UTC (rev 18540)
@@ -89,6 +89,10 @@
trap rm -f $TEST_LOG EXIT
cmdline=$*
 
+if [ -z $smbd_log_size ]; then
+   smbd_log_size=`wc -l  $SMBD_TEST_LOG`;
+   fi
+
if [ x$RUN_FROM_BUILD_FARM = xyes ];then
echo --==--==--==--==--==--==--==--==--==--==--
echo Running test $name (level 0 stdout)
@@ -114,11 +118,19 @@

( $cmdline  $TEST_LOG 21 )
status=$?
+   # show any additional output from smbd that has happened in this test
+   smbd_have_test_log  { 
+   new_log_size=`wc -l  $SMBD_TEST_LOG`;
+   test $new_log_size = $smbd_log_size || {
+   echo SMBD OUTPUT:;
+   incr_log_size=`expr $new_log_size - $smbd_log_size`;
+   tail -$incr_log_size $SMBD_TEST_LOG;
+   smbd_log_size=$new_log_size;
+   }
+   }
if [ x$status != x0 ]; then
echo TEST OUTPUT:
cat $TEST_LOG;
-   smbd_have_test_log  echo SMBD OUTPUT:;
-   smbd_have_test_log  cat $SMBD_TEST_LOG;
rm -f $TEST_LOG;
if [ x$RUN_FROM_BUILD_FARM = xyes ];then
echo ==



svn commit: samba r18541 - in branches/SAMBA_4_0/source/torture/raw: .

2006-09-14 Thread tridge
Author: tridge
Date: 2006-09-15 03:29:08 + (Fri, 15 Sep 2006)
New Revision: 18541

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

Log:

with 100 old style searches we can run out of file descriptors on some
systems. drop to 50

Modified:
   branches/SAMBA_4_0/source/torture/raw/search.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/search.c
===
--- branches/SAMBA_4_0/source/torture/raw/search.c  2006-09-15 03:24:15 UTC 
(rev 18540)
+++ branches/SAMBA_4_0/source/torture/raw/search.c  2006-09-15 03:29:08 UTC 
(rev 18541)
@@ -1019,7 +1019,7 @@
 */
 static BOOL test_many_dirs(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 {
-   const int num_dirs = 100;
+   const int num_dirs = 50;
int i, fnum, n;
char *fname, *dname;
BOOL ret = True;



svn commit: samba r18542 - in branches/SAMBA_4_0/source: param rpc_server/srvsvc

2006-09-14 Thread idra
Author: idra
Date: 2006-09-15 05:18:53 + (Fri, 15 Sep 2006)
New Revision: 18542

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

Log:

Some late nite work.
Now we can add and remove a share from the Computer Management
console (not yet modify!) usinf share backend = ldb


Modified:
   branches/SAMBA_4_0/source/param/share.c
   branches/SAMBA_4_0/source/param/share.h
   branches/SAMBA_4_0/source/param/share_classic.c
   branches/SAMBA_4_0/source/param/share_ldb.c
   branches/SAMBA_4_0/source/rpc_server/srvsvc/dcesrv_srvsvc.c


Changeset:
Modified: branches/SAMBA_4_0/source/param/share.c
===
--- branches/SAMBA_4_0/source/param/share.c 2006-09-15 03:29:08 UTC (rev 
18541)
+++ branches/SAMBA_4_0/source/param/share.c 2006-09-15 05:18:53 UTC (rev 
18542)
@@ -54,6 +54,22 @@
return sctx-ops-get_config(mem_ctx, sctx, name, scfg);
 }
 
+NTSTATUS share_create(struct share_context *sctx, struct share_info *info)
+{
+   if (sctx-ops-create) {
+   return sctx-ops-create(sctx, info);
+   }
+   return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS share_remove(struct share_context *sctx, const char *name)
+{
+   if (sctx-ops-remove) {
+   return sctx-ops-remove(sctx, name);
+   }
+   return NT_STATUS_NOT_IMPLEMENTED;
+}
+
 /* List of currently available share backends */
 static struct share_ops **backends = NULL;
 

Modified: branches/SAMBA_4_0/source/param/share.h
===
--- branches/SAMBA_4_0/source/param/share.h 2006-09-15 03:29:08 UTC (rev 
18541)
+++ branches/SAMBA_4_0/source/param/share.h 2006-09-15 05:18:53 UTC (rev 
18542)
@@ -36,6 +36,16 @@
void *opaque;
 };
 
+struct share_info {
+   const char *name;
+   const char *type;
+   const char *path;
+   const char *comment;
+   const char *password;
+   int32_t max_users;
+   struct security_descriptor *sd;
+};
+
 struct share_ops {
const char *name;
NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct 
share_context **);
@@ -45,8 +55,8 @@
const char **(*string_list_option)(TALLOC_CTX *, struct share_config *, 
const char *);
NTSTATUS (*list_all)(TALLOC_CTX *, struct share_context *, int *, const 
char ***);
NTSTATUS (*get_config)(TALLOC_CTX *, struct share_context *, const char 
*, struct share_config **);
-   NTSTATUS (*create_obj)(struct share_context *, const char *);
-   NTSTATUS (*delete_obj)(struct share_context *, const char *);
+   NTSTATUS (*create)(struct share_context *, struct share_info *);
+   NTSTATUS (*remove)(struct share_context *, const char *);
 };
 
 #include param/share_proto.h
@@ -56,14 +66,14 @@
 #define SHARE_NAME name
 #define SHARE_PATH path
 #define SHARE_COMMENT  comment
-#define SHARE_PASSWORD password
+#define SHARE_PASSWORD password
 #define SHARE_HOSTS_ALLOW  hosts-allow
 #define SHARE_HOSTS_DENY   hosts-deny
 #define SHARE_NTVFS_HANDLERntvfs-handler
 #define SHARE_TYPE type
 #define SHARE_VOLUME   volume
 #define SHARE_CSC_POLICY   csc-policy
-#define SHARE_AVAILABLEavailable
+#define SHARE_AVAILABLEavailable
 #define SHARE_BROWSEABLE   browseable
 #define SHARE_MAX_CONNECTIONS  max-connections
 

Modified: branches/SAMBA_4_0/source/param/share_classic.c
===
--- branches/SAMBA_4_0/source/param/share_classic.c 2006-09-15 03:29:08 UTC 
(rev 18541)
+++ branches/SAMBA_4_0/source/param/share_classic.c 2006-09-15 05:18:53 UTC 
(rev 18542)
@@ -312,17 +312,17 @@
 
 NTSTATUS share_classic_init(void)
 {
-   struct share_ops ops;
+   static struct share_ops ops = {
+   .name = classic,
+   .init = sclassic_init,
+   .string_option = sclassic_string_option,
+   .int_option = sclassic_int_option,
+   .bool_option = sclassic_bool_option,
+   .string_list_option = sclassic_string_list_option,
+   .list_all = sclassic_list_all,
+   .get_config = sclassic_get_config
+   };
 
-   ops.name = classic;
-   ops.init = sclassic_init;
-   ops.string_option = sclassic_string_option;
-   ops.int_option = sclassic_int_option;
-   ops.bool_option = sclassic_bool_option;
-   ops.string_list_option = sclassic_string_list_option;
-   ops.list_all = sclassic_list_all;
-   ops.get_config = sclassic_get_config;
-
return share_register(ops);
 }
 

Modified: branches/SAMBA_4_0/source/param/share_ldb.c
===
--- branches/SAMBA_4_0/source/param/share_ldb.c 2006-09-15 03:29:08 UTC (rev 
18541)
+++ branches/SAMBA_4_0/source/param/share_ldb.c