openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2006
- 1 participants
- 1219 discussions
Hello community,
here is the log from the commit of package device-mapper
checked in at Tue May 23 01:36:10 CEST 2006.
--------
--- device-mapper/device-mapper.changes 2006-05-18 18:39:04.000000000 +0200
+++ device-mapper/device-mapper.changes 2006-05-23 01:06:25.000000000 +0200
@@ -1,0 +2,12 @@
+Mon May 22 17:16:40 CEST 2006 - fehr(a)suse.de
+
+- update to new version 1.02.07
+ Add DM_CORELOG flag to dm_tree_node_add_mirror_target().
+ Avoid a dmeventd compiler warning.
+
+- update to new version 1.02.06
+ Move DEFS into configure.h.
+ Fix leaks in error paths found by coverity.
+ Remove dmsetup line buffer limitation.
+
+-------------------------------------------------------------------
Old:
----
device-mapper.1.02.05.tar.bz2
New:
----
device-mapper.1.02.07.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ device-mapper.spec ++++++
--- /var/tmp/diff_new_pack.tsqGSs/_old 2006-05-23 01:36:02.000000000 +0200
+++ /var/tmp/diff_new_pack.tsqGSs/_new 2006-05-23 01:36:02.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package device-mapper (Version 1.02.05)
+# spec file for package device-mapper (Version 1.02.07)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
License: GPL, LGPL
Group: System/Base
Autoreqprov: on
-Version: 1.02.05
+Version: 1.02.07
Release: 1
Summary: Device Mapper Tools
Source: device-mapper.%{version}.tar.bz2
@@ -68,6 +68,14 @@
%{_mandir}/man8/dmsetup.8.gz
%changelog -n device-mapper
+* Mon May 22 2006 - fehr(a)suse.de
+- update to new version 1.02.07
+ Add DM_CORELOG flag to dm_tree_node_add_mirror_target().
+ Avoid a dmeventd compiler warning.
+- update to new version 1.02.06
+ Move DEFS into configure.h.
+ Fix leaks in error paths found by coverity.
+ Remove dmsetup line buffer limitation.
* Thu Apr 20 2006 - fehr(a)suse.de
- update to new version 1.02.05
Separate install_include target in makefiles.
++++++ device-mapper.1.02.05.tar.bz2 -> device-mapper.1.02.07.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/VERSION new/device-mapper.1.02.07/VERSION
--- old/device-mapper.1.02.05/VERSION 2006-04-19 19:25:07.000000000 +0200
+++ new/device-mapper.1.02.07/VERSION 2006-05-11 22:24:50.000000000 +0200
@@ -1 +1 @@
-1.02.05 (2006-04-19)
+1.02.07 (2006-05-11)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/WHATS_NEW new/device-mapper.1.02.07/WHATS_NEW
--- old/device-mapper.1.02.05/WHATS_NEW 2006-04-19 18:41:03.000000000 +0200
+++ new/device-mapper.1.02.07/WHATS_NEW 2006-05-11 22:24:07.000000000 +0200
@@ -1,3 +1,14 @@
+Version 1.02.07 - 11 May 2006
+=============================
+ Add DM_CORELOG flag to dm_tree_node_add_mirror_target().
+ Avoid a dmeventd compiler warning.
+
+Version 1.02.06 - 10 May 2006
+=============================
+ Move DEFS into configure.h.
+ Fix leaks in error paths found by coverity.
+ Remove dmsetup line buffer limitation.
+
Version 1.02.05 - 19 Apr 2006
=============================
Separate install_include target in makefiles.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/configure new/device-mapper.1.02.07/configure
--- old/device-mapper.1.02.05/configure 2006-04-19 18:38:56.000000000 +0200
+++ new/device-mapper.1.02.07/configure 2006-05-10 21:38:25.000000000 +0200
@@ -310,7 +310,7 @@
#endif"
ac_default_prefix=/usr
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB LIBOBJS MSGFMT usrlibdir JOBS STATIC_LINK OWNER GROUP interface kerneldir missingkernel kernelvsn tmpdir LVM_DEFS COPTIMISE_FLAG CLDFLAGS LDDEPS LIB_SUFFIX DEBUG DM_LIB_VERSION COMPAT DMIOCTLS LOCALEDIR INTL_PACKAGE INTL DEVICE_UID DEVICE_GID DEVICE_MODE DMEVENTD PKGCONFIG LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB LIBOBJS MSGFMT usrlibdir JOBS STATIC_LINK OWNER GROUP interface kerneldir missingkernel kernelvsn tmpdir COPTIMISE_FLAG CLDFLAGS LDDEPS LIB_SUFFIX DEBUG DM_LIB_VERSION COMPAT DMIOCTLS LOCALEDIR INTL_PACKAGE INTL DEVICE_UID DEVICE_GID DEVICE_MODE DMEVENTD PKGCONFIG LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1321,6 +1321,10 @@
################################################################################
+ ac_config_headers="$ac_config_headers include/configure.h"
+
+
+################################################################################
ac_aux_dir=
for ac_dir in autoconf $srcdir/autoconf; do
if test -f $ac_dir/install-sh; then
@@ -5364,6 +5368,82 @@
then exec_prefix="";
fi;
+
+################################################################################
+
+echo "$as_me:$LINENO: checking for getline in -lc" >&5
+echo $ECHO_N "checking for getline in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_getline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getline ();
+int
+main ()
+{
+getline ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_getline=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_getline=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_getline" >&5
+echo "${ECHO_T}$ac_cv_lib_c_getline" >&6
+if test $ac_cv_lib_c_getline = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETLINE 1
+_ACEOF
+
+fi
+
+
################################################################################
echo "$as_me:$LINENO: checking whether to enable selinux support" >&5
echo $ECHO_N "checking whether to enable selinux support... $ECHO_C" >&6
@@ -5377,8 +5457,6 @@
################################################################################
if test x$SELINUX = xyes; then
- echo "$as_me:$LINENO: checking for sepol_check_context function" >&5
-echo $ECHO_N "checking for sepol_check_context function... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for sepol_check_context in -lsepol" >&5
echo $ECHO_N "checking for sepol_check_context in -lsepol... $ECHO_C" >&6
if test "${ac_cv_lib_sepol_sepol_check_context+set}" = set; then
@@ -5449,15 +5527,16 @@
HAVE_SEPOL=no
fi
- echo "$as_me:$LINENO: result: $HAVE_SEPOL" >&5
-echo "${ECHO_T}$HAVE_SEPOL" >&6
if test x$HAVE_SEPOL = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SEPOL 1
+_ACEOF
+
LIBS="-lsepol $LIBS"
fi
- echo "$as_me:$LINENO: checking for is_selinux_enabled function" >&5
-echo $ECHO_N "checking for is_selinux_enabled function... $ECHO_C" >&6
echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
echo $ECHO_N "checking for is_selinux_enabled in -lselinux... $ECHO_C" >&6
if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
@@ -5528,11 +5607,13 @@
HAVE_SELINUX=no
fi
- echo "$as_me:$LINENO: result: $HAVE_SELINUX" >&5
-echo "${ECHO_T}$HAVE_SELINUX" >&6
if test x$HAVE_SELINUX = xyes; then
- LVM_DEFS="$LVM_DEFS -DHAVE_SELINUX"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SELINUX 1
+_ACEOF
+
LIBS="-lselinux $LIBS"
else
{ echo "$as_me:$LINENO: WARNING: Disabling selinux" >&5
@@ -5686,7 +5767,11 @@
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- LVM_DEFS="$LVM_DEFS -DHAVE_GETOPTLONG"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETOPTLONG 1
+_ACEOF
+
fi
done
@@ -5906,7 +5991,6 @@
-
################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl include/Makefile dmsetup/Makefile lib/Makefile lib/libdevmapper.pc lib/libdm-common.h dmeventd/Makefile dmeventd/libdevmapper-event.pc kernel/Makefile man/Makefile po/Makefile"
cat >confcache <<\_ACEOF
@@ -5983,38 +6067,7 @@
}'
fi
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
+DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
@@ -6348,10 +6401,15 @@
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
Configuration files:
$config_files
+Configuration headers:
+$config_headers
+
Report bugs to <bug-autoconf(a)gnu.org>."
_ACEOF
@@ -6472,6 +6530,7 @@
"kernel/Makefile" ) CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;;
"man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+ "include/configure.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/configure.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
@@ -6484,6 +6543,7 @@
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -6596,7 +6656,6 @@
s,@missingkernel@,$missingkernel,;t t
s,@kernelvsn@,$kernelvsn,;t t
s,@tmpdir@,$tmpdir,;t t
-s,@LVM_DEFS@,$LVM_DEFS,;t t
s,@COPTIMISE_FLAG@,$COPTIMISE_FLAG,;t t
s,@CLDFLAGS@,$CLDFLAGS,;t t
s,@LDDEPS@,$LDDEPS,;t t
@@ -6852,6 +6911,229 @@
done
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/configure.in new/device-mapper.1.02.07/configure.in
--- old/device-mapper.1.02.05/configure.in 2006-04-19 18:38:56.000000000 +0200
+++ new/device-mapper.1.02.07/configure.in 2006-05-10 21:38:25.000000000 +0200
@@ -20,6 +20,9 @@
AC_INIT(lib/libdevmapper.h)
################################################################################
+AC_CONFIG_HEADERS(include/configure.h)
+
+################################################################################
dnl -- Setup the directory where autoconf has auxilary files
AC_CONFIG_AUX_DIR(autoconf)
@@ -200,6 +203,12 @@
then exec_prefix="";
fi;
+
+################################################################################
+dnl -- getline included in recent libc
+
+AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1, [Define to 1 if getline is available.]))
+
################################################################################
dnl -- Disable selinux
AC_MSG_CHECKING(whether to enable selinux support)
@@ -210,20 +219,17 @@
################################################################################
dnl -- Check for selinux
if test x$SELINUX = xyes; then
- AC_MSG_CHECKING(for sepol_check_context function)
AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
- AC_MSG_RESULT($HAVE_SEPOL)
if test x$HAVE_SEPOL = xyes; then
+ AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
LIBS="-lsepol $LIBS"
fi
- AC_MSG_CHECKING(for is_selinux_enabled function)
AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes, HAVE_SELINUX=no)
- AC_MSG_RESULT($HAVE_SELINUX)
if test x$HAVE_SELINUX = xyes; then
- LVM_DEFS="$LVM_DEFS -DHAVE_SELINUX"
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 if selinux is available.])
LIBS="-lselinux $LIBS"
else
AC_MSG_WARN(Disabling selinux)
@@ -232,7 +238,7 @@
################################################################################
dnl -- Check for getopt
-AC_CHECK_HEADERS(getopt.h, LVM_DEFS="$LVM_DEFS -DHAVE_GETOPTLONG")
+AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.]))
################################################################################
dnl -- Internationalisation stuff
@@ -359,7 +365,6 @@
AC_SUBST(missingkernel)
AC_SUBST(kernelvsn)
AC_SUBST(tmpdir)
-AC_SUBST(LVM_DEFS)
AC_SUBST(CFLAGS)
AC_SUBST(COPTIMISE_FLAG)
AC_SUBST(CLDFLAGS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/dmeventd/dmeventd.c new/device-mapper.1.02.07/dmeventd/dmeventd.c
--- old/device-mapper.1.02.05/dmeventd/dmeventd.c 2006-03-09 22:33:59.000000000 +0100
+++ new/device-mapper.1.02.07/dmeventd/dmeventd.c 2006-05-11 21:08:02.000000000 +0200
@@ -16,6 +16,9 @@
* dmeventd - dm event daemon to monitor active mapped devices
*/
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
#include "libdevmapper.h"
#include "libdevmapper-event.h"
#include "list.h"
@@ -318,7 +321,7 @@
struct stat st_buf;
char path2[PATH_MAX];
- if (!device)
+ if (!device || !*device)
return 0;
if (device[0] == '/') /* absolute path */
@@ -718,8 +721,11 @@
void *dl;
struct dso_data *ret = NULL;
+ log_very_verbose("Opening shared library %s", data->dso_name);
+
if (!(dl = dlopen(data->dso_name, RTLD_NOW))){
- log_error("%s\n", dlerror());
+ log_error("dmeventd %s dlopen failed: %s", data->dso_name,
+ dlerror());
return NULL;
}
@@ -1207,14 +1213,14 @@
/* Init thread signal handling. */
static void init_thread_signals(void)
{
- sigset_t sigset;
+ sigset_t my_sigset;
struct sigaction act;
memset(&act, 0, sizeof(act));
act.sa_handler = sig_alarm;
sigaction(SIGALRM, &act, NULL);
- sigfillset(&sigset);
- pthread_sigmask(SIG_BLOCK, &sigset, NULL);
+ sigfillset(&my_sigset);
+ pthread_sigmask(SIG_BLOCK, &my_sigset, NULL);
}
static int daemonize(void)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/dmsetup/dmsetup.c new/device-mapper.1.02.07/dmsetup/dmsetup.c
--- old/device-mapper.1.02.05/dmsetup/dmsetup.c 2006-04-06 18:20:40.000000000 +0200
+++ new/device-mapper.1.02.07/dmsetup/dmsetup.c 2006-05-10 21:38:25.000000000 +0200
@@ -19,6 +19,8 @@
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
+#include <configure.h>
+
#include "libdevmapper.h"
#include "log.h"
@@ -74,7 +76,7 @@
# define MKDEV(x,y) makedev((x),(y))
#endif
-#define LINE_SIZE 1024
+#define LINE_SIZE 4096
#define ARGS_MAX 256
#define err(msg, x...) fprintf(stderr, msg "\n", ##x)
@@ -117,7 +119,9 @@
*/
static int _parse_file(struct dm_task *dmt, const char *file)
{
- char buffer[LINE_SIZE], ttype[LINE_SIZE], *ptr, *comment;
+ char *buffer = NULL;
+ size_t buffer_size = 0;
+ char ttype[LINE_SIZE], *ptr, *comment;
FILE *fp;
unsigned long long start, size;
int r = 0, n, line = 0;
@@ -132,7 +136,17 @@
} else
fp = stdin;
- while (fgets(buffer, sizeof(buffer), fp)) {
+#ifndef HAVE_GETLINE
+ buffer_size = LINE_SIZE;
+ if (!(buffer = malloc(buffer_size))) {
+ err("Failed to malloc line buffer.");
+ return 0;
+ }
+
+ while (fgets(buffer, buffer_size, fp)) {
+#else
+ while (getline(&buffer, &buffer_size, fp) > 0) {
+#endif
line++;
/* trim trailing space */
@@ -164,6 +178,7 @@
r = 1;
out:
+ free(buffer);
if (file)
fclose(fp);
return r;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/include/Makefile.in new/device-mapper.1.02.07/include/Makefile.in
--- old/device-mapper.1.02.05/include/Makefile.in 2004-04-02 17:18:37.000000000 +0200
+++ new/device-mapper.1.02.07/include/Makefile.in 2006-05-10 21:38:25.000000000 +0200
@@ -34,7 +34,7 @@
distclean:
find . -maxdepth 2 -type l -exec $(RM) \{\} \;
- $(RM) Makefile .include_symlinks .symlinks_created
+ $(RM) Makefile .include_symlinks .symlinks_created configure.h
pofile: all
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/include/configure.h.in new/device-mapper.1.02.07/include/configure.h.in
--- old/device-mapper.1.02.05/include/configure.h.in 1970-01-01 01:00:00.000000000 +0100
+++ new/device-mapper.1.02.07/include/configure.h.in 2006-05-10 21:38:25.000000000 +0200
@@ -0,0 +1,181 @@
+/* include/configure.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if getline is available. */
+#undef HAVE_GETLINE
+
+/* Define to 1 if getopt_long is available. */
+#undef HAVE_GETOPTLONG
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the `rmdir' function. */
+#undef HAVE_RMDIR
+
+/* Define to 1 if selinux is available. */
+#undef HAVE_SELINUX
+
+/* Define to 1 if sepol_check_context is available. */
+#undef HAVE_SEPOL
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+#undef HAVE_STAT_EMPTY_STRING_BUG
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_RDEV
+
+/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use
+ `HAVE_STRUCT_STAT_ST_RDEV' instead. */
+#undef HAVE_ST_RDEV
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/include/lib.h new/device-mapper.1.02.07/include/lib.h
--- old/device-mapper.1.02.05/include/lib.h 2005-10-17 00:57:20.000000000 +0200
+++ new/device-mapper.1.02.07/include/lib.h 2006-05-10 21:38:25.000000000 +0200
@@ -23,6 +23,8 @@
#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
+#include <configure.h>
+
#include "log.h"
#include "intl.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/lib/libdevmapper.h new/device-mapper.1.02.07/lib/libdevmapper.h
--- old/device-mapper.1.02.05/lib/libdevmapper.h 2006-02-23 20:11:51.000000000 +0100
+++ new/device-mapper.1.02.07/lib/libdevmapper.h 2006-05-11 21:10:55.000000000 +0200
@@ -350,6 +350,7 @@
#define DM_NOSYNC 0x00000001 /* Known already in sync */
#define DM_FORCESYNC 0x00000002 /* Force resync */
#define DM_BLOCK_ON_ERROR 0x00000004 /* On error, suspend I/O */
+#define DM_CORELOG 0x00000008 /* In-memory log */
int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node,
uint32_t region_size,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/lib/libdm-common.c new/device-mapper.1.02.07/lib/libdm-common.c
--- old/device-mapper.1.02.05/lib/libdm-common.c 2006-02-21 00:55:58.000000000 +0100
+++ new/device-mapper.1.02.07/lib/libdm-common.c 2006-05-10 18:23:41.000000000 +0200
@@ -101,8 +101,10 @@
return NULL;
}
- if (!dm_check_version())
+ if (!dm_check_version()) {
+ dm_free(dmt);
return NULL;
+ }
memset(dmt, 0, sizeof(*dmt));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/lib/libdm-deptree.c new/device-mapper.1.02.07/lib/libdm-deptree.c
--- old/device-mapper.1.02.05/lib/libdm-deptree.c 2006-02-08 15:14:13.000000000 +0100
+++ new/device-mapper.1.02.07/lib/libdm-deptree.c 2006-05-11 21:10:55.000000000 +0200
@@ -1243,8 +1243,8 @@
log_parm_count += hweight32(seg->flags); /* [no]sync, block_on_error etc. */
if (seg->clustered) {
- if (seg->uuid)
- log_parm_count++; /* uuid */
+ if (seg->uuid && !(seg->flags & DM_CORELOG))
+ log_parm_count++; /* uuid (already counted for core log) */
if ((tw = _dm_snprintf(params + pos, paramsize - pos, "clustered_")) < 0) {
stack; /* Out of space */
return -1;
@@ -1701,18 +1701,19 @@
seg = list_item(list_last(&node->props.segs), struct load_segment);
if (log_uuid) {
- if (!(log_node = dm_tree_find_node_by_uuid(node->dtree, log_uuid))) {
- log_error("Couldn't find mirror log uuid %s.", log_uuid);
- return 0;
- }
-
- if (!_link_tree_nodes(node, log_node))
- return_0;
-
if (!(seg->uuid = dm_pool_strdup(node->dtree->mem, log_uuid))) {
log_error("log uuid pool_strdup failed");
return 0;
}
+ if (!(flags & DM_CORELOG)) {
+ if (!(log_node = dm_tree_find_node_by_uuid(node->dtree, log_uuid))) {
+ log_error("Couldn't find mirror log uuid %s.", log_uuid);
+ return 0;
+ }
+
+ if (!_link_tree_nodes(node, log_node))
+ return_0;
+ }
}
seg->log = log_node;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/lib/libdm-file.c new/device-mapper.1.02.07/lib/libdm-file.c
--- old/device-mapper.1.02.05/lib/libdm-file.c 2006-01-31 15:50:37.000000000 +0100
+++ new/device-mapper.1.02.07/lib/libdm-file.c 2006-05-10 18:23:41.000000000 +0200
@@ -23,7 +23,7 @@
static int _create_dir_recursive(const char *dir)
{
char *orig, *s;
- int rc;
+ int rc, r = 0;
log_verbose("Creating directory \"%s\"", dir);
/* Create parent directories */
@@ -35,22 +35,24 @@
if (rc < 0 && errno != EEXIST) {
log_error("%s: mkdir failed: %s", orig,
strerror(errno));
- dm_free(orig);
- return 0;
+ goto out;
}
}
*s++ = '/';
}
- dm_free(orig);
/* Create final directory */
rc = mkdir(dir, 0777);
if (rc < 0 && errno != EEXIST) {
log_error("%s: mkdir failed: %s", orig,
strerror(errno));
- return 0;
+ goto out;
}
- return 1;
+
+ r = 1;
+out:
+ dm_free(orig);
+ return r;
}
int create_dir(const char *dir)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/device-mapper.1.02.05/make.tmpl.in new/device-mapper.1.02.07/make.tmpl.in
--- old/device-mapper.1.02.05/make.tmpl.in 2006-04-19 17:23:10.000000000 +0200
+++ new/device-mapper.1.02.07/make.tmpl.in 2006-05-10 21:38:25.000000000 +0200
@@ -24,7 +24,7 @@
MSGFMT = @MSGFMT@
LN_S = @LN_S@
LIBS = @LIBS@
-DEFS += @DEFS@ @LVM_DEFS@
+DEFS += @DEFS@
CFLAGS += @CFLAGS@
CLDFLAGS += @CLDFLAGS@
LDDEPS += @LDDEPS@
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package simias-bonjour
checked in at Tue May 23 01:35:14 CEST 2006.
--------
--- arch/i386/simias-bonjour/simias-bonjour.changes 2006-05-08 17:24:08.000000000 +0200
+++ simias-bonjour/simias-bonjour.changes 2006-05-22 18:23:02.000000000 +0200
@@ -1,0 +2,11 @@
+Mon May 22 18:22:50 CEST 2006 - ro(a)suse.de
+
+- remove false self-obsolete
+
+-------------------------------------------------------------------
+Mon May 22 16:42:49 CEST 2006 - jhargadon(a)novell.com
+
+- modified the specfile so that the version variable is assigned a
+ value before it is referenced.
+
+-------------------------------------------------------------------
Old:
----
simias-bonjour-1.4.6128.1.tar.gz
New:
----
simias-bonjour-1.4.6142.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ simias-bonjour.spec ++++++
--- /var/tmp/diff_new_pack.aAeja3/_old 2006-05-23 01:34:49.000000000 +0200
+++ /var/tmp/diff_new_pack.aAeja3/_new 2006-05-23 01:34:49.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package simias-bonjour (Version 1.4.6128.1)
+# spec file for package simias-bonjour (Version 1.4.6142.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: simias-bonjour
BuildRequires: glib2 glib2-devel gnutls-devel log4net mDNSResponder-devel mono-core mono-data mono-devel mono-web pkgconfig simias
-%define buildnum 6128
+%define buildnum 6142
URL: http://www.ifolder.com
%define prefix /opt/novell/ifolder3
%define sysconfdir /etc
@@ -24,9 +24,8 @@
Requires: mono-core >= 1.1.13
Requires: mono-data >= 1.1.13
Requires: mono-web >= 1.1.13
-Obsoletes : %{name} <= %{version}
-Version: 1.4.6128.1
-Release: 2
+Version: 1.4.6142.1
+Release: 1
Summary: Peer-to-Peer addition to Simias
Source: simias-bonjour-1.4.%{buildnum}.1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -66,6 +65,11 @@
%{prefix}/web/modules/*
%changelog -n simias-bonjour
+* Mon May 22 2006 - ro(a)suse.de
+- remove false self-obsolete
+* Mon May 22 2006 - jhargadon(a)novell.com
+- modified the specfile so that the version variable is assigned a
+ value before it is referenced.
* Mon May 08 2006 - jhargadon(a)novell.com
- resubmitting package to keep in sync with iFolder3 package.
* Thu Apr 20 2006 - jhargadon(a)novell.com
++++++ simias-bonjour-1.4.6128.1.tar.gz -> simias-bonjour-1.4.6142.1.tar.gz ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package simias
checked in at Tue May 23 01:35:12 CEST 2006.
--------
--- simias/simias.changes 2006-05-18 16:18:26.000000000 +0200
+++ simias/simias.changes 2006-05-22 16:41:20.000000000 +0200
@@ -1,0 +2,21 @@
+Mon May 22 16:35:54 CEST 2006 - jhargadon(a)novell.com
+
+- Created a UserName property in MyEnvironment that guarantees the
+ username to be a single component. Changed three locations in
+ Simias that called Environment.UserName to use MyEnvironment.UserName
+- fixed a bug where the username retrieved from CASA was case
+ sensitive compared with the simias username. The simias username
+ originated from eDirectory upcased the first letter of the username.
+- updated DomainAgent to correctly handle when certificates are not
+ valid
+- Build a hard-coded Uri if WS-Inspection fails while setting the
+ host address (fix for 165068)
+- Fixed StoreBrowser so it won't throw exceptions at start up.
+- fixed Bug 152856 and 166366 The files were getting deleted on
+ windows because the src and dst names matched. This only occurred
+- fixed a case where two directories with the same name are created
+ on different machines within a sync cycle. This was creating two
+ nodes for the directory. The first directory to the server will
+ now win.
+
+-------------------------------------------------------------------
Old:
----
simias-1.4.6128.1.tar.gz
New:
----
simias-1.4.6142.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ simias.spec ++++++
--- /var/tmp/diff_new_pack.65YFHO/_old 2006-05-23 01:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.65YFHO/_new 2006-05-23 01:34:43.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package simias (Version 1.4.6128.1)
+# spec file for package simias (Version 1.4.6142.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: simias
BuildRequires: compat-libstdc++ e2fsprogs e2fsprogs-devel gcc-c++ glib2 glib2-devel libflaim libflaim-devel libstdc++ libstdc++-devel libxml2 libxml2-devel log4net mono-core mono-data mono-devel mono-web pkgconfig
-%define buildnum 6128
+%define buildnum 6142
URL: http://www.ifolder.com
%define prefix /opt/novell/ifolder3
%define sysconfdir /etc
@@ -23,9 +23,9 @@
Requires: mono-data >= 1.1.13
Requires: mono-web >= 1.1.13
Requires: log4net
+Version: 1.4.6142.1
+Release: 1
Obsoletes: %{name} < %{version}
-Version: 1.4.6128.1
-Release: 4
Summary: Collection-Oriented Data Storage
Source: simias-1.4.%{buildnum}.1.tar.gz
Patch: simias-libflaim.patch
@@ -145,6 +145,24 @@
#%config(noreplace) %{prefix}/web/web.config
%changelog -n simias
+* Mon May 22 2006 - jhargadon(a)novell.com
+- Created a UserName property in MyEnvironment that guarantees the
+ username to be a single component. Changed three locations in
+ Simias that called Environment.UserName to use MyEnvironment.UserName
+- fixed a bug where the username retrieved from CASA was case
+ sensitive compared with the simias username. The simias username
+ originated from eDirectory upcased the first letter of the username.
+- updated DomainAgent to correctly handle when certificates are not
+ valid
+- Build a hard-coded Uri if WS-Inspection fails while setting the
+ host address (fix for 165068)
+- Fixed StoreBrowser so it won't throw exceptions at start up.
+- fixed Bug 152856 and 166366 The files were getting deleted on
+ windows because the src and dst names matched. This only occurred
+- fixed a case where two directories with the same name are created
+ on different machines within a sync cycle. This was creating two
+ nodes for the directory. The first directory to the server will
+ now win.
* Thu May 18 2006 - meissner(a)suse.de
- build helper binaries soapcpp2 and wsdl2h from source
to allow all platforms. Fixed the function return warnings.
++++++ simias-1.4.6128.1.tar.gz -> simias-1.4.6142.1.tar.gz ++++++
simias/simias-1.4.6128.1.tar.gz simias/simias-1.4.6142.1.tar.gz differ: char 5, line 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package scim-chewing
checked in at Tue May 23 01:34:41 CEST 2006.
--------
--- scim-chewing/scim-chewing.changes 2006-02-28 11:50:06.000000000 +0100
+++ scim-chewing/scim-chewing.changes 2006-05-22 17:35:31.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 22 17:35:24 CEST 2006 - schwab(a)suse.de
+
+- Don't strip binaries.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ scim-chewing.spec ++++++
--- /var/tmp/diff_new_pack.60ns8k/_old 2006-05-23 01:33:02.000000000 +0200
+++ /var/tmp/diff_new_pack.60ns8k/_new 2006-05-23 01:33:02.000000000 +0200
@@ -13,7 +13,7 @@
Name: scim-chewing
BuildRequires: gcc-c++ gtk2-devel libchewing-devel scim-devel update-desktop-files
Version: 0.2.1
-Release: 6
+Release: 16
License: GPL
Group: System/I18n/Chinese
Autoreqprov: on
@@ -51,8 +51,7 @@
make
%install
-[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
-make DESTDIR=${RPM_BUILD_ROOT} install-strip
+make DESTDIR=${RPM_BUILD_ROOT} install
rm -f $RPM_BUILD_ROOT%{_libdir}/scim-1.0/*/*.la
%find_lang scim-chewing
@@ -70,6 +69,8 @@
%{_datadir}/scim/icons/scim-chewing.png
%changelog -n scim-chewing
+* Mon May 22 2006 - schwab(a)suse.de
+- Don't strip binaries.
* Tue Feb 28 2006 - mfabian(a)suse.de
- Bugzilla #153791: use ';' in Provides locale(...).
* Thu Feb 23 2006 - mfabian(a)suse.de
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package setserial
checked in at Tue May 23 01:34:38 CEST 2006.
--------
--- setserial/setserial.changes 2006-01-25 21:41:34.000000000 +0100
+++ setserial/setserial.changes 2006-05-22 18:08:59.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 22 18:08:52 CEST 2006 - schwab(a)suse.de
+
+- Don't strip binaries.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ setserial.spec ++++++
--- /var/tmp/diff_new_pack.BeW7oq/_old 2006-05-23 01:33:02.000000000 +0200
+++ /var/tmp/diff_new_pack.BeW7oq/_new 2006-05-23 01:33:02.000000000 +0200
@@ -1,18 +1,18 @@
#
# spec file for package setserial (Version 2.17)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: setserial
Version: 2.17
-Release: 581
+Release: 593
Provides: util:/sbin/setserial
PreReq: %insserv_prereq
Requires: /sbin/isserial
@@ -46,6 +46,7 @@
%patch2
%build
+%suse_update_config
CFLAGS="$RPM_OPT_FLAGS -Wall" \
./configure \
--prefix=%{_prefix} \
@@ -55,12 +56,11 @@
make
%install
-rm -rf "$RPM_BUILD_ROOT"
mkdir -p ${RPM_BUILD_ROOT}/bin
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
-make install DESTDIR="$RPM_BUILD_ROOT"
+make install DESTDIR="$RPM_BUILD_ROOT" STRIP=:
install %SOURCE1 ${RPM_BUILD_ROOT}/etc/init.d/setserial
ln -sf /etc/init.d/setserial ${RPM_BUILD_ROOT}%{_sbindir}/rcsetserial
@@ -92,6 +92,8 @@
%{_sbindir}/*
%changelog -n setserial
+* Mon May 22 2006 - schwab(a)suse.de
+- Don't strip binaries.
* Wed Jan 25 2006 - mls(a)suse.de
- converted neededforbuild to BuildRequires
* Thu Sep 08 2005 - mjancar(a)suse.cz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package samba
checked in at Tue May 23 01:32:55 CEST 2006.
--------
--- samba/samba.changes 2006-05-21 14:21:16.000000000 +0200
+++ samba/samba.changes 2006-05-22 23:54:26.000000000 +0200
@@ -2,6 +2 @@
-Sun May 21 14:13:44 CEST 2006 - lmuelle(a)suse.de
-
-- Set the groups membership first whilst we're still root; [#177114].
-
--------------------------------------------------------------------
-Fri May 19 20:23:46 CEST 2006 - lmuelle(a)suse.de
+Mon May 22 20:14:38 CEST 2006 - lmuelle(a)suse.de
@@ -8,0 +4,5 @@
+- Optimize lookup of user's group memberships via ExtendedDn LDAP control;
+ [#168100].
+- Restart winbind if the hostname is modified by the DHCP client; [#169260].
+- Set the groups membership first whilst we're still root and use execve()
+ instead of execv() in get_printing_ticket; [#177114].
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ samba-doc.spec ++++++
--- /var/tmp/diff_new_pack.CCQsqz/_old 2006-05-23 01:23:49.000000000 +0200
+++ /var/tmp/diff_new_pack.CCQsqz/_new 2006-05-23 01:23:49.000000000 +0200
@@ -16,7 +16,7 @@
License: GPL
URL: http://www.samba.org/
Version: 3.0.22
-Release: 22
+Release: 24
Summary: Samba Documentation
Group: Documentation/Other
Autoreqprov: on
++++++ samba.spec ++++++
--- /var/tmp/diff_new_pack.CCQsqz/_old 2006-05-23 01:23:49.000000000 +0200
+++ /var/tmp/diff_new_pack.CCQsqz/_new 2006-05-23 01:23:49.000000000 +0200
@@ -20,7 +20,7 @@
URL: http://www.samba.org/
Autoreqprov: on
Version: 3.0.22
-Release: 14
+Release: 15
Provides: sambaxp = %{version}-%{release} samba3 = %{version}-%{release}
Obsoletes: samba-classic samba-ldap sambaxp samba3 < %{version}
Requires: samba-client >= %{version}
@@ -165,7 +165,7 @@
Group: Productivity/Networking/Samba
Autoreqprov: on
Version: 1.34a
-Release: 19
+Release: 20
Requires: perl-ldap
%endif
%if %{suse_version} > 920
@@ -180,7 +180,7 @@
Group: Productivity/Networking/Samba
Autoreqprov: on
Version: 0.3.6b
-Release: 43
+Release: 44
Provides: samba3-vscan = 0.3.6b
Obsoletes: samba3-vscan
Requires: samba = %{samba_ver}
@@ -1229,9 +1229,12 @@
%endif
%changelog -n samba
-* Sun May 21 2006 - lmuelle(a)suse.de
-- Set the groups membership first whilst we're still root; [#177114].
-* Fri May 19 2006 - lmuelle(a)suse.de
+* Mon May 22 2006 - lmuelle(a)suse.de
+- Optimize lookup of user's group memberships via ExtendedDn LDAP control;
+ [#168100].
+- Restart winbind if the hostname is modified by the DHCP client; [#169260].
+- Set the groups membership first whilst we're still root and use execve()
+ instead of execv() in get_printing_ticket; [#177114].
- Add samba-krb-printing sub package with get_printing_ticket wrapper binary;
[#149698].
* Tue May 16 2006 - gd(a)suse.de
++++++ patches.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/samba.org/15306 new/patches/samba.org/15306
--- old/patches/samba.org/15306 1970-01-01 01:00:00.000000000 +0100
+++ new/patches/samba.org/15306 2006-05-22 17:31:03.000000000 +0200
@@ -0,0 +1,135 @@
+------------------------------------------------------------------------
+r15306 | gd | 2006-04-28 16:48:22 +0200 (Fr, 28 Apr 2006) | 5 lines
+
+Be consistent between rpc and ads winbind backend: let the ads backend
+query the samlogon cache first as well.
+
+Guenther
+
+------------------------------------------------------------------------
+Index: source/nsswitch/winbindd_ads.c
+===================================================================
+--- source/nsswitch/winbindd_ads.c.orig
++++ source/nsswitch/winbindd_ads.c
+@@ -624,6 +624,12 @@ static NTSTATUS lookup_usergroups(struct
+ DEBUG(3,("ads: lookup_usergroups\n"));
+ *p_num_groups = 0;
+
++ status = lookup_usergroups_cached(domain, mem_ctx, sid,
++ p_num_groups, user_sids);
++ if (NT_STATUS_IS_OK(status)) {
++ return NT_STATUS_OK;
++ }
++
+ ads = ads_cached_connection(domain);
+
+ if (!ads) {
+@@ -669,10 +675,12 @@ static NTSTATUS lookup_usergroups(struct
+
+ /* there must always be at least one group in the token,
+ unless we are talking to a buggy Win2k server */
++
+ if (count == 0) {
++
+ status = lookup_usergroups_alt(domain, mem_ctx, user_dn,
+- &primary_group,
+- &num_groups, user_sids);
++ &primary_group,
++ &num_groups, user_sids);
+ *p_num_groups = (uint32)num_groups;
+ return status;
+ }
+Index: source/nsswitch/winbindd_util.c
+===================================================================
+--- source/nsswitch/winbindd_util.c.orig
++++ source/nsswitch/winbindd_util.c
+@@ -1211,3 +1211,49 @@ BOOL winbindd_upgrade_idmap(void)
+
+ return idmap_convert(idmap_name);
+ }
++NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
++ TALLOC_CTX *mem_ctx,
++ const DOM_SID *user_sid,
++ uint32 *p_num_groups, DOM_SID **user_sids)
++{
++ NET_USER_INFO_3 *info3 = NULL;
++ NTSTATUS status = NT_STATUS_NO_MEMORY;
++ int i;
++ size_t num_groups = 0;
++ DOM_SID group_sid, primary_group;
++
++ DEBUG(3,(": lookup_usergroups_cached\n"));
++
++ *user_sids = NULL;
++ num_groups = 0;
++
++ info3 = netsamlogon_cache_get(mem_ctx, user_sid);
++
++ if (info3 == NULL) {
++ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
++ }
++
++ if (info3->num_groups == 0) {
++ SAFE_FREE(info3);
++ return NT_STATUS_UNSUCCESSFUL;
++ }
++
++ /* always add the primary group to the sid array */
++ sid_compose(&primary_group, &info3->dom_sid.sid, info3->user_rid);
++
++ add_sid_to_array(mem_ctx, &primary_group, user_sids, &num_groups);
++
++ for (i=0; i<info3->num_groups; i++) {
++ sid_copy(&group_sid, &info3->dom_sid.sid);
++ sid_append_rid(&group_sid, info3->gids[i].g_rid);
++
++ add_sid_to_array(mem_ctx, &group_sid, user_sids,
++ &num_groups);
++ }
++
++ SAFE_FREE(info3);
++ *p_num_groups = num_groups;
++ status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
++
++ return status;
++}
+Index: source/nsswitch/winbindd_rpc.c
+===================================================================
+--- source/nsswitch/winbindd_rpc.c.orig
++++ source/nsswitch/winbindd_rpc.c
+@@ -412,7 +412,6 @@ static NTSTATUS lookup_usergroups(struct
+ unsigned int i;
+ fstring sid_string;
+ uint32 user_rid;
+- NET_USER_INFO_3 *user;
+ struct rpc_pipe_client *cli;
+
+ DEBUG(3,("rpc: lookup_usergroups sid=%s\n",
+@@ -425,23 +424,10 @@ static NTSTATUS lookup_usergroups(struct
+ *user_grpsids = NULL;
+
+ /* so lets see if we have a cached user_info_3 */
+-
+- if ( (user = netsamlogon_cache_get( mem_ctx, user_sid )) != NULL )
+- {
+- DEBUG(5,("query_user: Cache lookup succeeded for %s\n",
+- sid_string_static(user_sid)));
+-
+- *num_groups = user->num_groups;
+-
+- (*user_grpsids) = TALLOC_ARRAY(mem_ctx, DOM_SID, *num_groups);
+- for (i=0;i<(*num_groups);i++) {
+- sid_copy(&((*user_grpsids)[i]), &domain->sid);
+- sid_append_rid(&((*user_grpsids)[i]),
+- user->gids[i].g_rid);
+- }
+-
+- SAFE_FREE(user);
+-
++ result = lookup_usergroups_cached(domain, mem_ctx, user_sid,
++ num_groups, user_grpsids);
++
++ if (NT_STATUS_IS_OK(result)) {
+ return NT_STATUS_OK;
+ }
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/samba.org/15492 new/patches/samba.org/15492
--- old/patches/samba.org/15492 1970-01-01 01:00:00.000000000 +0100
+++ new/patches/samba.org/15492 2006-05-22 17:24:32.000000000 +0200
@@ -0,0 +1,61 @@
+------------------------------------------------------------------------
+r15492 | abartlet | 2006-05-07 17:05:32 +0200 (So, 07 Mai 2006) | 10 lines
+
+Without this patch, the LDAP client libs will call abort() in
+ldap_get_values_len, because they were handed a NULL msgs pointer, for
+example in ads_pull_sid().
+
+This occurs when the AD server fails at the connect stage. (The
+toubled AD server is actually Samba4 in my example).
+
+Andrew Bartlett
+
+
+------------------------------------------------------------------------
+Index: source/libads/ldap_utils.c
+===================================================================
+--- source/libads/ldap_utils.c (Revision 15491)
++++ source/libads/ldap_utils.c (Revision 15492)
+@@ -48,16 +48,17 @@
+ return ADS_ERROR_NT(NT_STATUS_NO_MEMORY);
+ }
+
+- while (count--) {
+- *res = NULL;
+- status = ads_do_search_all(ads, bp, scope, expr, attrs, res);
+- if (ADS_ERR_OK(status)) {
+- DEBUG(5,("Search for %s gave %d replies\n",
+- expr, ads_count_replies(ads, *res)));
+- SAFE_FREE(bp);
+- return status;
+- }
++ *res = NULL;
++ status = ads_do_search_all(ads, bp, scope, expr, attrs, res);
++ if (ADS_ERR_OK(status)) {
++ DEBUG(5,("Search for %s gave %d replies\n",
++ expr, ads_count_replies(ads, *res)));
++ SAFE_FREE(bp);
++ return status;
++ }
+
++ while (--count) {
++
+ if (*res)
+ ads_msgfree(ads, *res);
+ *res = NULL;
+@@ -79,6 +80,15 @@
+ SAFE_FREE(bp);
+ return status;
+ }
++
++ *res = NULL;
++ status = ads_do_search_all(ads, bp, scope, expr, attrs, res);
++ if (ADS_ERR_OK(status)) {
++ DEBUG(5,("Search for %s gave %d replies\n",
++ expr, ads_count_replies(ads, *res)));
++ SAFE_FREE(bp);
++ return status;
++ }
+ }
+ SAFE_FREE(bp);
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/samba.org/15698 new/patches/samba.org/15698
--- old/patches/samba.org/15698 1970-01-01 01:00:00.000000000 +0100
+++ new/patches/samba.org/15698 2006-05-22 17:48:50.000000000 +0200
@@ -0,0 +1,639 @@
+------------------------------------------------------------------------
+r15698 | gd | 2006-05-18 21:34:25 +0200 (Do, 18 Mai 2006) | 24 lines
+
+An attempt to make the winbind lookup_usergroups() call in security=ads
+more scalable:
+
+The most efficient way is to use the "tokenGroups" attribute which gives
+the nested group membership. As this attribute can not always be
+retrieved when binding with the machine account (the only garanteed way
+to get the tokenGroups I could find is when the machine account is a
+member of the "Pre Win2k Access" builtin group).
+
+Our current fallback when "tokenGroups" failed is looking for all groups
+where the userdn was in the "member" attribute. This behaves not very
+well in very large AD domains.
+
+The patch first tries the "memberOf" attribute on the user's dn in that
+case and directly retrieves the group's sids by using the LDAP Extended
+DN control from the user's object.
+
+The way to pass down the control to the ldap search call is rather
+painfull and probably will be rearranged later on.
+
+Successfully tested on win2k sp0, win2k sp4, wink3 sp1 and win2k3 r2.
+
+Guenther
+
+------------------------------------------------------------------------
+Index: source/nsswitch/winbindd_ads.c
+===================================================================
+--- source/nsswitch/winbindd_ads.c.orig
++++ source/nsswitch/winbindd_ads.c
+@@ -516,11 +516,11 @@ done:
+
+ /* Lookup groups a user is a member of - alternate method, for when
+ tokenGroups are not available. */
+-static NTSTATUS lookup_usergroups_alt(struct winbindd_domain *domain,
+- TALLOC_CTX *mem_ctx,
+- const char *user_dn,
+- DOM_SID *primary_group,
+- size_t *p_num_groups, DOM_SID **user_sids)
++static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain,
++ TALLOC_CTX *mem_ctx,
++ const char *user_dn,
++ DOM_SID *primary_group,
++ size_t *p_num_groups, DOM_SID **user_sids)
+ {
+ ADS_STATUS rc;
+ NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+@@ -533,7 +533,7 @@ static NTSTATUS lookup_usergroups_alt(st
+ char *escaped_dn;
+ size_t num_groups = 0;
+
+- DEBUG(3,("ads: lookup_usergroups_alt\n"));
++ DEBUG(3,("ads: lookup_usergroups_member\n"));
+
+ ads = ads_cached_connection(domain);
+
+@@ -547,9 +547,6 @@ static NTSTATUS lookup_usergroups_alt(st
+ goto done;
+ }
+
+- /* buggy server, no tokenGroups. Instead lookup what groups this user
+- is a member of by DN search on member*/
+-
+ if (!(ldap_exp = talloc_asprintf(mem_ctx, "(&(member=%s)(objectCategory=group))", escaped_dn))) {
+ DEBUG(1,("lookup_usergroups(dn=%s) asprintf failed!\n", user_dn));
+ SAFE_FREE(escaped_dn);
+@@ -593,7 +590,7 @@ static NTSTATUS lookup_usergroups_alt(st
+ *p_num_groups = num_groups;
+ status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
+
+- DEBUG(3,("ads lookup_usergroups (alt) for dn=%s\n", user_dn));
++ DEBUG(3,("ads lookup_usergroups (member) succeeded for dn=%s\n", user_dn));
+ done:
+ if (res)
+ ads_msgfree(ads, res);
+@@ -601,6 +598,89 @@ done:
+ return status;
+ }
+
++/* Lookup groups a user is a member of - alternate method, for when
++ tokenGroups are not available. */
++static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain,
++ TALLOC_CTX *mem_ctx,
++ const char *user_dn,
++ DOM_SID *primary_group,
++ size_t *p_num_groups, DOM_SID **user_sids)
++{
++ ADS_STATUS rc;
++ NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
++ int count;
++ void *res = NULL;
++ ADS_STRUCT *ads;
++ const char *attrs[] = {"memberOf", NULL};
++ size_t num_groups = 0;
++ DOM_SID *group_sids = NULL;
++ int i;
++
++ DEBUG(3,("ads: lookup_usergroups_memberof\n"));
++
++ ads = ads_cached_connection(domain);
++
++ if (!ads) {
++ domain->last_status = NT_STATUS_SERVER_DISABLED;
++ goto done;
++ }
++
++ rc = ads_search_retry_extended_dn(ads, &res, user_dn, attrs,
++ ADS_EXTENDED_DN_HEX_STRING);
++
++ if (!ADS_ERR_OK(rc) || !res) {
++ DEBUG(1,("lookup_usergroups_memberof ads_search member=%s: %s\n",
++ user_dn, ads_errstr(rc)));
++ return ads_ntstatus(rc);
++ }
++
++ count = ads_count_replies(ads, res);
++
++ if (count == 0) {
++ status = NT_STATUS_NO_SUCH_USER;
++ goto done;
++ }
++
++ *user_sids = NULL;
++ num_groups = 0;
++
++ /* always add the primary group to the sid array */
++ add_sid_to_array(mem_ctx, primary_group, user_sids, &num_groups);
++
++ count = ads_pull_sids_from_extendeddn(ads, mem_ctx, res, "memberOf",
++ ADS_EXTENDED_DN_HEX_STRING,
++ &group_sids);
++ if (count == 0) {
++ DEBUG(1,("No memberOf for this user?!?\n"));
++ status = NT_STATUS_NO_MEMORY;
++ goto done;
++ }
++
++ for (i=0; i<count; i++) {
++
++ /* ignore Builtin groups from ADS - Guenther */
++ if (sid_check_is_in_builtin(&group_sids[i])) {
++ continue;
++ }
++
++ add_sid_to_array(mem_ctx, &group_sids[i], user_sids,
++ &num_groups);
++
++ }
++
++ *p_num_groups = num_groups;
++ status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
++
++ DEBUG(3,("ads lookup_usergroups (memberof) succeeded for dn=%s\n", user_dn));
++done:
++ TALLOC_FREE(group_sids);
++ if (res)
++ ads_msgfree(ads, res);
++
++ return status;
++}
++
++
+ /* Lookup groups a user is a member of. */
+ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+@@ -676,13 +756,29 @@ static NTSTATUS lookup_usergroups(struct
+ /* there must always be at least one group in the token,
+ unless we are talking to a buggy Win2k server */
+
++ /* actually this only happens when the machine account has no read
++ * permissions on the tokenGroup attribute - gd */
++
+ if (count == 0) {
+
+- status = lookup_usergroups_alt(domain, mem_ctx, user_dn,
+- &primary_group,
+- &num_groups, user_sids);
+- *p_num_groups = (uint32)num_groups;
+- return status;
++ /* no tokenGroups */
++
++ /* lookup what groups this user is a member of by DN search on
++ * "memberOf" */
++
++ status = lookup_usergroups_memberof(domain, mem_ctx, user_dn,
++ &primary_group,
++ p_num_groups, user_sids);
++ if (NT_STATUS_IS_OK(status)) {
++ return status;
++ }
++
++ /* lookup what groups this user is a member of by DN search on
++ * "member" */
++
++ return lookup_usergroups_member(domain, mem_ctx, user_dn,
++ &primary_group,
++ p_num_groups, user_sids);
+ }
+
+ *user_sids = NULL;
+@@ -704,7 +800,7 @@ static NTSTATUS lookup_usergroups(struct
+ *p_num_groups = (uint32)num_groups;
+ status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
+
+- DEBUG(3,("ads lookup_usergroups for sid=%s\n",
++ DEBUG(3,("ads lookup_usergroups (tokenGroups) succeeded for sid=%s\n",
+ sid_to_string(sid_string, sid)));
+ done:
+ return status;
+Index: source/nsswitch/winbindd_util.c
+===================================================================
+--- source/nsswitch/winbindd_util.c.orig
++++ source/nsswitch/winbindd_util.c
+@@ -1226,6 +1226,7 @@ NTSTATUS lookup_usergroups_cached(struct
+
+ *user_sids = NULL;
+ num_groups = 0;
++ *p_num_groups = 0;
+
+ info3 = netsamlogon_cache_get(mem_ctx, user_sid);
+
+@@ -1254,6 +1255,8 @@ NTSTATUS lookup_usergroups_cached(struct
+ SAFE_FREE(info3);
+ *p_num_groups = num_groups;
+ status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
+-
++
++ DEBUG(3,(": lookup_usergroups_cached succeeded\n"));
++
+ return status;
+ }
+Index: source/include/ads.h
+===================================================================
+--- source/include/ads.h.orig
++++ source/include/ads.h
+@@ -92,6 +92,7 @@ typedef void **ADS_MODLIST;
+ #define ADS_NO_REFERRALS_OID "1.2.840.113556.1.4.1339"
+ #define ADS_SERVER_SORT_OID "1.2.840.113556.1.4.473"
+ #define ADS_PERMIT_MODIFY_OID "1.2.840.113556.1.4.1413"
++#define ADS_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
+
+ /* ldap attribute oids (Services for Unix) */
+ #define ADS_ATTR_SFU_UIDNUMBER_OID "1.2.840.113556.1.6.18.1.310"
+@@ -264,3 +265,17 @@ typedef void **ADS_MODLIST;
+
+ #define WELL_KNOWN_GUID_COMPUTERS "AA312825768811D1ADED00C04FD8D5CD"
+ #define WELL_KNOWN_GUID_USERS "A9D1CA15768811D1ADED00C04FD8D5CD"
++
++enum ads_extended_dn_flags {
++ ADS_EXTENDED_DN_HEX_STRING = 0,
++ ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */
++};
++
++/* this is probably not very well suited to pass other controls generically but
++ * is good enough for the extended dn control where it is only used for atm */
++
++typedef struct {
++ const char *control;
++ int val;
++ int critical;
++} ads_control;
+Index: source/libads/ldap_utils.c
+===================================================================
+--- source/libads/ldap_utils.c.orig
++++ source/libads/ldap_utils.c
+@@ -27,9 +27,9 @@
+ a wrapper around ldap_search_s that retries depending on the error code
+ this is supposed to catch dropped connections and auto-reconnect
+ */
+-ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope,
+- const char *expr,
+- const char **attrs, void **res)
++static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT *ads, const char *bind_path, int scope,
++ const char *expr,
++ const char **attrs, void *args, void **res)
+ {
+ ADS_STATUS status = ADS_SUCCESS;
+ int count = 3;
+@@ -49,7 +49,7 @@ ADS_STATUS ads_do_search_retry(ADS_STRUC
+ }
+
+ *res = NULL;
+- status = ads_do_search_all(ads, bp, scope, expr, attrs, res);
++ status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
+ if (ADS_ERR_OK(status)) {
+ DEBUG(5,("Search for %s gave %d replies\n",
+ expr, ads_count_replies(ads, *res)));
+@@ -82,7 +82,7 @@ ADS_STATUS ads_do_search_retry(ADS_STRUC
+ }
+
+ *res = NULL;
+- status = ads_do_search_all(ads, bp, scope, expr, attrs, res);
++ status = ads_do_search_all_args(ads, bp, scope, expr, attrs, args, res);
+ if (ADS_ERR_OK(status)) {
+ DEBUG(5,("Search for %s gave %d replies\n",
+ expr, ads_count_replies(ads, *res)));
+@@ -99,6 +99,20 @@ ADS_STATUS ads_do_search_retry(ADS_STRUC
+ return status;
+ }
+
++ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope,
++ const char *expr,
++ const char **attrs, void **res)
++{
++ return ads_do_search_retry_internal(ads, bind_path, scope, expr, attrs, NULL, res);
++}
++
++ADS_STATUS ads_do_search_retry_args(ADS_STRUCT *ads, const char *bind_path, int scope,
++ const char *expr,
++ const char **attrs, void *args, void **res)
++{
++ return ads_do_search_retry_internal(ads, bind_path, scope, expr, attrs, args, res);
++}
++
+
+ ADS_STATUS ads_search_retry(ADS_STRUCT *ads, void **res,
+ const char *expr,
+@@ -115,4 +129,19 @@ ADS_STATUS ads_search_retry_dn(ADS_STRUC
+ return ads_do_search_retry(ads, dn, LDAP_SCOPE_BASE,
+ "(objectclass=*)", attrs, res);
+ }
++
++ADS_STATUS ads_search_retry_extended_dn(ADS_STRUCT *ads, void **res,
++ const char *dn,
++ const char **attrs,
++ enum ads_extended_dn_flags flags)
++{
++ ads_control args;
++
++ args.control = ADS_EXTENDED_DN_OID;
++ args.val = flags;
++ args.critical = True;
++
++ return ads_do_search_retry_args(ads, dn, LDAP_SCOPE_BASE,
++ "(objectclass=*)", attrs, &args, res);
++}
+ #endif
+Index: source/libads/ldap.c
+===================================================================
+--- source/libads/ldap.c.orig
++++ source/libads/ldap.c
+@@ -435,21 +435,25 @@ static char **ads_pull_strvals(TALLOC_CT
+ * @param cookie The paged results cookie to be returned on subsequent calls
+ * @return status of search
+ **/
+-ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
+- int scope, const char *expr,
+- const char **attrs, void **res,
+- int *count, void **cookie)
++ADS_STATUS ads_do_paged_search_args(ADS_STRUCT *ads, const char *bind_path,
++ int scope, const char *expr,
++ const char **attrs, void *args, void **res,
++ int *count, void **cookie)
+ {
+ int rc, i, version;
+ char *utf8_expr, *utf8_path, **search_attrs;
+- LDAPControl PagedResults, NoReferrals, *controls[3], **rcontrols;
++ LDAPControl PagedResults, NoReferrals, ExtendedDn, *controls[4], **rcontrols;
+ BerElement *cookie_be = NULL;
+ struct berval *cookie_bv= NULL;
++ BerElement *extdn_be = NULL;
++ struct berval *extdn_bv= NULL;
++
+ TALLOC_CTX *ctx;
++ ads_control *external_control = (ads_control *) args;
+
+ *res = NULL;
+
+- if (!(ctx = talloc_init("ads_do_paged_search")))
++ if (!(ctx = talloc_init("ads_do_paged_search_args")))
+ return ADS_ERROR(LDAP_NO_MEMORY);
+
+ /* 0 means the conversion worked but the result was empty
+@@ -499,10 +503,47 @@ ADS_STATUS ads_do_paged_search(ADS_STRUC
+ NoReferrals.ldctl_value.bv_len = 0;
+ NoReferrals.ldctl_value.bv_val = CONST_DISCARD(char *, "");
+
++ if (external_control && strequal(external_control->control, ADS_EXTENDED_DN_OID)) {
++
++ ExtendedDn.ldctl_oid = CONST_DISCARD(char *, external_control->control);
++ ExtendedDn.ldctl_iscritical = (char) external_control->critical;
++
++ /* win2k does not accept a ldctl_value beeing passed in */
++
++ if (external_control->val != 0) {
++
++ if ((extdn_be = ber_alloc_t(LBER_USE_DER)) == NULL ) {
++ rc = LDAP_NO_MEMORY;
++ goto done;
++ }
++
++ if ((ber_printf(extdn_be, "{i}", (ber_int_t) external_control->val)) == -1) {
++ rc = LDAP_NO_MEMORY;
++ goto done;
++ }
++ if ((ber_flatten(extdn_be, &extdn_bv)) == -1) {
++ rc = LDAP_NO_MEMORY;
++ goto done;
++ }
++
++ ExtendedDn.ldctl_value.bv_len = extdn_bv->bv_len;
++ ExtendedDn.ldctl_value.bv_val = extdn_bv->bv_val;
++
++ } else {
++ ExtendedDn.ldctl_value.bv_len = 0;
++ ExtendedDn.ldctl_value.bv_val = CONST_DISCARD(char *, "");
++ }
+
+- controls[0] = &NoReferrals;
+- controls[1] = &PagedResults;
+- controls[2] = NULL;
++ controls[0] = &NoReferrals;
++ controls[1] = &PagedResults;
++ controls[2] = &ExtendedDn;
++ controls[3] = NULL;
++
++ } else {
++ controls[0] = &NoReferrals;
++ controls[1] = &PagedResults;
++ controls[2] = NULL;
++ }
+
+ /* we need to disable referrals as the openldap libs don't
+ handle them and paged results at the same time. Using them
+@@ -523,7 +564,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUC
+ ber_bvfree(cookie_bv);
+
+ if (rc) {
+- DEBUG(3,("ads_do_paged_search: ldap_search_with_timeout(%s) -> %s\n", expr,
++ DEBUG(3,("ads_do_paged_search_args: ldap_search_with_timeout(%s) -> %s\n", expr,
+ ldap_err2string(rc)));
+ goto done;
+ }
+@@ -555,12 +596,29 @@ ADS_STATUS ads_do_paged_search(ADS_STRUC
+
+ done:
+ talloc_destroy(ctx);
++
++ if (extdn_be) {
++ ber_free(extdn_be, 1);
++ }
++
++ if (extdn_bv) {
++ ber_bvfree(extdn_bv);
++ }
++
+ /* if/when we decide to utf8-encode attrs, take out this next line */
+ str_list_free(&search_attrs);
+
+ return ADS_ERROR(rc);
+ }
+
++ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
++ int scope, const char *expr,
++ const char **attrs, void **res,
++ int *count, void **cookie)
++{
++ return ads_do_paged_search_args(ads, bind_path, scope, expr, attrs, NULL, res, count, cookie);
++}
++
+
+ /**
+ * Get all results for a search. This uses ads_do_paged_search() to return
+@@ -573,16 +631,16 @@ done:
+ * @param res ** which will contain results - free res* with ads_msgfree()
+ * @return status of search
+ **/
+-ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path,
+- int scope, const char *expr,
+- const char **attrs, void **res)
++ADS_STATUS ads_do_search_all_args(ADS_STRUCT *ads, const char *bind_path,
++ int scope, const char *expr,
++ const char **attrs, void *args, void **res)
+ {
+ void *cookie = NULL;
+ int count = 0;
+ ADS_STATUS status;
+
+ *res = NULL;
+- status = ads_do_paged_search(ads, bind_path, scope, expr, attrs, res,
++ status = ads_do_paged_search_args(ads, bind_path, scope, expr, attrs, args, res,
+ &count, &cookie);
+
+ if (!ADS_ERR_OK(status))
+@@ -594,8 +652,8 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT
+ ADS_STATUS status2;
+ LDAPMessage *msg, *next;
+
+- status2 = ads_do_paged_search(ads, bind_path, scope, expr,
+- attrs, &res2, &count, &cookie);
++ status2 = ads_do_paged_search_args(ads, bind_path, scope, expr,
++ attrs, args, &res2, &count, &cookie);
+
+ if (!ADS_ERR_OK(status2)) break;
+
+@@ -616,6 +674,13 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT
+ return status;
+ }
+
++ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path,
++ int scope, const char *expr,
++ const char **attrs, void **res)
++{
++ return ads_do_search_all_args(ads, bind_path, scope, expr, attrs, NULL, res);
++}
++
+ /**
+ * Run a function on all results for a search. Uses ads_do_paged_search() and
+ * runs the function as each page is returned, using ads_process_results()
+@@ -2701,4 +2766,127 @@ ADS_STATUS ads_workgroup_name(ADS_STRUCT
+ return ADS_SUCCESS;
+ }
+
++/**
++ * pull a DOM_SID from an extended dn string
++ * @param mem_ctx TALLOC_CTX
++ * @param flags string type of extended_dn
++ * @param sid pointer to a DOM_SID
++ * @return boolean inidicating success
++ **/
++BOOL ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
++ const char *dn,
++ enum ads_extended_dn_flags flags,
++ DOM_SID *sid)
++{
++ char *p, *q;
++
++ if (!dn) {
++ return False;
++ }
++
++ /*
++ * ADS_EXTENDED_DN_HEX_STRING:
++ * <GUID=238e1963cb390f4bb032ba0105525a29>;<SID=010500000000000515000000bb68c8fd6b61b427572eb04556040000>;CN=gd,OU=berlin,OU=suse,DC=ber,DC=suse,DC=de
++ *
++ * ADS_EXTENDED_DN_STRING (only with w2k3):
++ <GUID=63198e23-39cb-4b0f-b032-ba0105525a29>;<SID=S-1-5-21-4257769659-666132843-1169174103-1110>;CN=gd,OU=berlin,OU=suse,DC=ber,DC=suse,DC=de
++ */
++
++ p = strchr(dn, ';');
++ if (!p) {
++ return False;
++ }
++
++ if (strncmp(p, ";<SID=", strlen(";<SID=")) != 0) {
++ return False;
++ }
++
++ p += strlen(";<SID=");
++
++ q = strchr(p, '>');
++ if (!q) {
++ return False;
++ }
++
++ *q = '\0';
++
++ DEBUG(100,("ads_get_sid_from_extended_dn: sid string is %s\n", p));
++
++ switch (flags) {
++
++ case ADS_EXTENDED_DN_STRING:
++ if (!string_to_sid(sid, p)) {
++ return False;
++ }
++ break;
++ case ADS_EXTENDED_DN_HEX_STRING: {
++ pstring buf;
++ size_t buf_len;
++
++ buf_len = strhex_to_str(buf, strlen(p), p);
++ if (buf_len == 0) {
++ return False;
++ }
++
++ if (!sid_parse(buf, buf_len, sid)) {
++ DEBUG(10,("failed to parse sid\n"));
++ return False;
++ }
++ break;
++ }
++ default:
++ DEBUG(10,("unknown extended dn format\n"));
++ return False;
++ }
++
++ return True;
++}
++
++/**
++ * pull an array of DOM_SIDs from a ADS result
++ * @param ads connection to ads server
++ * @param mem_ctx TALLOC_CTX for allocating sid array
++ * @param msg Results of search
++ * @param field Attribute to retrieve
++ * @param flags string type of extended_dn
++ * @param sids pointer to sid array to allocate
++ * @return the count of SIDs pulled
++ **/
++int ads_pull_sids_from_extendeddn(ADS_STRUCT *ads,
++ TALLOC_CTX *mem_ctx,
++ void *msg,
++ const char *field,
++ enum ads_extended_dn_flags flags,
++ DOM_SID **sids)
++{
++ int i;
++ size_t dn_count;
++ char **dn_strings;
++
++ if ((dn_strings = ads_pull_strings(ads, mem_ctx, msg, field,
++ &dn_count)) == NULL) {
++ return 0;
++ }
++
++ (*sids) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, dn_count + 1);
++ if (!(*sids)) {
++ TALLOC_FREE(dn_strings);
++ return 0;
++ }
++
++ for (i=0; i<dn_count; i++) {
++
++ if (!ads_get_sid_from_extended_dn(mem_ctx, dn_strings[i],
++ flags, &(*sids)[i])) {
++ TALLOC_FREE(*sids);
++ TALLOC_FREE(dn_strings);
++ return 0;
++ }
++ }
++
++ TALLOC_FREE(dn_strings);
++
++ return dn_count;
++}
++
+ #endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/samba.org/15822 new/patches/samba.org/15822
--- old/patches/samba.org/15822 1970-01-01 01:00:00.000000000 +0100
+++ new/patches/samba.org/15822 2006-05-22 22:44:16.000000000 +0200
@@ -0,0 +1,19 @@
+------------------------------------------------------------------------
+r15822 | lmuelle | 2006-05-22 22:35:55 +0200 (Mo, 22 Mai 2006) | 2 lines
+
+Add suggestion made by Ralf Haferkamp.
+
+------------------------------------------------------------------------
+Index: source/libads/ldap.c
+===================================================================
+--- source/libads/ldap.c (Revision 15821)
++++ source/libads/ldap.c (Revision 15822)
+@@ -531,7 +531,7 @@
+
+ } else {
+ ExtendedDn.ldctl_value.bv_len = 0;
+- ExtendedDn.ldctl_value.bv_val = CONST_DISCARD(char *, "");
++ ExtendedDn.ldctl_value.bv_val = NULL;
+ }
+
+ controls[0] = &NoReferrals;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/series new/patches/series
--- old/patches/series 2006-05-19 21:06:17.000000000 +0200
+++ new/patches/series 2006-05-22 22:44:59.000000000 +0200
@@ -39,9 +39,13 @@
samba.org/15136 -p0
samba.org/15194 -p0
samba.org/15293 -p0
+samba.org/15306 -p0
samba.org/15438 -p0
samba.org/15460 -p0
+samba.org/15492 -p0
samba.org/15542 -p0
+samba.org/15698 -p0
+samba.org/15822 -p0
# SuSE specific changes
# disabled -> WIP lmuelle
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/suse/samba3-pam_winbind.diff new/patches/suse/samba3-pam_winbind.diff
--- old/patches/suse/samba3-pam_winbind.diff 2006-05-16 16:53:35.000000000 +0200
+++ new/patches/suse/samba3-pam_winbind.diff 2006-05-22 17:55:27.000000000 +0200
@@ -123,14 +123,13 @@
#define ADS_SERVER_SORT_OID "1.2.840.113556.1.4.473"
#define ADS_PERMIT_MODIFY_OID "1.2.840.113556.1.4.1413"
+#define ADS_ASQ_OID "1.2.840.113556.1.4.1504"
+ #define ADS_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
/* ldap attribute oids (Services for Unix) */
- #define ADS_ATTR_SFU_UIDNUMBER_OID "1.2.840.113556.1.6.18.1.310"
-@@ -264,3 +266,19 @@ typedef void **ADS_MODLIST;
-
+@@ -266,6 +268,22 @@ typedef void **ADS_MODLIST;
#define WELL_KNOWN_GUID_COMPUTERS "AA312825768811D1ADED00C04FD8D5CD"
#define WELL_KNOWN_GUID_USERS "A9D1CA15768811D1ADED00C04FD8D5CD"
-+
+
+#ifndef KRB5_ADDR_NETBIOS
+#define KRB5_ADDR_NETBIOS 0x14
+#endif
@@ -146,6 +145,10 @@
+#endif
+} smb_krb5_addresses;
+#endif
++
+ enum ads_extended_dn_flags {
+ ADS_EXTENDED_DN_HEX_STRING = 0,
+ ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */
Index: source/include/doserr.h
===================================================================
--- source/include/doserr.h.orig
@@ -2840,7 +2843,7 @@
status = ads_connect(ads);
if (!ADS_ERR_OK(status) || !ads->config.realm) {
extern struct winbindd_methods msrpc_methods, cache_methods;
-@@ -889,8 +891,7 @@ static NTSTATUS trusted_domains(struct w
+@@ -993,8 +995,7 @@ static NTSTATUS trusted_domains(struct w
struct ds_domain_trust *domains = NULL;
int count = 0;
int i;
@@ -2850,7 +2853,7 @@
struct rpc_pipe_client *cli;
DEBUG(3,("ads: trusted_domains\n"));
-@@ -963,6 +964,8 @@ struct winbindd_methods ads_methods = {
+@@ -1067,6 +1068,8 @@ struct winbindd_methods ads_methods = {
msrpc_lookup_useraliases,
lookup_groupmem,
sequence_number,
@@ -5639,7 +5642,7 @@
===================================================================
--- source/nsswitch/winbindd_rpc.c.orig
+++ source/nsswitch/winbindd_rpc.c
-@@ -883,6 +883,71 @@ static NTSTATUS trusted_domains(struct w
+@@ -869,6 +869,71 @@ static NTSTATUS trusted_domains(struct w
return result;
}
@@ -5711,7 +5714,7 @@
/* the rpc backend methods are exposed via this structure */
struct winbindd_methods msrpc_methods = {
False,
-@@ -896,5 +961,7 @@ struct winbindd_methods msrpc_methods =
+@@ -882,5 +947,7 @@ struct winbindd_methods msrpc_methods =
msrpc_lookup_useraliases,
lookup_groupmem,
sequence_number,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches/suse/winbind-offline.diff new/patches/suse/winbind-offline.diff
--- old/patches/suse/winbind-offline.diff 2006-05-02 15:05:39.000000000 +0200
+++ new/patches/suse/winbind-offline.diff 2006-05-22 17:56:01.000000000 +0200
@@ -293,7 +293,7 @@
if ( !domain->online &&
( !NT_STATUS_IS_OK(check_negative_conn_cache(domain->name, domain->dcname))) ) {
DEBUG(10,("centry_expired: Key %s for domain %s valid as domain is offline.\n",
-@@ -1830,8 +1845,9 @@ static BOOL init_wcache(void)
+@@ -1870,8 +1885,9 @@ static BOOL init_wcache(void)
return True;
/* when working offline we must not clear the cache on restart */
@@ -305,7 +305,7 @@
if (wcache->tdb == NULL) {
DEBUG(0,("Failed to open winbindd_cache.tdb!\n"));
-@@ -2078,8 +2094,9 @@ void wcache_flush_cache(void)
+@@ -2113,8 +2129,9 @@ void wcache_flush_cache(void)
return;
/* when working offline we must not clear the cache on restart */
@@ -317,7 +317,7 @@
if (!wcache->tdb) {
DEBUG(0,("Failed to open winbindd_cache.tdb!\n"));
-@@ -2230,6 +2247,74 @@ done:
+@@ -2265,6 +2282,74 @@ done:
return status;
}
@@ -690,7 +690,7 @@
INSTALLCMD=@INSTALL@
INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
-@@ -1202,7 +1203,7 @@ bin/librpc_echo.@SHLIBEXT@: $(RPC_ECHO_O
+@@ -1204,7 +1205,7 @@ bin/librpc_echo.@SHLIBEXT@: $(RPC_ECHO_O
bin/winbindd@EXEEXT@: $(WINBINDD_OBJ) @BUILD_POPT@ bin/.dummy
@echo "Linking $@"
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
@@ -711,7 +711,7 @@
# Set defaults
PIE_CFLAGS=""
-@@ -3529,6 +3530,8 @@ AC_ARG_WITH(automount,
+@@ -3533,6 +3534,8 @@ AC_ARG_WITH(automount,
AC_MSG_RESULT(no)
)
@@ -724,9 +724,9 @@
===================================================================
--- source/nsswitch/winbindd.h.orig
+++ source/nsswitch/winbindd.h
-@@ -29,6 +29,10 @@
-
- #include "winbindd_nss.h"
+@@ -33,6 +33,10 @@
+ #include <sys/mman.h>
+ #endif
+#ifdef HAVE_LIBNSCD
+#include "libnscd.h"
@@ -739,9 +739,9 @@
===================================================================
--- source/nsswitch/winbindd_util.c.orig
+++ source/nsswitch/winbindd_util.c
-@@ -1217,3 +1217,25 @@ BOOL winbindd_upgrade_idmap(void)
+@@ -1266,3 +1266,25 @@ NTSTATUS lookup_usergroups_cached(struct
- return idmap_convert(idmap_name);
+ return status;
}
+
+void winbindd_flush_nscd_cache(void)
++++++ vendor-files.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/vendor-files/tools/get_printing_ticket.c new/vendor-files/tools/get_printing_ticket.c
--- old/vendor-files/tools/get_printing_ticket.c 2006-05-21 14:11:50.000000000 +0200
+++ new/vendor-files/tools/get_printing_ticket.c 2006-05-22 22:31:02.000000000 +0200
@@ -56,12 +56,14 @@
}
#endif
+char *null_envp[] = { NULL };
+
int main (int argc, char **argv)
{
uid_t uid, LP_UID;
gid_t gid, LP_GID;
struct passwd *pw;
-
+
/* Get uid and gid of user lp */
pw = getpwnam( "lp");
if (!pw) {
@@ -136,10 +138,15 @@
return 1;
}
+ /* Clear the environment to ensure nothing can
+ be loaded via LD_PRELOAD. Thanks to Sebastian Krahmer
+ from the SuSE security Team for reviewing this. */
+ clearenv();
+
/*
* We are now the requested user.
* From cups arg[0] is the smb:// uri and smbspool expects this
*/
- return execv ("/usr/bin/smbspool", argv);
+ return execve ("/usr/bin/smbspool", argv, null_envp);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/vendor-files/tools/samba-winbindd new/vendor-files/tools/samba-winbindd
--- old/vendor-files/tools/samba-winbindd 2006-04-23 13:39:15.000000000 +0200
+++ new/vendor-files/tools/samba-winbindd 2006-05-22 20:26:00.000000000 +0200
@@ -14,7 +14,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Author: Lars Mueller <lmuelle at samba dot org>
+# Author: Lars Mueller <lars at samba dot org>
# samba-winbindd
#
@@ -59,6 +59,15 @@
log_msg=$( rcnmb start 2>&1)
log_dbg "${log_msg}"
fi
+ for configfile in dhcp "ifcfg-${configname}"; do
+ test -f "/etc/sysconfig/network/${configfile}" && \
+ . "/etc/sysconfig/network/${configfile}"
+ done
+ DHCLIENT_SET_HOSTNAME=$( echo "${DHCLIENT_SET_HOSTNAME}" | tr '[:upper:]' '[:lower:]')
+ if test "${DHCLIENT_SET_HOSTNAME}" != "no" && chkconfig -c winbind; then
+ log_msg=$( rcwinbind restart 2>&1)
+ log_dbg "${log_msg}"
+ fi
log_msg=$( smbcontrol winbindd online 2>&1)
log_dbg "${log_msg}"
;;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package sax2
checked in at Tue May 23 01:32:52 CEST 2006.
--------
--- sax2/sax2.changes 2006-05-19 08:45:33.000000000 +0200
+++ sax2/sax2.changes 2006-05-22 18:43:54.000000000 +0200
@@ -1,0 +2,6 @@
+Mon May 22 14:01:13 CEST 2006 - ms(a)suse.de
+
+- fixed Identity entries for DELL ATI devices (#177561)
+- fixed perl syntax using defined (#177476)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sax2.spec ++++++
--- /var/tmp/diff_new_pack.LoEoZK/_old 2006-05-23 01:23:54.000000000 +0200
+++ /var/tmp/diff_new_pack.LoEoZK/_new 2006-05-23 01:23:54.000000000 +0200
@@ -10,6 +10,7 @@
Name: sax2
+URL: http://sax.berlios.de
%if %{?suse_version:1}0
# SuSE Build Requires...
BuildRequires: doxygen ghostscript-fonts-std graphviz hal-devel java2-devel-packages python-devel qt3-devel readline-devel swig sysfsutils update-desktop-files
@@ -39,7 +40,7 @@
%endif
Summary: SuSE advanced X Window System-configuration
Version: 8.1
-Release: 2
+Release: 3
Group: System/X11/Utilities
License: Other License(s), see package, GPL
Source: sax2.tar.bz2
@@ -61,7 +62,7 @@
%package -n sax2-tools
Version: 8.1
-Release: 2
+Release: 3
Summary: X Window System tools for SaX2
Group: System/X11/Utilities
Requires: coreutils
@@ -90,7 +91,7 @@
%package -n sax2-ident
Version: 8.1
-Release: 2
+Release: 3
Summary: SaX2 identity and profile information
Group: System/X11/Utilities
Requires: sax2-libsax-perl
@@ -109,7 +110,7 @@
%package -n sax2-gui
Version: 8.1
-Release: 2
+Release: 3
%if %{?suse_version:1}0
# SuSE Requires...
Requires: netpbm sax2-tools qt3 fvwm2 sax2
@@ -131,7 +132,7 @@
%package -n sax2-libsax
Version: 8.1
-Release: 2
+Release: 3
%if %{?suse_version:1}0
# SuSE Requires...
Requires: sax2-tools qt3 fvwm2 sax2
@@ -157,7 +158,7 @@
%package -n sax2-libsax-devel
Version: 8.1
-Release: 2
+Release: 3
Requires: sax2-libsax
Summary: SaX management library header files for X Window System-configuration development
Group: Development/Libraries/X11
@@ -174,7 +175,7 @@
%package -n sax2-libsax-perl
Version: 8.1
-Release: 2
+Release: 3
Requires: sax2-libsax
Summary: Language binding to use libsax with perl
Group: Development/Libraries/X11
@@ -191,7 +192,7 @@
%package -n sax2-libsax-python
Version: 8.1
-Release: 2
+Release: 3
Requires: sax2-libsax
%if %{?suse_version:1}0
# SuSE Requires...
@@ -214,7 +215,7 @@
%ifnarch ppc64 s390x
%package -n sax2-libsax-java
Version: 8.1
-Release: 2
+Release: 3
Requires: sax2-libsax jre1.2.x
Summary: Language binding to use libsax with java
Group: Development/Libraries/X11
@@ -501,6 +502,9 @@
%endif
%changelog -n sax2
+* Mon May 22 2006 - ms(a)suse.de
+- fixed Identity entries for DELL ATI devices (#177561)
+- fixed perl syntax using defined (#177476)
* Wed May 17 2006 - ms(a)suse.de
- fixed handling of "KernelModuleParm" option (#170698)
* Wed May 17 2006 - ms(a)suse.de
++++++ sax2.tar.bz2 ++++++
sax2/sax2.tar.bz2 sax2/sax2.tar.bz2 differ: char 11, line 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package rug
checked in at Tue May 23 01:23:34 CEST 2006.
--------
--- rug/rug.changes 2006-05-16 23:23:11.000000000 +0200
+++ rug/rug.changes 2006-05-22 23:22:01.000000000 +0200
@@ -1,0 +2,8 @@
+Mon May 22 23:21:21 CEST 2006 - maw(a)suse.de
+
+- New source drop (r28766) which:
+- Eats "permission denied" exception if the argument isn't a
+ local file.
+- Hames rug bl -i show the bundle's lock status.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rug.spec ++++++
--- /var/tmp/diff_new_pack.GStnSQ/_old 2006-05-23 01:23:24.000000000 +0200
+++ /var/tmp/diff_new_pack.GStnSQ/_new 2006-05-23 01:23:24.000000000 +0200
@@ -14,7 +14,7 @@
BuildRequires: gtkdoc mono-basic mono-data-sqlite mono-devel zmd-devel
URL: http://www.novell.com
Version: 7.1.1.0
-Release: 18
+Release: 19
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Command Line Client for zmd
@@ -78,6 +78,11 @@
%_mandir/*/*/*.gz
%changelog -n rug
+* Mon May 22 2006 - maw(a)suse.de
+- New source drop (r28766) which:
+- Eats "permission denied" exception if the argument isn't a
+ local file.
+- Hames rug bl -i show the bundle's lock status.
* Tue May 16 2006 - maw(a)suse.de
- New source drop (r28427) which:
- Handles zypp atoms correctly
++++++ rug-7.1.1.0.tar.bz2 ++++++
++++ 7859 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package rekall
checked in at Tue May 23 01:23:28 CEST 2006.
--------
--- KDE/rekall/rekall.changes 2006-02-15 11:23:45.000000000 +0100
+++ rekall/rekall.changes 2006-05-22 16:30:04.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 22 16:29:49 CEST 2006 - dmueller(a)suse.de
+
+- avoid crashes due to strict aliasing errors (#175613)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rekall.spec ++++++
--- /var/tmp/diff_new_pack.AbBnr6/_old 2006-05-23 01:23:19.000000000 +0200
+++ /var/tmp/diff_new_pack.AbBnr6/_new 2006-05-23 01:23:19.000000000 +0200
@@ -17,7 +17,7 @@
Group: Productivity/Databases/Clients
Summary: Universal Database Application
Version: 2.2.6
-Release: 6
+Release: 17
%define rversion %version
Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`)
Requires: %name-database-backend = %version
@@ -133,6 +133,7 @@
%build
. /etc/opt/kde3/common_options
+export CPPFLAGS="$CPPFLAGS -fno-strict-aliasing"
./configure $configkde \
--disable-final \
--with-mysql-libraries=%_libdir/mysql \
@@ -270,6 +271,8 @@
/opt/kde3/share/apps/rekall/examples
%changelog -n rekall
+* Mon May 22 2006 - dmueller(a)suse.de
+- avoid crashes due to strict aliasing errors (#175613)
* Wed Feb 15 2006 - stbinner(a)suse.de
- add GenericName to .desktop file
* Wed Jan 25 2006 - mls(a)suse.de
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0
Hello community,
here is the log from the commit of package pwdutils
checked in at Tue May 23 01:23:17 CEST 2006.
--------
--- pwdutils/pwdutils.changes 2006-05-19 15:46:25.000000000 +0200
+++ pwdutils/pwdutils.changes 2006-05-22 09:47:40.000000000 +0200
@@ -1,0 +2,5 @@
+Mon May 22 09:47:22 CEST 2006 - kukuk(a)suse.de
+
+- Fix usermod -L/-U [#177144]
+
+-------------------------------------------------------------------
New:
----
pwdutils-usermod-bnc177144.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pwdutils.spec ++++++
--- /var/tmp/diff_new_pack.MCsazG/_old 2006-05-23 01:22:41.000000000 +0200
+++ /var/tmp/diff_new_pack.MCsazG/_new 2006-05-23 01:22:41.000000000 +0200
@@ -17,7 +17,7 @@
Group: System/Base
Autoreqprov: on
Version: 3.0.7.1
-Release: 18
+Release: 19
Summary: Utilities to Manage User and Group Accounts
PreReq: grep /bin/cp /bin/mv
Requires: pam-modules
@@ -42,6 +42,7 @@
Patch3: pwdutils-ldap-rfc2307bis.diff
Patch4: pam_login-3.31.diff
Patch5: pam_login-3.31-suppress_hostname.patch
+Patch6: pwdutils-usermod-bnc177144.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -76,6 +77,8 @@
%patch5 -p1
popd
%patch3
+%patch6
+chmod 755 src/tst-usermod
%build
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
@@ -211,6 +214,8 @@
%{_libdir}/pwdutils/liblog_audit.so.1*
%changelog -n pwdutils
+* Mon May 22 2006 - kukuk(a)suse.de
+- Fix usermod -L/-U [#177144]
* Fri May 19 2006 - kssingvo(a)suse.de
- added option -H to suppress hostname (bugzilla#175376)
* Thu May 18 2006 - schwab(a)suse.de
++++++ pwdutils-usermod-bnc177144.diff ++++++
2006-05-21 Thorsten Kukuk <kukuk(a)thkukuk.de>
* src/usermod.8: Document -L and -U option.
* src/usermod.c (main): Implement lock/unlock of password.
* src/tst-chage: Adjust for latest chage fixes.
* src/tst-usermod: New test.
* src/Makefile.am: Add tst-usermod.
--- src/Makefile.am 27 Dec 2005 21:09:10 -0000 1.83
+++ src/Makefile.am 21 May 2006 20:04:56 -0000
@@ -21,7 +21,7 @@
CLEANFILES = *~ tst-chage.* tst-passwd.* tst-group.* tst-groupadd.* \
tst-long-group-entry.* tst-32bit-uid-gid.* tst-userdel.* \
tst-groupmod.* tst-pwconv.* tst-pwunconv.* tst-pwck.* \
- tst-grpck.* ${EXTRA_PRGRAMS}
+ tst-grpck.* tst-usermod.* ${EXTRA_PRGRAMS}
bin_PROGRAMS = chage chfn chsh expiry gpasswd newgrp passwd rpasswd
@@ -36,7 +36,7 @@
TESTS = tst-useradd tst-chage tst-passwd tst-groupadd tst-long-group-entry \
tst-32bit-uid-gid tst-userdel tst-groupmod tst-pwconv tst-pwunconv \
- tst-pwck tst-grpck
+ tst-pwck tst-grpck tst-usermod
EXTRA_DIST = ${MANS} ${EXTRA_MANS} ${TESTS} rpasswd-client.c
--- src/Makefile.in 27 Dec 2005 21:09:10 -0000 1.132
+++ src/Makefile.in 21 May 2006 20:04:56 -0000
@@ -329,12 +329,12 @@
CLEANFILES = *~ tst-chage.* tst-passwd.* tst-group.* tst-groupadd.* \
tst-long-group-entry.* tst-32bit-uid-gid.* tst-userdel.* \
tst-groupmod.* tst-pwconv.* tst-pwunconv.* tst-pwck.* \
- tst-grpck.* ${EXTRA_PRGRAMS}
+ tst-grpck.* tst-usermod.* ${EXTRA_PRGRAMS}
EXTRA_MANS = pam_rpasswd.8
TESTS = tst-useradd tst-chage tst-passwd tst-groupadd tst-long-group-entry \
tst-32bit-uid-gid tst-userdel tst-groupmod tst-pwconv tst-pwunconv \
- tst-pwck tst-grpck
+ tst-pwck tst-grpck tst-usermod
EXTRA_DIST = ${MANS} ${EXTRA_MANS} ${TESTS} rpasswd-client.c
man_MANS = chfn.1 chsh.1 expiry.1 passwd.1 rpasswd.conf.5 rpasswd.1 sg.1 \
--- src/tst-chage 12 Jul 2005 21:17:15 -0000 1.7
+++ src/tst-chage 21 May 2006 20:04:56 -0000
@@ -7,8 +7,11 @@
touch $TEMPDIR/passwd
touch $TEMPDIR/shadow
./useradd -G "" -P $TEMPDIR chagetest1 -c "Test account"
-./chage -P $TEMPDIR -m 7 -M 92 -d 2000-02-29 -E 2004-02-29 -I 7 -W 14 --service files chagetest1 > tst-chage.run 2>&1
+RET1=$?
+./chage -P $TEMPDIR -m 7 -M 92 -d 2000-02-29 -E 2004-02-29 -I 7 -W 14 --service files chagetest1 > tst-chage.out 2>&1
+RET2=$?
./chage -P $TEMPDIR -l chagetest1 > tst-chage.out1
+RET3=$?
cat << EOT > tst-chage.expect1
Minimum: 7
Maximum: 92
@@ -20,9 +23,12 @@
Account Expires: Feb 29, 2004
EOT
diff -q -u tst-chage.expect1 tst-chage.out1
+RET4=$?
+
./chage -P $TEMPDIR -m 7 -M 92 -d 2000-02-29 -E 2004-02-29 -I 0 -W 14 --service files chagetest1 > tst-chage.out 2>&1
+RET5=$?
./chage -P $TEMPDIR -l chagetest1 > tst-chage.out2
-RET1=$?
+RET6=$?
cat << EOT > tst-chage.expect2
Minimum: 7
Maximum: 92
@@ -30,13 +36,31 @@
Inactive: 0
Last Change: Feb 29, 2000
Password Expires: May 31, 2000
-Password Inactive: Never
+Password Inactive: May 31, 2000
Account Expires: Feb 29, 2004
EOT
diff -q -u tst-chage.expect2 tst-chage.out2
-RET2=$?
+RET7=$?
+
+./chage -P $TEMPDIR -m 7 -M 92 -d 2000-02-29 -E 2004-02-29 -I -1 -W 14 --service files chagetest1 > tst-chage.out 2>&1
+RET8=$?
+./chage -P $TEMPDIR -l chagetest1 > tst-chage.out3
+RET9=$?
+cat << EOT > tst-chage.expect3
+Minimum: 7
+Maximum: 92
+Warning: 14
+Inactive: -1
+Last Change: Feb 29, 2000
+Password Expires: May 31, 2000
+Password Inactive: Never
+Account Expires: Feb 29, 2004
+EOT
+diff -q -u tst-chage.expect3 tst-chage.out3
+RET10=$?
rm -rf $TEMPDIR
-if [ $RET1 != 0 -o $RET2 != 0 ] ; then
+if [ $RET1 != 0 -o $RET2 != 0 -o $RET3 != 0 -o $RET4 != 0 -o $RET5 != 0 -o $RET6 != 0 \
+ -o $RET7 != 0 -o $RET8 != 0 -o $RET9 != 0 -o $RET10 != 0 ] ; then
exit 1
else
exit 0
--- src/usermod.8 15 Aug 2005 11:13:30 -0000 1.2
+++ src/usermod.8 21 May 2006 20:04:56 -0000
@@ -1,5 +1,5 @@
.\" -*- nroff -*-
-.\" Copyright (C) 2003, 2005 Thorsten Kukuk
+.\" Copyright (C) 2003, 2005, 2006 Thorsten Kukuk
.\" Author: Thorsten Kukuk <kukuk(a)suse.de>
.\"
.\" This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software Foundation,
.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
.\"
-.TH usermod 8 "Nobember 2003" "pwdutils"
+.TH usermod 8 "May 2006" "pwdutils"
.SH NAME
usermod \- modify a user account
.SH SYNOPSIS
@@ -99,6 +99,14 @@
Use the Distinguished Name binddn to bind to the LDAP directory.
The user will be prompted for a password for simple authentication.
.TP
+.BI "\-L, \-\-lock"
+A system administrator can lock the account of the specified user.
+.TP
+.B "\-U, \-\-unlock"
+A system administrator can unlock the specified account, if the
+account is not passwordless afterwards (it will not unlock an
+account that has only "!" as a password).
+.TP
.BI "\-P, \-\-path" " path"
The \fIpasswd\fR and \fIshadow\fR files are located below the
specified directory path.
--- src/usermod.c 15 Aug 2005 11:13:30 -0000 1.33
+++ src/usermod.c 21 May 2006 20:04:56 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
+/* Copyright (C) 2003, 2004, 2005, 2006 Thorsten Kukuk
Author: Thorsten Kukuk <kukuk(a)suse.de>
This program is free software; you can redistribute it and/or modify
@@ -983,7 +983,7 @@
print_help (program);
return 0;
case 'v':
- print_version (program, "2005");
+ print_version (program, "2006");
return 0;
case '\254':
print_usage (stdout, program);
@@ -1070,6 +1070,64 @@
old_home = strdupa (pw_data->pw.pw_dir);
+ /* -L, -U and -p are exclusive. */
+ if ((lock_password + unlock_password > 1) ||
+ ((lock_password + unlock_password) && new_password))
+ {
+ print_error (program);
+ return E_USAGE;
+ }
+
+
+ if (lock_password)
+ {
+ const char *pwdp;
+
+ if (pw_data->use_shadow)
+ pwdp = pw_data->sp.sp_pwdp;
+ else
+ pwdp = pw_data->pw.pw_passwd;
+
+ if (pwdp == NULL)
+ pw_data->newpassword = strdup ("!");
+ else if (pwdp[0] != '!')
+ {
+ pw_data->newpassword = malloc (strlen (pwdp) + 2);
+ if (pw_data->newpassword == NULL)
+ return E_FAILURE;
+ strcpy (&pw_data->newpassword[1], pwdp);
+ pw_data->newpassword[0] = '!';
+ }
+ else
+ {
+ fprintf (stderr, _("Password for `%s' is already locked!\n"),
+ pw_data->pw.pw_name);
+ free_user_t (pw_data);
+ return E_FAILURE;
+ }
+ }
+
+ if (unlock_password)
+ {
+ const char *pwdp;
+
+ if (pw_data->use_shadow)
+ pwdp = pw_data->sp.sp_pwdp;
+ else
+ pwdp = pw_data->pw.pw_passwd;
+
+ /* If the password is only "!", don't unlock it. */
+ if (pwdp && pwdp[0] == '!' && strlen (pwdp) > 1)
+ pw_data->newpassword = strdup (&pwdp[1]);
+ else
+ {
+ fprintf (stderr, _("Cannot unlock the password for `%s'!\n"),
+ pw_data->pw.pw_name);
+ free_user_t (pw_data);
+ return E_FAILURE;
+ }
+ }
+
if (new_group)
{
if ((retval = convert_grpopt_to_name (new_group, NULL,
@@ -1316,7 +1374,7 @@
}
else if (new_login || new_password || know_uid || new_group ||
new_comment || new_home || new_shell || know_inactive ||
- know_expire)
+ know_expire || lock_password || unlock_password)
{
/* Only change passwd/shadow file if there are really changes. */
--- src/tst-usermod 1 Jan 1970 00:00:00 -0000
+++ src/tst-usermod 21 May 2006 20:16:50 -0000
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+export LANG=C
+
+TEMPDIR=`mktemp -d tests.XXXXXX`
+
+echo "root:x:0:0:root:/root:/bin/bash" > tst-usermod.passwd
+echo "root:valid:0:0:root:/root:/bin/bash" > tst-usermod.noshadow
+echo "root:!valid:0:0:root:/root:/bin/bash" > tst-usermod.noshadow.locked
+echo "root::0:0:root:/root:/bin/bash" > tst-usermod.noshadow.deleted
+echo "root:valid:12116:0:10000::::" > tst-usermod.shadow
+echo "root:!valid:12116:0:10000::::" > tst-usermod.locked
+echo "root::12116:0:10000::::" > tst-usermod.deleted
+
+cp -p tst-usermod.noshadow $TEMPDIR/passwd
+./usermod -P $TEMPDIR -L root > tst-usermod.run 2>&1
+diff -q -u tst-usermod.noshadow.locked $TEMPDIR/passwd
+RET1=$?
+./usermod -P $TEMPDIR -U root >> tst-usermod.run 2>&1
+diff -q -u tst-usermod.noshadow $TEMPDIR/passwd
+RET2=$?
+
+cp -p tst-usermod.passwd $TEMPDIR/passwd
+cp -p tst-usermod.shadow $TEMPDIR/shadow
+./usermod -P $TEMPDIR -L root >> tst-usermod.run 2>&1
+diff -q -u tst-usermod.locked $TEMPDIR/shadow
+RET3=$?
+./usermod -P $TEMPDIR -U root >> tst-usermod.run 2>&1
+diff -q -u tst-usermod.shadow $TEMPDIR/shadow
+RET4=$?
+
+
+rm -rf $TEMPDIR
+if [ $RET1 != 0 -o $RET2 != 0 -o $RET3 != 0 -o $RET4 != 0 ] ; then
+ exit 1
+else
+ exit 0
+fi
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
1
0