From 1e9cfc01ce3932eb6bfef98e9432a17d5ebe920d Mon Sep 17 00:00:00 2001 From: ikent Date: Feb 22 2007 12:47:42 +0000 Subject: - update to release tar. - fix return check for getpwuid_r and getgrgid_r. - patch to give up trying to update exports list while host is mounted. - fix to "@network" matching. - patch to check for fstab update and retry if not updated. --- diff --git a/autofs-5.0.1-check-mtab-updated.patch b/autofs-5.0.1-check-mtab-updated.patch index 5b0fcd6..47dec10 100644 --- a/autofs-5.0.1-check-mtab-updated.patch +++ b/autofs-5.0.1-check-mtab-updated.patch @@ -1,3 +1,15 @@ +diff --git a/CHANGELOG b/CHANGELOG +index 34fad3e..b379431 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -3,6 +3,7 @@ + - fix return check for getpwuid_r and getgrgid_r. + - give up trying to update exports list while host is mounted. + - fix to "@network" matching. ++- check for fstab update and retry if not updated. + + 20/2/2007 autofs-5.0.1 + ---------------------- diff --git a/daemon/spawn.c b/daemon/spawn.c index 7f0a6e0..271d37e 100644 --- a/daemon/spawn.c diff --git a/autofs-5.0.1-check-user-info-return.patch b/autofs-5.0.1-check-user-info-return.patch new file mode 100644 index 0000000..ac66abe --- /dev/null +++ b/autofs-5.0.1-check-user-info-return.patch @@ -0,0 +1,56 @@ +diff --git a/CHANGELOG b/CHANGELOG +index 3a7f47e..d416684 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,3 +1,7 @@ ++??/??/2007 autofs-5.0.2 ++----------------------- ++- fix return check for getpwuid_r and getgrgid_r. ++ + 20/2/2007 autofs-5.0.1 + ---------------------- + - fix typo in Fix typo in var when removing temp directory. +diff --git a/daemon/direct.c b/daemon/direct.c +index 0869858..2dc23db 100644 +--- a/daemon/direct.c ++++ b/daemon/direct.c +@@ -1335,7 +1335,7 @@ static void *do_mount_direct(void *arg) + } + + status = getpwuid_r(mt->uid, ppw, pw_tmp, tmplen, pppw); +- if (status) { ++ if (status || !ppw) { + error(ap->logopt, "failed to get passwd info from getpwuid_r"); + free(tsv); + free(pw_tmp); +@@ -1382,7 +1382,7 @@ static void *do_mount_direct(void *arg) + } + + status = getgrgid_r(mt->gid, pgr, gr_tmp, tmplen, ppgr); +- if (status) { ++ if (status || !pgr) { + error(ap->logopt, "failed to get group info from getgrgid_r"); + free(tsv->user); + free(tsv->home); +diff --git a/daemon/indirect.c b/daemon/indirect.c +index 46e3f99..2068c16 100644 +--- a/daemon/indirect.c ++++ b/daemon/indirect.c +@@ -807,7 +807,7 @@ static void *do_mount_indirect(void *arg) + } + + status = getpwuid_r(mt->uid, ppw, pw_tmp, tmplen, pppw); +- if (status) { ++ if (status || !ppw) { + error(ap->logopt, "failed to get passwd info from getpwuid_r"); + free(tsv); + free(pw_tmp); +@@ -854,7 +854,7 @@ static void *do_mount_indirect(void *arg) + } + + status = getgrgid_r(mt->gid, pgr, gr_tmp, tmplen, ppgr); +- if (status) { ++ if (status || !pgr) { + error(ap->logopt, "failed to get group info from getgrgid_r"); + free(tsv->user); + free(tsv->home); diff --git a/autofs-5.0.1-hosts-simple-fail.patch b/autofs-5.0.1-hosts-simple-fail.patch index 7cc8e8d..ea9d8ff 100644 --- a/autofs-5.0.1-hosts-simple-fail.patch +++ b/autofs-5.0.1-hosts-simple-fail.patch @@ -1,3 +1,15 @@ +diff --git a/CHANGELOG b/CHANGELOG +index d416684..0bb91e9 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,6 +1,7 @@ + ??/??/2007 autofs-5.0.2 + ----------------------- + - fix return check for getpwuid_r and getgrgid_r. ++- give up trying to update exports list while host is mounted. + + 20/2/2007 autofs-5.0.1 + ---------------------- diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c index 1a16b96..8855ed7 100644 --- a/modules/lookup_hosts.c diff --git a/autofs.spec b/autofs.spec index bc3af0b..e6ea4dd 100644 --- a/autofs.spec +++ b/autofs.spec @@ -10,9 +10,10 @@ License: GPL Group: System Environment/Daemons URL: http://wiki.autofs.net/ Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2 -Patch1: autofs-5.0.1-export-check-network-fix.patch +Patch1: autofs-5.0.1-check-user-info-return.patch Patch2: autofs-5.0.1-hosts-simple-fail.patch -Patch3: autofs-5.0.1-check-mtab-updated.patch +Patch3: autofs-5.0.1-export-check-network-fix.patch +Patch4: autofs-5.0.1-check-mtab-updated.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel Conflicts: kernel < 2.6.17 @@ -57,6 +58,7 @@ echo %{version}-%{release} > .version %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -111,8 +113,9 @@ fi %changelog * Thu Feb 22 2007 Ian Kent - 5.0.1-1 - update to release tar. -- fix to "@network" matching. +- fix return check for getpwuid_r and getgrgid_r. - patch to give up trying to update exports list while host is mounted. +- fix to "@network" matching. - patch to check for fstab update and retry if not updated. * Tue Feb 20 2007 Ian Kent - 5.0.1-0.rc3.24