- revert miscellaneous device node related patches.
- add missing check for zero length NIS key. - fix incorrect match of map type name when included in map name. - update rev 7 sasl callbacks patch.
This commit is contained in:
parent
beeac84550
commit
1d72a09cf5
@ -1,6 +1,6 @@
|
||||
diff -up autofs-5.0.2/include/lookup_ldap.h.init-cb-on-load autofs-5.0.2/include/lookup_ldap.h
|
||||
--- autofs-5.0.2/include/lookup_ldap.h.init-cb-on-load 2008-03-09 13:50:30.000000000 +0900
|
||||
+++ autofs-5.0.2/include/lookup_ldap.h 2008-03-09 13:52:52.000000000 +0900
|
||||
diff -up autofs-5.0.3/include/lookup_ldap.h.init-cb-on-load autofs-5.0.3/include/lookup_ldap.h
|
||||
--- autofs-5.0.3/include/lookup_ldap.h.init-cb-on-load 2008-01-14 13:39:16.000000000 +0900
|
||||
+++ autofs-5.0.3/include/lookup_ldap.h 2008-03-24 14:10:09.000000000 +0900
|
||||
@@ -99,10 +99,12 @@ int unbind_ldap_connection(unsigned logo
|
||||
int authtype_requires_creds(const char *authtype);
|
||||
|
||||
@ -15,9 +15,9 @@ diff -up autofs-5.0.2/include/lookup_ldap.h.init-cb-on-load autofs-5.0.2/include
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff -up autofs-5.0.2/modules/lookup_ldap.c.init-cb-on-load autofs-5.0.2/modules/lookup_ldap.c
|
||||
--- autofs-5.0.2/modules/lookup_ldap.c.init-cb-on-load 2008-03-09 13:50:30.000000000 +0900
|
||||
+++ autofs-5.0.2/modules/lookup_ldap.c 2008-03-09 13:58:47.000000000 +0900
|
||||
diff -up autofs-5.0.3/modules/lookup_ldap.c.init-cb-on-load autofs-5.0.3/modules/lookup_ldap.c
|
||||
--- autofs-5.0.3/modules/lookup_ldap.c.init-cb-on-load 2008-03-24 14:09:18.000000000 +0900
|
||||
+++ autofs-5.0.3/modules/lookup_ldap.c 2008-03-24 14:10:09.000000000 +0900
|
||||
@@ -599,7 +599,7 @@ static LDAP *connect_to_server(unsigned
|
||||
|
||||
if (!do_bind(logopt, ldap, ctxt)) {
|
||||
@ -60,9 +60,9 @@ diff -up autofs-5.0.2/modules/lookup_ldap.c.init-cb-on-load autofs-5.0.2/modules
|
||||
#endif
|
||||
free_context(ctxt);
|
||||
return rv;
|
||||
diff -up autofs-5.0.2/modules/cyrus-sasl.c.init-cb-on-load autofs-5.0.2/modules/cyrus-sasl.c
|
||||
--- autofs-5.0.2/modules/cyrus-sasl.c.init-cb-on-load 2008-03-09 13:50:30.000000000 +0900
|
||||
+++ autofs-5.0.2/modules/cyrus-sasl.c 2008-03-09 13:56:59.000000000 +0900
|
||||
diff -up autofs-5.0.3/modules/cyrus-sasl.c.init-cb-on-load autofs-5.0.3/modules/cyrus-sasl.c
|
||||
--- autofs-5.0.3/modules/cyrus-sasl.c.init-cb-on-load 2008-01-14 13:39:16.000000000 +0900
|
||||
+++ autofs-5.0.3/modules/cyrus-sasl.c 2008-03-24 14:10:09.000000000 +0900
|
||||
@@ -76,7 +76,6 @@ static const char *default_client = "aut
|
||||
static pthread_mutex_t krb5cc_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static unsigned int krb5cc_in_use = 0;
|
||||
@ -124,3 +124,14 @@ diff -up autofs-5.0.2/modules/cyrus-sasl.c.init-cb-on-load autofs-5.0.2/modules/
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
diff -up autofs-5.0.3/CHANGELOG.init-cb-on-load autofs-5.0.3/CHANGELOG
|
||||
--- autofs-5.0.3/CHANGELOG.init-cb-on-load 2008-03-24 14:09:18.000000000 +0900
|
||||
+++ autofs-5.0.3/CHANGELOG 2008-03-24 14:10:09.000000000 +0900
|
||||
@@ -9,6 +9,7 @@
|
||||
- fix expire working harder than needed.
|
||||
- fix unlink of mount tree incorrectly causing autofs mount fail.
|
||||
- add missing check for zero length NIS key (Wengang Wang).
|
||||
+- init SASL callbacks on every ldap lookup library load.
|
||||
|
||||
14/01/2008 autofs-5.0.3
|
||||
-----------------------
|
||||
|
@ -1,134 +0,0 @@
|
||||
diff --git a/include/dev-ioctl-lib.h b/include/dev-ioctl-lib.h
|
||||
index 5851c4c..007d7a6 100644
|
||||
--- a/include/dev-ioctl-lib.h
|
||||
+++ b/include/dev-ioctl-lib.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#define CONTROL_DEVICE "/dev/autofs"
|
||||
|
||||
-#define DEV_IOCTL_IS_MOUNTED 0x0001
|
||||
+#define DEV_IOCTL_IS_MOUNTPOINT 0x0001
|
||||
#define DEV_IOCTL_IS_AUTOFS 0x0002
|
||||
#define DEV_IOCTL_IS_OTHER 0x0004
|
||||
|
||||
diff --git a/include/mounts.h b/include/mounts.h
|
||||
index ca7dee9..679a508 100644
|
||||
--- a/include/mounts.h
|
||||
+++ b/include/mounts.h
|
||||
@@ -65,7 +65,7 @@ struct mnt_list {
|
||||
unsigned int query_kproto_ver(void);
|
||||
unsigned int get_kver_major(void);
|
||||
unsigned int get_kver_minor(void);
|
||||
-char *make_options_string(char *path, int kernel_pipefd, char *extra);
|
||||
+char *make_options_string(char *path, int kernel_pipefd, const char *extra);
|
||||
char *make_mnt_name_string(char *path);
|
||||
struct mnt_list *get_mnt_list(const char *table, const char *path, int include);
|
||||
struct mnt_list *reverse_mnt_list(struct mnt_list *list);
|
||||
diff --git a/lib/dev-ioctl-lib.c b/lib/dev-ioctl-lib.c
|
||||
index 8d4be77..719747f 100644
|
||||
--- a/lib/dev-ioctl-lib.c
|
||||
+++ b/lib/dev-ioctl-lib.c
|
||||
@@ -698,11 +698,18 @@ static int ioctl_askumount(unsigned int logopt,
|
||||
/*
|
||||
* Check if the given path is a mountpoint.
|
||||
*
|
||||
- * The path is considered a mountpoint if it is itself a mountpoint
|
||||
- * or contains a mount, such as a multi-mount without a root mount.
|
||||
- * In addition, if the path is itself a mountpoint we return whether
|
||||
- * the mounted file system is an autofs filesystem or other file
|
||||
- * system.
|
||||
+ * If we supply a file descriptor of an autofs mount we're
|
||||
+ * looking for a specific mount. In this case the path is
|
||||
+ * considered a mountpoint if it is itself a mountpoint or
|
||||
+ * contains a mount, such as a multi-mount without a root
|
||||
+ * mount.
|
||||
+ *
|
||||
+ * If we don't supply a file descriptor then we just want
|
||||
+ * to know if the given path is an autofs mount point or
|
||||
+ * is mounted within an autofs filesystem.
|
||||
+ *
|
||||
+ * In both cases we get an indication of whether the path
|
||||
+ * is a mount point and the super magic of the top mount.
|
||||
*/
|
||||
static int dev_ioctl_ismountpoint(unsigned int logopt,
|
||||
int ioctlfd, const char *path,
|
||||
@@ -731,7 +738,7 @@ static int dev_ioctl_ismountpoint(unsigned int logopt,
|
||||
}
|
||||
|
||||
if (param->arg1) {
|
||||
- *mountpoint = DEV_IOCTL_IS_MOUNTED;
|
||||
+ *mountpoint = DEV_IOCTL_IS_MOUNTPOINT;
|
||||
|
||||
if (param->arg2) {
|
||||
if (param->arg2 == AUTOFS_SUPER_MAGIC)
|
||||
diff --git a/lib/mounts.c b/lib/mounts.c
|
||||
index 959fe99..ba49099 100644
|
||||
--- a/lib/mounts.c
|
||||
+++ b/lib/mounts.c
|
||||
@@ -129,7 +129,7 @@ unsigned int get_kver_minor(void)
|
||||
/*
|
||||
* Make common autofs mount options string
|
||||
*/
|
||||
-char *make_options_string(char *path, int pipefd, char *extra)
|
||||
+char *make_options_string(char *path, int pipefd, const char *extra)
|
||||
{
|
||||
char *options;
|
||||
int len;
|
||||
@@ -1207,8 +1207,8 @@ free_tsv:
|
||||
const char *mount_type_str(const unsigned int type)
|
||||
{
|
||||
static const char *str_type[] = {
|
||||
- "direct",
|
||||
"indirect",
|
||||
+ "direct",
|
||||
"offset"
|
||||
};
|
||||
unsigned int pos, i;
|
||||
@@ -1225,13 +1225,13 @@ void notify_mount_result(struct autofs_point *ap,
|
||||
{
|
||||
if (ap->exp_timeout)
|
||||
info(ap->logopt,
|
||||
- "mounted %s on %s with timeout %u, freq %u seconds",
|
||||
+ "mounted %s mount on %s with timeout %u, freq %u seconds",
|
||||
type, path,
|
||||
(unsigned int) ap->exp_timeout,
|
||||
(unsigned int) ap->exp_runfreq);
|
||||
else
|
||||
info(ap->logopt,
|
||||
- "mounted %s on %s with timeouts disabled",
|
||||
+ "mounted %s mount on %s with timeouts disabled",
|
||||
type, path);
|
||||
|
||||
return;
|
||||
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
|
||||
index 1a9bef2..d493cde 100644
|
||||
--- a/modules/mount_nfs.c
|
||||
+++ b/modules/mount_nfs.c
|
||||
@@ -173,6 +173,13 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
||||
len = sprintf(fullpath, "%s", root);
|
||||
fullpath[len] = '\0';
|
||||
|
||||
+ if (is_mounted(_PATH_MOUNTED, fullpath, MNTS_REAL)) {
|
||||
+ info(ap->logopt, MODPREFIX
|
||||
+ "%s is already mounted or is being re-mounted", fullpath);
|
||||
+ free_host_list(&hosts);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
debug(ap->logopt, MODPREFIX "calling mkdir_path %s", fullpath);
|
||||
|
||||
status = mkdir_path(fullpath, 0555);
|
||||
@@ -197,13 +204,6 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
||||
while (this) {
|
||||
char *loc, *port_opt = NULL;
|
||||
|
||||
- if (is_mounted(_PATH_MOUNTED, fullpath, MNTS_REAL)) {
|
||||
- info(ap->logopt, MODPREFIX
|
||||
- "%s is already mounted or is being re-mounted", fullpath);
|
||||
- free_host_list(&hosts);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
/*
|
||||
* If the "port" option is specified, then we don't want
|
||||
* a bind mount. Use the "port" option if you want to
|
File diff suppressed because it is too large
Load Diff
36
autofs-5.0.3-handle-zero-length-nis-key.patch
Normal file
36
autofs-5.0.3-handle-zero-length-nis-key.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up autofs-5.0.3/CHANGELOG.handle-zero-length-nis-key autofs-5.0.3/CHANGELOG
|
||||
--- autofs-5.0.3/CHANGELOG.handle-zero-length-nis-key 2008-03-24 14:07:30.000000000 +0900
|
||||
+++ autofs-5.0.3/CHANGELOG 2008-03-24 14:08:08.000000000 +0900
|
||||
@@ -8,6 +8,7 @@
|
||||
- another fix for don't fail on empty master map.
|
||||
- fix expire working harder than needed.
|
||||
- fix unlink of mount tree incorrectly causing autofs mount fail.
|
||||
+- add missing check for zero length NIS key (Wengang Wang).
|
||||
|
||||
14/01/2008 autofs-5.0.3
|
||||
-----------------------
|
||||
diff -up autofs-5.0.3/modules/lookup_yp.c.handle-zero-length-nis-key autofs-5.0.3/modules/lookup_yp.c
|
||||
--- autofs-5.0.3/modules/lookup_yp.c.handle-zero-length-nis-key 2008-01-14 13:39:16.000000000 +0900
|
||||
+++ autofs-5.0.3/modules/lookup_yp.c 2008-03-24 14:07:45.000000000 +0900
|
||||
@@ -168,6 +168,10 @@ int yp_all_master_callback(int status, c
|
||||
if (status != YP_TRUE)
|
||||
return status;
|
||||
|
||||
+ /* Ignore zero length keys */
|
||||
+ if (ypkeylen == 0)
|
||||
+ return 0;
|
||||
+
|
||||
/*
|
||||
* Ignore keys beginning with '+' as plus map
|
||||
* inclusion is only valid in file maps.
|
||||
@@ -263,6 +267,10 @@ int yp_all_callback(int status, char *yp
|
||||
if (status != YP_TRUE)
|
||||
return status;
|
||||
|
||||
+ /* Ignore zero length keys */
|
||||
+ if (ypkeylen == 0)
|
||||
+ return 0;
|
||||
+
|
||||
/*
|
||||
* Ignore keys beginning with '+' as plus map
|
||||
* inclusion is only valid in file maps.
|
@ -1,49 +0,0 @@
|
||||
diff --git a/lib/mounts.c b/lib/mounts.c
|
||||
index ba49099..e3e8066 100644
|
||||
--- a/lib/mounts.c
|
||||
+++ b/lib/mounts.c
|
||||
@@ -391,7 +391,7 @@ int contained_in_local_fs(const char *path)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int is_mounted(const char *table, const char *path, unsigned int type)
|
||||
+static int table_is_mounted(const char *table, const char *path, unsigned int type)
|
||||
{
|
||||
struct mntent *mnt;
|
||||
struct mntent mnt_wrk;
|
||||
@@ -437,6 +437,35 @@ int is_mounted(const char *table, const char *path, unsigned int type)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int ioctl_is_mounted(const char *path, unsigned int type)
|
||||
+{
|
||||
+ struct ioctl_ops *ops = get_ioctl_ops();
|
||||
+ unsigned int mounted;
|
||||
+
|
||||
+ ops->ismountpoint(LOGOPT_NONE, -1, path, &mounted);
|
||||
+ if (mounted) {
|
||||
+ switch (type) {
|
||||
+ case MNTS_ALL:
|
||||
+ return 1;
|
||||
+ case MNTS_AUTOFS:
|
||||
+ return (mounted & DEV_IOCTL_IS_AUTOFS);
|
||||
+ case MNTS_REAL:
|
||||
+ return (mounted & DEV_IOCTL_IS_OTHER);
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int is_mounted(const char *table, const char *path, unsigned int type)
|
||||
+{
|
||||
+ struct ioctl_ops *ops = get_ioctl_ops();
|
||||
+
|
||||
+ if (ops->version)
|
||||
+ return ioctl_is_mounted(path, type);
|
||||
+ else
|
||||
+ return table_is_mounted(table, path, type);
|
||||
+}
|
||||
+
|
||||
int has_fstab_option(const char *opt)
|
||||
{
|
||||
struct mntent *mnt;
|
55
autofs-5.0.3-map-type-in-map-name.patch
Normal file
55
autofs-5.0.3-map-type-in-map-name.patch
Normal file
@ -0,0 +1,55 @@
|
||||
diff --git a/CHANGELOG b/CHANGELOG
|
||||
index af5a1b0..76f2477 100644
|
||||
--- a/CHANGELOG
|
||||
+++ b/CHANGELOG
|
||||
@@ -12,6 +12,7 @@
|
||||
- update fix expire working harder than needed.
|
||||
- add missing check for zero length NIS key (Wengang Wang).
|
||||
- init SASL callbacks on every ldap lookup library load.
|
||||
+- fix incorrect match of map type name when included in map name.
|
||||
|
||||
14/01/2008 autofs-5.0.3
|
||||
-----------------------
|
||||
diff --git a/lib/master_tok.l b/lib/master_tok.l
|
||||
index b379940..9f4aaab 100644
|
||||
--- a/lib/master_tok.l
|
||||
+++ b/lib/master_tok.l
|
||||
@@ -77,6 +77,7 @@ int my_yyinput(char *, int);
|
||||
char buff[1024];
|
||||
char *bptr;
|
||||
char *optr = buff;
|
||||
+char *tptr;
|
||||
|
||||
%}
|
||||
|
||||
@@ -189,17 +190,25 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo
|
||||
<MAPSTR>{
|
||||
{OPTWS}\\\n{OPTWS} {}
|
||||
|
||||
- {MULTI} {
|
||||
- strcpy(master_lval.strtype, master_text);
|
||||
+ {WS}{MULTI} {
|
||||
+ tptr = master_text;
|
||||
+ while (*tptr && isblank(*tptr)) {
|
||||
+ tptr++;
|
||||
+ }
|
||||
+ strcpy(master_lval.strtype, tptr);
|
||||
return(MULTITYPE);
|
||||
}
|
||||
|
||||
- {MTYPE} {
|
||||
- strcpy(master_lval.strtype, master_text);
|
||||
+ {WS}{MTYPE} {
|
||||
+ tptr = master_text;
|
||||
+ while (*tptr && isblank(*tptr)) {
|
||||
+ tptr++;
|
||||
+ }
|
||||
+ strcpy(master_lval.strtype, tptr);
|
||||
return(MAPTYPE);
|
||||
}
|
||||
|
||||
- {MULTISEP} { return(DDASH); }
|
||||
+ {WS}{MULTISEP} { return(DDASH); }
|
||||
|
||||
":" { return(COLON); }
|
||||
|
18
autofs.spec
18
autofs.spec
@ -4,7 +4,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.0.3
|
||||
Release: 7
|
||||
Release: 8
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
@ -18,11 +18,9 @@ Patch5: autofs-5.0.3-correct-ldap-lib.patch
|
||||
Patch6: autofs-5.0.3-dont-fail-on-empty-master-fix-2.patch
|
||||
Patch7: autofs-5.0.3-expire-works-too-hard.patch
|
||||
Patch8: autofs-5.0.3-unlink-mount-return-fix.patch
|
||||
Patch9: autofs-5.0.3-device-node-control.patch
|
||||
Patch10: autofs-5.0.3-active-restart.patch
|
||||
Patch11: autofs-5.0.3-device-node-and-active-restart-fixes.patch
|
||||
Patch12: autofs-5.0.3-make-is_mounted-use-dev-ioctl.patch
|
||||
Patch13: autofs-5.0.2-init-cb-on-load.patch
|
||||
Patch9: autofs-5.0.3-handle-zero-length-nis-key.patch
|
||||
Patch10: autofs-5.0.2-init-cb-on-load.patch
|
||||
Patch11: autofs-5.0.3-map-type-in-map-name.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 module-init-tools util-linux nfs-utils e2fsprogs
|
||||
Conflicts: kernel < 2.6.17
|
||||
@ -75,8 +73,6 @@ echo %{version}-%{release} > .version
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||
@ -129,6 +125,12 @@ fi
|
||||
%{_libdir}/autofs/
|
||||
|
||||
%changelog
|
||||
* Mon Mar 24 2008 Ian Kent <ikent@redhat.com> - 5.0.3-8
|
||||
- revert miscellaneous device node related patches.
|
||||
- add missing check for zero length NIS key.
|
||||
- fix incorrect match of map type name when included in map name.
|
||||
- update rev 7 sasl callbacks patch.
|
||||
|
||||
* Thu Mar 20 2008 Ian Kent <ikent@redhat.com> - 5.0.3-7
|
||||
- add patch to initialize sasl callbacks unconditionally on autofs
|
||||
LDAP lookup library load.
|
||||
|
Loading…
Reference in New Issue
Block a user