diff options
author | Gerald Carter <jerry@samba.org> | 2004-03-15 16:12:52 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-03-15 16:12:52 +0000 |
commit | 11f6251b771e59020af02599ea419e7d7ff682de (patch) | |
tree | 3fb38a5d70e45cf36d39fb4690a94b0e9b747833 /source3 | |
parent | 12fb2d73050a911c7a86749be3639b2c1da84059 (diff) | |
download | samba-11f6251b771e59020af02599ea419e7d7ff682de.tar.gz samba-11f6251b771e59020af02599ea419e7d7ff682de.tar.bz2 samba-11f6251b771e59020af02599ea419e7d7ff682de.zip |
sync small fixes from 3.0 and fix compiler warning in priv code
(This used to be commit c640594c9362dca625a8fa51b453dafe1f3e980d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 1 | ||||
-rw-r--r-- | source3/configure.in | 11 | ||||
-rw-r--r-- | source3/include/adt_tree.h | 2 | ||||
-rw-r--r-- | source3/lib/adt_tree.c | 6 | ||||
-rw-r--r-- | source3/lib/charcnv.c | 2 | ||||
-rw-r--r-- | source3/passdb/pdb_tdb.c | 2 |
6 files changed, 11 insertions, 13 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 81644744df..324a70069e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -69,6 +69,7 @@ CONFIGLIBDIR = $(LIBDIR)/config CONFIGDIR = @configdir@ VARDIR = @localstatedir@ MANDIR = @mandir@ +DATADIR = @datadir@ # The permissions to give the executables INSTALLPERMS = 0755 diff --git a/source3/configure.in b/source3/configure.in index 6cb64e8d87..3a15e9053b 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -27,19 +27,17 @@ AC_ARG_WITH(fhs, [ --with-fhs Use FHS-compliant paths (default=no)], [ case "$withval" in yes) - configdir="${sysconfdir}/samba" lockdir="\${VARDIR}/lib/samba" piddir="\${VARDIR}/run" mandir="\${prefix}/share/man" logfilebase="\${VARDIR}/log/samba" privatedir="\${CONFIGDIR}/private" libdir="\${prefix}/lib/samba" - swatdir="\${prefix}/share/samba/swat" + configdir="${sysconfdir}/samba" + swatdir="\${DATADIR}/samba/swat", ;; esac]) -lmhostsfile="\${CONFIGDIR}/lmhosts" - ################################################# # set private directory location AC_ARG_WITH(privatedir, @@ -929,8 +927,6 @@ AC_CHECK_FUNCS(syslog vsyslog timegm) AC_CHECK_FUNCS(setlocale nl_langinfo) # setbuffer, shmget, shm_open are needed for smbtorture AC_CHECK_FUNCS(setbuffer shmget shm_open backtrace_symbols) - -# IRIX stack backtrace AC_CHECK_HEADERS(libexc.h) AC_CHECK_LIB(exc, trace_back_stack) @@ -2960,7 +2956,7 @@ fi dictpath="/usr/lib/cracklib_dict" - +with_cracklib=yes ############################################### # test for where we get FaciestCheck from AC_MSG_CHECKING(where to use cracklib from (default=$dictpath)) @@ -3326,6 +3322,7 @@ AC_TRY_COMPILE([ #define NO_PROTO_H 1 #define NO_CONFIG_H 1 #define HAVE_SYS_QUOTAS 1 +#include "${srcdir-.}/${samba_cv_sysquotas_file}" #include "${srcdir-.}/lib/sysquotas.c" ],[],samba_cv_SYSQUOTA_WORKS=yes,samba_cv_SYSQUOTA_WORKS=no) CPPFLAGS="$SAVE_CPPFLAGS" diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h index b1bf7ad85d..12e2ea5cc5 100644 --- a/source3/include/adt_tree.h +++ b/source3/include/adt_tree.h @@ -32,7 +32,7 @@ typedef struct _tree_node { typedef struct _tree_root { TREE_NODE *root; int (*compare)(void* x, void *y); - void (*free)(void *p); + void (*free_func)(void *p); } SORTED_TREE; #endif diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c index 0bc224ec23..bd857e205a 100644 --- a/source3/lib/adt_tree.c +++ b/source3/lib/adt_tree.c @@ -65,7 +65,7 @@ SORTED_TREE* sorted_tree_init( void *data_p, ZERO_STRUCTP( tree ); tree->compare = cmp_fn; - tree->free = free_fn; + tree->free_func = free_fn; if ( !(tree->root = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) { SAFE_FREE( tree ); @@ -110,8 +110,8 @@ void sorted_tree_destroy( SORTED_TREE *tree ) if ( tree->root ) sorted_tree_destroy_children( tree->root ); - if ( tree->free ) - tree->free( tree->root ); + if ( tree->free_func ) + tree->free_func( tree->root ); SAFE_FREE( tree ); } diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index c2213c966d..20af806d90 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -1110,7 +1110,7 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_ if (ucs2_align(base_ptr, src, flags)) { src = (const void *)((const char *)src + 1); - if (src_len > 0) + if (src_len != (size_t)-1) src_len--; } diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index aef088c124..8f2fe7651f 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -1204,7 +1204,7 @@ static int tdbsam_traverse_privilege(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data int len; s = data.dptr; - while (c = strchr(s, ',')) { + while ((c=strchr(s, ',')) !=NULL) { len = MAX((c - s), strlen(pt->sid_list[i])); if (strncmp(s, pt->sid_list[i], len) == 0) { DEBUG(10, ("sid [%s] found in users sid list\n", pt->sid_list[i])); |