Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/autofs.git#8aafe866de6c87bc7ab9084c9a959bc12bcbfa8a
This commit is contained in:
parent
a275d04aab
commit
752a4ac547
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@ autofs-5.0.5.tar.bz2
|
|||||||
/autofs-5.1.4.tar.gz
|
/autofs-5.1.4.tar.gz
|
||||||
/autofs-5.1.5.tar.gz
|
/autofs-5.1.5.tar.gz
|
||||||
/autofs-5.1.6.tar.gz
|
/autofs-5.1.6.tar.gz
|
||||||
|
/autofs-5.1.7.tar.gz
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
autofs-5.1.6 - correct fsf address
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
COPYING | 4 ++--
|
|
||||||
COPYRIGHT | 6 +++---
|
|
||||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 3eb34097..f53f9adf 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -4,6 +4,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix program map multi-mount lookup after mount fail.
|
|
||||||
- fix browse dir not re-created on symlink expire.
|
|
||||||
- fix a regression with map instance lookup.
|
|
||||||
+- correct fsf address.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/COPYING b/COPYING
|
|
||||||
index 60549be5..66885ff6 100644
|
|
||||||
--- a/COPYING
|
|
||||||
+++ b/COPYING
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
diff --git a/COPYRIGHT b/COPYRIGHT
|
|
||||||
index 37bd5d8b..b0dc1066 100644
|
|
||||||
--- a/COPYRIGHT
|
|
||||||
+++ b/COPYRIGHT
|
|
||||||
@@ -4,9 +4,9 @@ For all software in this distribution unless otherwise indicated:
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
- the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
|
|
||||||
- USA; either version 2 of the License, or (at your option) any later
|
|
||||||
- version.
|
|
||||||
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
+ Boston, MA 02110-1301, USA; either version 2 of the License, or
|
|
||||||
+ (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@ -1,329 +0,0 @@
|
|||||||
autofs-5.1.6 - fix a regression with map instance lookup
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
Commit b66deff4241d ("autofs-5.1.3 - fix possible map instance memory
|
|
||||||
leak") introduced a regression.
|
|
||||||
|
|
||||||
The change didn't fix the memory leak and also failed to fix the race
|
|
||||||
updating the map instance list that caused it.
|
|
||||||
|
|
||||||
To fix this get rid of the horible temporary map usage and update the
|
|
||||||
instance list in place. Doing this causes some additional allocations
|
|
||||||
and frees but is somewhat simpler overall and avoids the race.
|
|
||||||
|
|
||||||
Fixes: b66deff4241d ("autofs-5.1.3 - fix possible map instance memory leak")
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1
|
|
||||||
daemon/lookup.c | 188 ++++++++++++++++++++++---------------------------------
|
|
||||||
2 files changed, 76 insertions(+), 113 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 214ee8bb..3eb34097 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -3,6 +3,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- update ldap READMEs and schema definitions.
|
|
||||||
- fix program map multi-mount lookup after mount fail.
|
|
||||||
- fix browse dir not re-created on symlink expire.
|
|
||||||
+- fix a regression with map instance lookup.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/daemon/lookup.c b/daemon/lookup.c
|
|
||||||
index 60a48f3f..8d54c465 100644
|
|
||||||
--- a/daemon/lookup.c
|
|
||||||
+++ b/daemon/lookup.c
|
|
||||||
@@ -64,6 +64,10 @@ static char *find_map_path(struct autofs_point *ap, struct map_source *map)
|
|
||||||
char *search_path;
|
|
||||||
struct stat st;
|
|
||||||
|
|
||||||
+ /* Absolute path, just return a copy */
|
|
||||||
+ if (mname[0] == '/')
|
|
||||||
+ return strdup(mname);
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* This is different to the way it is in amd.
|
|
||||||
* autofs will always try to locate maps in AUTOFS_MAP_DIR
|
|
||||||
@@ -373,14 +377,27 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
|
|
||||||
char src_prog[] = "program";
|
|
||||||
struct stat st;
|
|
||||||
char *type, *format;
|
|
||||||
+ char *path;
|
|
||||||
+
|
|
||||||
+ if (map->argc < 1) {
|
|
||||||
+ error(ap->logopt, "invalid arguments for autofs_point");
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- if (stat(map->argv[0], &st) == -1) {
|
|
||||||
- warn(ap->logopt, "file map %s not found", map->argv[0]);
|
|
||||||
+ path = find_map_path(ap, map);
|
|
||||||
+ if (!path)
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+
|
|
||||||
+ if (stat(path, &st) == -1) {
|
|
||||||
+ warn(ap->logopt, "file map %s not found", path);
|
|
||||||
+ free(path);
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!S_ISREG(st.st_mode))
|
|
||||||
+ if (!S_ISREG(st.st_mode)) {
|
|
||||||
+ free(path);
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (st.st_mode & __S_IEXEC)
|
|
||||||
type = src_prog;
|
|
||||||
@@ -391,9 +408,23 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
|
|
||||||
|
|
||||||
instance = master_find_source_instance(map, type, format, 0, NULL);
|
|
||||||
if (!instance) {
|
|
||||||
- int argc = map->argc;
|
|
||||||
- const char **argv = map->argv;
|
|
||||||
+ const char **argv;
|
|
||||||
+ int argc;
|
|
||||||
+
|
|
||||||
+ argc = map->argc;
|
|
||||||
+ argv = copy_argv(map->argc, map->argv);
|
|
||||||
+ if (!argv) {
|
|
||||||
+ error(ap->logopt, "failed to copy args");
|
|
||||||
+ free(path);
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+ }
|
|
||||||
+ if (argv[0])
|
|
||||||
+ free((char *) argv[0]);
|
|
||||||
+ argv[0] = path;
|
|
||||||
+ path = NULL;
|
|
||||||
+
|
|
||||||
instance = master_add_source_instance(map, type, format, age, argc, argv);
|
|
||||||
+ free_argv(argc, argv);
|
|
||||||
if (!instance)
|
|
||||||
return NSS_STATUS_UNAVAIL;
|
|
||||||
instance->recurse = map->recurse;
|
|
||||||
@@ -401,6 +432,9 @@ static int read_file_source_instance(struct autofs_point *ap, struct map_source
|
|
||||||
}
|
|
||||||
instance->stale = map->stale;
|
|
||||||
|
|
||||||
+ if (path)
|
|
||||||
+ free(path);
|
|
||||||
+
|
|
||||||
return do_read_map(ap, instance, age);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -426,14 +460,6 @@ static int read_source_instance(struct autofs_point *ap, struct map_source *map,
|
|
||||||
return do_read_map(ap, instance, age);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void argv_cleanup(void *arg)
|
|
||||||
-{
|
|
||||||
- struct map_source *tmap = (struct map_source *) arg;
|
|
||||||
- /* path is freed in free_argv */
|
|
||||||
- free_argv(tmap->argc, tmap->argv);
|
|
||||||
- return;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
static int lookup_map_read_map(struct autofs_point *ap,
|
|
||||||
struct map_source *map, time_t age)
|
|
||||||
{
|
|
||||||
@@ -476,16 +502,11 @@ static int lookup_map_read_map(struct autofs_point *ap,
|
|
||||||
static enum nsswitch_status read_map_source(struct nss_source *this,
|
|
||||||
struct autofs_point *ap, struct map_source *map, time_t age)
|
|
||||||
{
|
|
||||||
- enum nsswitch_status result;
|
|
||||||
- struct map_source tmap;
|
|
||||||
- char *path;
|
|
||||||
-
|
|
||||||
if (strcasecmp(this->source, "files")) {
|
|
||||||
return read_source_instance(ap, map, this->source, age);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
- * autofs built-in map for nsswitch "files" is "file".
|
|
||||||
* This is a special case as we need to append the
|
|
||||||
* normal location to the map name.
|
|
||||||
* note: It's invalid to specify a relative path.
|
|
||||||
@@ -496,50 +517,7 @@ static enum nsswitch_status read_map_source(struct nss_source *this,
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
- this->source[4] = '\0';
|
|
||||||
- tmap.flags = map->flags;
|
|
||||||
- tmap.type = this->source;
|
|
||||||
- tmap.format = map->format;
|
|
||||||
- tmap.name = map->name;
|
|
||||||
- tmap.lookup = map->lookup;
|
|
||||||
- tmap.mc = map->mc;
|
|
||||||
- tmap.instance = map->instance;
|
|
||||||
- tmap.exp_timeout = map->exp_timeout;
|
|
||||||
- tmap.recurse = map->recurse;
|
|
||||||
- tmap.depth = map->depth;
|
|
||||||
- tmap.stale = map->stale;
|
|
||||||
- tmap.argc = 0;
|
|
||||||
- tmap.argv = NULL;
|
|
||||||
-
|
|
||||||
- path = find_map_path(ap, map);
|
|
||||||
- if (!path)
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
-
|
|
||||||
- if (map->argc >= 1) {
|
|
||||||
- tmap.argc = map->argc;
|
|
||||||
- tmap.argv = copy_argv(map->argc, map->argv);
|
|
||||||
- if (!tmap.argv) {
|
|
||||||
- error(ap->logopt, "failed to copy args");
|
|
||||||
- free(path);
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
- }
|
|
||||||
- if (tmap.argv[0])
|
|
||||||
- free((char *) tmap.argv[0]);
|
|
||||||
- tmap.argv[0] = path;
|
|
||||||
- } else {
|
|
||||||
- error(ap->logopt, "invalid arguments for autofs_point");
|
|
||||||
- free(path);
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- pthread_cleanup_push(argv_cleanup, &tmap);
|
|
||||||
- result = read_file_source_instance(ap, &tmap, age);
|
|
||||||
- pthread_cleanup_pop(1);
|
|
||||||
-
|
|
||||||
- if (!map->instance)
|
|
||||||
- map->instance = tmap.instance;
|
|
||||||
-
|
|
||||||
- return result;
|
|
||||||
+ return read_file_source_instance(ap, map, age);
|
|
||||||
}
|
|
||||||
|
|
||||||
int lookup_nss_read_map(struct autofs_point *ap, struct map_source *source, time_t age)
|
|
||||||
@@ -925,17 +903,30 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
|
|
||||||
time_t age = monotonic_time(NULL);
|
|
||||||
struct stat st;
|
|
||||||
char *type, *format;
|
|
||||||
+ char *path;
|
|
||||||
|
|
||||||
if (*name == '/' && map->flags & MAP_FLAG_FORMAT_AMD)
|
|
||||||
return lookup_amd_instance(ap, map, name, name_len);
|
|
||||||
|
|
||||||
- if (stat(map->argv[0], &st) == -1) {
|
|
||||||
+ if (map->argc < 1) {
|
|
||||||
+ error(ap->logopt, "invalid arguments for autofs_point");
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ path = find_map_path(ap, map);
|
|
||||||
+ if (!path)
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+
|
|
||||||
+ if (stat(path, &st) == -1) {
|
|
||||||
debug(ap->logopt, "file map not found");
|
|
||||||
+ free(path);
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!S_ISREG(st.st_mode))
|
|
||||||
+ if (!S_ISREG(st.st_mode)) {
|
|
||||||
+ free(path);
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (st.st_mode & __S_IEXEC)
|
|
||||||
type = src_prog;
|
|
||||||
@@ -946,15 +937,32 @@ static int lookup_name_file_source_instance(struct autofs_point *ap, struct map_
|
|
||||||
|
|
||||||
instance = master_find_source_instance(map, type, format, 0, NULL);
|
|
||||||
if (!instance) {
|
|
||||||
- int argc = map->argc;
|
|
||||||
- const char **argv = map->argv;
|
|
||||||
+ const char **argv;
|
|
||||||
+ int argc;
|
|
||||||
+
|
|
||||||
+ argc = map->argc;
|
|
||||||
+ argv = copy_argv(map->argc, map->argv);
|
|
||||||
+ if (!argv) {
|
|
||||||
+ error(ap->logopt, "failed to copy args");
|
|
||||||
+ free(path);
|
|
||||||
+ return NSS_STATUS_UNKNOWN;
|
|
||||||
+ }
|
|
||||||
+ if (argv[0])
|
|
||||||
+ free((char *) argv[0]);
|
|
||||||
+ argv[0] = path;
|
|
||||||
+ path = NULL;
|
|
||||||
+
|
|
||||||
instance = master_add_source_instance(map, type, format, age, argc, argv);
|
|
||||||
+ free_argv(argc, argv);
|
|
||||||
if (!instance)
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
instance->recurse = map->recurse;
|
|
||||||
instance->depth = map->depth;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (path)
|
|
||||||
+ free(path);
|
|
||||||
+
|
|
||||||
return do_lookup_mount(ap, instance, name, name_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1030,10 +1038,6 @@ static enum nsswitch_status lookup_map_name(struct nss_source *this,
|
|
||||||
struct autofs_point *ap, struct map_source *map,
|
|
||||||
const char *name, int name_len)
|
|
||||||
{
|
|
||||||
- enum nsswitch_status result;
|
|
||||||
- struct map_source tmap;
|
|
||||||
- char *path;
|
|
||||||
-
|
|
||||||
if (strcasecmp(this->source, "files"))
|
|
||||||
return lookup_name_source_instance(ap, map,
|
|
||||||
this->source, name, name_len);
|
|
||||||
@@ -1050,49 +1054,7 @@ static enum nsswitch_status lookup_map_name(struct nss_source *this,
|
|
||||||
return NSS_STATUS_NOTFOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
- this->source[4] = '\0';
|
|
||||||
- tmap.flags = map->flags;
|
|
||||||
- tmap.type = this->source;
|
|
||||||
- tmap.format = map->format;
|
|
||||||
- tmap.name = map->name;
|
|
||||||
- tmap.mc = map->mc;
|
|
||||||
- tmap.instance = map->instance;
|
|
||||||
- tmap.exp_timeout = map->exp_timeout;
|
|
||||||
- tmap.recurse = map->recurse;
|
|
||||||
- tmap.depth = map->depth;
|
|
||||||
- tmap.argc = 0;
|
|
||||||
- tmap.argv = NULL;
|
|
||||||
-
|
|
||||||
- path = find_map_path(ap, map);
|
|
||||||
- if (!path)
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
-
|
|
||||||
- if (map->argc >= 1) {
|
|
||||||
- tmap.argc = map->argc;
|
|
||||||
- tmap.argv = copy_argv(map->argc, map->argv);
|
|
||||||
- if (!tmap.argv) {
|
|
||||||
- error(ap->logopt, "failed to copy args");
|
|
||||||
- free(path);
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
- }
|
|
||||||
- if (tmap.argv[0])
|
|
||||||
- free((char *) tmap.argv[0]);
|
|
||||||
- tmap.argv[0] = path;
|
|
||||||
- } else {
|
|
||||||
- error(ap->logopt, "invalid arguments for autofs_point");
|
|
||||||
- free(path);
|
|
||||||
- return NSS_STATUS_UNKNOWN;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- result = lookup_name_file_source_instance(ap, &tmap, name, name_len);
|
|
||||||
-
|
|
||||||
- if (!map->instance)
|
|
||||||
- map->instance = tmap.instance;
|
|
||||||
-
|
|
||||||
- /* path is freed in free_argv */
|
|
||||||
- free_argv(tmap.argc, tmap.argv);
|
|
||||||
-
|
|
||||||
- return result;
|
|
||||||
+ return lookup_name_file_source_instance(ap, map, name, name_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct map_source *lookup_get_map_source(struct master_mapent *entry)
|
|
@ -1,283 +0,0 @@
|
|||||||
autofs-5.1.6 - fix autofs mount options construction
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
There's an off by one length error in the autofs mount options
|
|
||||||
construction.
|
|
||||||
|
|
||||||
Consolidate the options construction into make_options_string() and
|
|
||||||
use snprintf() to verify the options length calculation is correct.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
daemon/direct.c | 46 ++-----------------------
|
|
||||||
daemon/indirect.c | 23 +-----------
|
|
||||||
include/mounts.h | 3 +-
|
|
||||||
lib/mounts.c | 98 +++++++++++++++++++++++++++++++++++++++++++++--------
|
|
||||||
5 files changed, 92 insertions(+), 79 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 90f67336..2565b04d 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -10,6 +10,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix trailing dollar sun entry expansion.
|
|
||||||
- initialize struct addrinfo for getaddrinfo() calls.
|
|
||||||
- fix quoted string length calc in expandsunent().
|
|
||||||
+- fix autofs mount options construction.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/daemon/direct.c b/daemon/direct.c
|
|
||||||
index b82d6e95..c4948729 100644
|
|
||||||
--- a/daemon/direct.c
|
|
||||||
+++ b/daemon/direct.c
|
|
||||||
@@ -348,29 +348,10 @@ int do_mount_autofs_direct(struct autofs_point *ap,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mp->options) {
|
|
||||||
- mp->options = make_options_string(ap->path, ap->kpipefd, str_direct);
|
|
||||||
+ mp->options = make_options_string(ap->path,
|
|
||||||
+ ap->kpipefd, str_direct, ap->flags);
|
|
||||||
if (!mp->options)
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 3) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(mp->options, strlen(mp->options) + 12);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",strictexpire");
|
|
||||||
- mp->options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_IGNORE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 4) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(mp->options, strlen(mp->options) + 7);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",ignore");
|
|
||||||
- mp->options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In case the directory doesn't exist, try to mkdir it */
|
|
||||||
@@ -676,29 +657,10 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mp->options) {
|
|
||||||
- mp->options = make_options_string(ap->path, ap->kpipefd, str_offset);
|
|
||||||
+ mp->options = make_options_string(ap->path,
|
|
||||||
+ ap->kpipefd, str_offset, ap->flags);
|
|
||||||
if (!mp->options)
|
|
||||||
return MOUNT_OFFSET_OK;
|
|
||||||
-
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 3) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(mp->options, strlen(mp->options) + 12);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",strictexpire");
|
|
||||||
- mp->options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_IGNORE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 4) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(mp->options, strlen(mp->options) + 7);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",ignore");
|
|
||||||
- mp->options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
strcpy(mountpoint, root);
|
|
||||||
diff --git a/daemon/indirect.c b/daemon/indirect.c
|
|
||||||
index 32257323..43bcb346 100644
|
|
||||||
--- a/daemon/indirect.c
|
|
||||||
+++ b/daemon/indirect.c
|
|
||||||
@@ -78,32 +78,13 @@ static int do_mount_autofs_indirect(struct autofs_point *ap, const char *root)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- options = make_options_string(ap->path, ap->kpipefd, str_indirect);
|
|
||||||
+ options = make_options_string(ap->path,
|
|
||||||
+ ap->kpipefd, str_indirect, ap->flags);
|
|
||||||
if (!options) {
|
|
||||||
error(ap->logopt, "options string error");
|
|
||||||
goto out_err;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_STRICTEXPIRE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 3) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(options, strlen(options) + 12);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",strictexpire");
|
|
||||||
- options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if ((ap->flags & MOUNT_FLAG_IGNORE) &&
|
|
||||||
- ((get_kver_major() == 5 && get_kver_minor() > 4) ||
|
|
||||||
- (get_kver_major() > 5))) {
|
|
||||||
- char *tmp = realloc(options, strlen(options) + 7);
|
|
||||||
- if (tmp) {
|
|
||||||
- strcat(tmp, ",ignore");
|
|
||||||
- options = tmp;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* In case the directory doesn't exist, try to mkdir it */
|
|
||||||
if (mkdir_path(root, mp_mode) < 0) {
|
|
||||||
if (errno != EEXIST && errno != EROFS) {
|
|
||||||
diff --git a/include/mounts.h b/include/mounts.h
|
|
||||||
index 1214aed9..c8fddf00 100644
|
|
||||||
--- a/include/mounts.h
|
|
||||||
+++ b/include/mounts.h
|
|
||||||
@@ -94,7 +94,8 @@ void free_amd_entry_list(struct list_head *entries);
|
|
||||||
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, const char *extra);
|
|
||||||
+char *make_options_string(char *path, int pipefd,
|
|
||||||
+ const char *type, unsigned int flags);
|
|
||||||
char *make_mnt_name_string(char *path);
|
|
||||||
int ext_mount_add(struct list_head *, const char *, unsigned int);
|
|
||||||
int ext_mount_remove(struct list_head *, const char *);
|
|
||||||
diff --git a/lib/mounts.c b/lib/mounts.c
|
|
||||||
index 83d053c8..a2d1f149 100644
|
|
||||||
--- a/lib/mounts.c
|
|
||||||
+++ b/lib/mounts.c
|
|
||||||
@@ -599,43 +599,111 @@ void free_amd_entry_list(struct list_head *entries)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int cacl_max_options_len(unsigned int flags)
|
|
||||||
+{
|
|
||||||
+ unsigned int kver_major = get_kver_major();
|
|
||||||
+ unsigned int kver_minor = get_kver_minor();
|
|
||||||
+ int max_len;
|
|
||||||
+
|
|
||||||
+ /* %d and %u are maximum lenght of 10 and mount type is maximum
|
|
||||||
+ * length of 9 (e. ",indirect").
|
|
||||||
+ * The base temaplate is "fd=%d,pgrp=%u,minproto=5,maxproto=%d"
|
|
||||||
+ * plus the length of mount type plus 1 for the NULL.
|
|
||||||
+ */
|
|
||||||
+ max_len = 79 + 1;
|
|
||||||
+
|
|
||||||
+ if (kver_major < 5 || (kver_major == 5 && kver_minor < 4))
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ /* maybe add ",strictexpire" */
|
|
||||||
+ if (flags & MOUNT_FLAG_STRICTEXPIRE)
|
|
||||||
+ max_len += 13;
|
|
||||||
+
|
|
||||||
+ if (kver_major == 5 && kver_minor < 5)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ /* maybe add ",ignore" */
|
|
||||||
+ if (flags & MOUNT_FLAG_IGNORE)
|
|
||||||
+ max_len += 7;
|
|
||||||
+out:
|
|
||||||
+ return max_len;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Make common autofs mount options string
|
|
||||||
*/
|
|
||||||
-char *make_options_string(char *path, int pipefd, const char *extra)
|
|
||||||
+char *make_options_string(char *path, int pipefd,
|
|
||||||
+ const char *type, unsigned int flags)
|
|
||||||
{
|
|
||||||
+ unsigned int kver_major = get_kver_major();
|
|
||||||
+ unsigned int kver_minor = get_kver_minor();
|
|
||||||
char *options;
|
|
||||||
- int len;
|
|
||||||
+ int max_len, len, new;
|
|
||||||
+
|
|
||||||
+ max_len = cacl_max_options_len(flags);
|
|
||||||
|
|
||||||
- options = malloc(MAX_OPTIONS_LEN + 1);
|
|
||||||
+ options = malloc(max_len);
|
|
||||||
if (!options) {
|
|
||||||
logerr("can't malloc options string");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (extra)
|
|
||||||
- len = snprintf(options, MAX_OPTIONS_LEN,
|
|
||||||
+ if (type)
|
|
||||||
+ len = snprintf(options, max_len,
|
|
||||||
options_template_extra,
|
|
||||||
pipefd, (unsigned) getpgrp(),
|
|
||||||
- AUTOFS_MAX_PROTO_VERSION, extra);
|
|
||||||
+ AUTOFS_MAX_PROTO_VERSION, type);
|
|
||||||
else
|
|
||||||
- len = snprintf(options, MAX_OPTIONS_LEN, options_template,
|
|
||||||
+ len = snprintf(options, max_len, options_template,
|
|
||||||
pipefd, (unsigned) getpgrp(),
|
|
||||||
AUTOFS_MAX_PROTO_VERSION);
|
|
||||||
|
|
||||||
- if (len >= MAX_OPTIONS_LEN) {
|
|
||||||
- logerr("buffer to small for options - truncated");
|
|
||||||
- len = MAX_OPTIONS_LEN - 1;
|
|
||||||
+ if (len < 0)
|
|
||||||
+ goto error_out;
|
|
||||||
+
|
|
||||||
+ if (len >= max_len)
|
|
||||||
+ goto truncated;
|
|
||||||
+
|
|
||||||
+ if (kver_major < 5 || (kver_major == 5 && kver_minor < 4))
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ /* maybe add ",strictexpire" */
|
|
||||||
+ if (flags & MOUNT_FLAG_STRICTEXPIRE) {
|
|
||||||
+ new = snprintf(options + len,
|
|
||||||
+ max_len, "%s", ",strictexpire");
|
|
||||||
+ if (new < 0)
|
|
||||||
+ goto error_out;
|
|
||||||
+ len += new;
|
|
||||||
+ if (len >= max_len)
|
|
||||||
+ goto truncated;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (len < 0) {
|
|
||||||
- logerr("failed to malloc autofs mount options for %s", path);
|
|
||||||
- free(options);
|
|
||||||
- return NULL;
|
|
||||||
+ if (kver_major == 5 && kver_minor < 5)
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ /* maybe add ",ignore" */
|
|
||||||
+ if (flags & MOUNT_FLAG_IGNORE) {
|
|
||||||
+ new = snprintf(options + len,
|
|
||||||
+ max_len, "%s", ",ignore");
|
|
||||||
+ if (new < 0)
|
|
||||||
+ goto error_out;
|
|
||||||
+ len += new;
|
|
||||||
+ if (len >= max_len)
|
|
||||||
+ goto truncated;
|
|
||||||
}
|
|
||||||
+out:
|
|
||||||
options[len] = '\0';
|
|
||||||
-
|
|
||||||
return options;
|
|
||||||
+
|
|
||||||
+truncated:
|
|
||||||
+ logerr("buffer to small for options - truncated");
|
|
||||||
+ len = max_len -1;
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+error_out:
|
|
||||||
+ logerr("error constructing mount options string for %s", path);
|
|
||||||
+ free(options);
|
|
||||||
+ return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *make_mnt_name_string(char *path)
|
|
@ -1,56 +0,0 @@
|
|||||||
autofs-5.1.6 - fix browse dir not re-created on symlink expire
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
If symlinks are being used for mounts and the autofs mount has browse mode
|
|
||||||
enabled when a symlink is removed at expire the browse mode directory needs
|
|
||||||
to be re-created.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
daemon/automount.c | 19 +++++++++++++++++++
|
|
||||||
2 files changed, 20 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 3c784d34..214ee8bb 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -2,6 +2,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- make bind mounts propagation slave by default.
|
|
||||||
- update ldap READMEs and schema definitions.
|
|
||||||
- fix program map multi-mount lookup after mount fail.
|
|
||||||
+- fix browse dir not re-created on symlink expire.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/daemon/automount.c b/daemon/automount.c
|
|
||||||
index 8ec4ac5e..0391bfb5 100644
|
|
||||||
--- a/daemon/automount.c
|
|
||||||
+++ b/daemon/automount.c
|
|
||||||
@@ -650,6 +650,25 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl)
|
|
||||||
"failed to remove symlink %s", path);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
+ /* Check if the autofs mount has browse mode enabled.
|
|
||||||
+ * If so re-create the directory entry.
|
|
||||||
+ */
|
|
||||||
+ if (ap->flags | MOUNT_FLAG_GHOST) {
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ /* If the browse directory create fails log an
|
|
||||||
+ * error and continue anyway since the expire
|
|
||||||
+ * has succeeded.
|
|
||||||
+ */
|
|
||||||
+ ret = mkdir_path(path, mp_mode);
|
|
||||||
+ if (ret && errno != EEXIST) {
|
|
||||||
+ char buf[MAX_ERR_BUF];
|
|
||||||
+ char *estr;
|
|
||||||
+ estr = strerror_r(errno, buf, MAX_ERR_BUF);
|
|
||||||
+ warn(ap->logopt,
|
|
||||||
+ "mkdir_path %s failed: %s", path, estr);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
/* Check for an external mount and attempt umount if needed */
|
|
||||||
mounts_mutex_lock(ap);
|
|
||||||
entry = __master_find_amdmount(ap, path);
|
|
@ -1,46 +0,0 @@
|
|||||||
autofs-5.1.6 - fix configure force shutdown check
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
Not strickly broken but there is a mis-match between the --enable-force-shutdown
|
|
||||||
and the configure variable naming.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
configure | 2 +-
|
|
||||||
configure.in | 2 +-
|
|
||||||
3 files changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- autofs-5.1.6.orig/CHANGELOG
|
|
||||||
+++ autofs-5.1.6/CHANGELOG
|
|
||||||
@@ -14,6 +14,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- mount_nfs.c fix local rdma share not mounting.
|
|
||||||
- fix ldap sasl reconnect problem.
|
|
||||||
- samples/ldap.schema fix.
|
|
||||||
+- fix configure force shutdown check.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
--- autofs-5.1.6.orig/configure
|
|
||||||
+++ autofs-5.1.6/configure
|
|
||||||
@@ -6379,7 +6379,7 @@ else
|
|
||||||
enableval=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
-if test x$enable_forced_shutdown = xyes -o x$enableval = xyes; then
|
|
||||||
+if test x$enable_force_shutdown = xyes -o x$enableval = xyes; then
|
|
||||||
|
|
||||||
$as_echo "#define ENABLE_FORCED_SHUTDOWN 1" >>confdefs.h
|
|
||||||
|
|
||||||
--- autofs-5.1.6.orig/configure.in
|
|
||||||
+++ autofs-5.1.6/configure.in
|
|
||||||
@@ -404,7 +404,7 @@ AC_ARG_ENABLE(force-shutdown,
|
|
||||||
[ --enable-force-shutdown enable USR1 signal to force unlink umount of any
|
|
||||||
busy mounts during shutdown],,
|
|
||||||
enableval=no)
|
|
||||||
-if test x$enable_forced_shutdown = xyes -o x$enableval = xyes; then
|
|
||||||
+if test x$enable_force_shutdown = xyes -o x$enableval = xyes; then
|
|
||||||
AC_DEFINE(ENABLE_FORCED_SHUTDOWN, 1, [Enable forced shutdown on USR1 signal])
|
|
||||||
fi
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
autofs-5.1.6 - fix double quoting in auto.smb
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
The example program mount script installed to /etc/auto.smb incorrectly
|
|
||||||
adds a quote for the trailing dollar of special Windows mounts. But they
|
|
||||||
are already surrounded by double quotes. This may have been handled by
|
|
||||||
mount.cifs at some point but it's failing now.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
samples/auto.smb | 2 --
|
|
||||||
1 file changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/samples/auto.smb b/samples/auto.smb
|
|
||||||
index 6af5d856..4842b689 100755
|
|
||||||
--- a/samples/auto.smb
|
|
||||||
+++ b/samples/auto.smb
|
|
||||||
@@ -75,8 +75,6 @@ $SMBCLIENT $smbopts -gL "$key" 2>/dev/null| awk -v "key=$key" -v "opts=$opts" -F
|
|
||||||
dir = $2
|
|
||||||
loc = $2
|
|
||||||
# Enclose mount dir and location in quotes
|
|
||||||
- # Double quote "$" in location as it is special
|
|
||||||
- gsub(/\$$/, "\\$", loc);
|
|
||||||
gsub(/\&/,"\\\\&",loc)
|
|
||||||
print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
autofs-5.1.6 - fix double quoting of ampersand in auto.smb as well
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
The example program mount script installed to /etc/auto.smb incorrectly
|
|
||||||
adds a quote for the & character that causes mount failures. But the
|
|
||||||
produced map entry is already surrounded by double quotes. This may have
|
|
||||||
been handled by mount.cifs at some point but it's failing now.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
samples/auto.smb | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/samples/auto.smb b/samples/auto.smb
|
|
||||||
index 4842b689..f6d41d35 100755
|
|
||||||
--- a/samples/auto.smb
|
|
||||||
+++ b/samples/auto.smb
|
|
||||||
@@ -75,7 +75,6 @@ $SMBCLIENT $smbopts -gL "$key" 2>/dev/null| awk -v "key=$key" -v "opts=$opts" -F
|
|
||||||
dir = $2
|
|
||||||
loc = $2
|
|
||||||
# Enclose mount dir and location in quotes
|
|
||||||
- gsub(/\&/,"\\\\&",loc)
|
|
||||||
print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
|
|
||||||
}
|
|
||||||
END { if (!first) print "\n"; else exit 1 }
|
|
@ -1,347 +0,0 @@
|
|||||||
autofs-5.1.6 - fix ldap sasl reconnect problem
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
When performing an ldap sasl connection a two step initialisation
|
|
||||||
was being done in an attempt to partially reuse existing connection
|
|
||||||
setup.
|
|
||||||
|
|
||||||
But if a network connectivity problem occurs the connection can end
|
|
||||||
up only half initialized and recovery after connectivity is restored
|
|
||||||
fails.
|
|
||||||
|
|
||||||
So get rid of the two step initialization, as it's benefit was at best
|
|
||||||
questionable, so that connection attempts either succeed or completely
|
|
||||||
fail. This leaves the connection completely uninitialized if there's a
|
|
||||||
network conectivity problem, ready for a new connection attempt.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1
|
|
||||||
include/lookup_ldap.h | 1
|
|
||||||
modules/cyrus-sasl.c | 131 +++++++++++++++++++++++++-------------------------
|
|
||||||
3 files changed, 68 insertions(+), 65 deletions(-)
|
|
||||||
|
|
||||||
--- autofs-5.1.6.orig/CHANGELOG
|
|
||||||
+++ autofs-5.1.6/CHANGELOG
|
|
||||||
@@ -12,6 +12,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix quoted string length calc in expandsunent().
|
|
||||||
- fix autofs mount options construction.
|
|
||||||
- mount_nfs.c fix local rdma share not mounting.
|
|
||||||
+- fix ldap sasl reconnect problem.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
--- autofs-5.1.6.orig/include/lookup_ldap.h
|
|
||||||
+++ autofs-5.1.6/include/lookup_ldap.h
|
|
||||||
@@ -87,7 +87,6 @@ struct lookup_context {
|
|
||||||
char *secret;
|
|
||||||
char *client_princ;
|
|
||||||
char *client_cc;
|
|
||||||
- int kinit_done;
|
|
||||||
int kinit_successful;
|
|
||||||
#ifdef WITH_SASL
|
|
||||||
/* Kerberos */
|
|
||||||
--- autofs-5.1.6.orig/modules/cyrus-sasl.c
|
|
||||||
+++ autofs-5.1.6/modules/cyrus-sasl.c
|
|
||||||
@@ -396,9 +396,9 @@ do_sasl_bind(unsigned logopt, LDAP *ld,
|
|
||||||
* cache, add the TGT to that cache, and set the environment variable so
|
|
||||||
* that the sasl/krb5 libraries can find our credentials.
|
|
||||||
*
|
|
||||||
- * Returns 0 upon success. ctxt->kinit_done and ctxt->kinit_successful
|
|
||||||
- * are set for cleanup purposes. The krb5 context and ccache entries in
|
|
||||||
- * the lookup_context are also filled in.
|
|
||||||
+ * Returns 0 upon success. ctxt->kinit_successful is set for cleanup
|
|
||||||
+ * purposes. The krb5 context and ccache entries in the lookup_context
|
|
||||||
+ * are also filled in.
|
|
||||||
*
|
|
||||||
* Upon failure, -1 is returned.
|
|
||||||
*/
|
|
||||||
@@ -412,9 +412,16 @@ sasl_do_kinit(unsigned logopt, struct lo
|
|
||||||
const char *realm_name;
|
|
||||||
int status, realm_length;
|
|
||||||
|
|
||||||
- if (ctxt->kinit_done)
|
|
||||||
+ status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
+
|
|
||||||
+ if (ctxt->kinit_successful) {
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
return 0;
|
|
||||||
- ctxt->kinit_done = 1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
debug(logopt,
|
|
||||||
"initializing kerberos ticket: client principal %s",
|
|
||||||
@@ -423,15 +430,14 @@ sasl_do_kinit(unsigned logopt, struct lo
|
|
||||||
ret = krb5_init_context(&ctxt->krb5ctxt);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_init_context failed with %d", ret);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_unlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krb5_cc_resolve(ctxt->krb5ctxt, krb5ccval, &ctxt->krb5_ccache);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_cc_resolve failed with error %d",
|
|
||||||
ret);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_free_context;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctxt->client_princ) {
|
|
||||||
@@ -515,19 +521,11 @@ sasl_do_kinit(unsigned logopt, struct lo
|
|
||||||
goto out_cleanup_unparse;
|
|
||||||
}
|
|
||||||
|
|
||||||
- status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
- if (status)
|
|
||||||
- fatal(status);
|
|
||||||
-
|
|
||||||
if (krb5cc_in_use++ == 0)
|
|
||||||
/* tell the cache what the default principal is */
|
|
||||||
ret = krb5_cc_initialize(ctxt->krb5ctxt,
|
|
||||||
ctxt->krb5_ccache, krb5_client_princ);
|
|
||||||
|
|
||||||
- status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
- if (status)
|
|
||||||
- fatal(status);
|
|
||||||
-
|
|
||||||
if (ret) {
|
|
||||||
error(logopt,
|
|
||||||
"krb5_cc_initialize failed with error %d", ret);
|
|
||||||
@@ -550,6 +548,10 @@ sasl_do_kinit(unsigned logopt, struct lo
|
|
||||||
}
|
|
||||||
ctxt->kinit_successful = 1;
|
|
||||||
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
+
|
|
||||||
debug(logopt, "Kerberos authentication was successful!");
|
|
||||||
|
|
||||||
krb5_free_unparsed_name(ctxt->krb5ctxt, tgs_name);
|
|
||||||
@@ -568,10 +570,6 @@ out_cleanup_unparse:
|
|
||||||
out_cleanup_client_princ:
|
|
||||||
krb5_free_principal(ctxt->krb5ctxt, krb5_client_princ);
|
|
||||||
out_cleanup_cc:
|
|
||||||
- status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
- if (status)
|
|
||||||
- fatal(status);
|
|
||||||
-
|
|
||||||
if (krb5cc_in_use)
|
|
||||||
ret = krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
else
|
|
||||||
@@ -579,22 +577,21 @@ out_cleanup_cc:
|
|
||||||
if (ret)
|
|
||||||
warn(logopt,
|
|
||||||
"krb5_cc_destroy failed with non-fatal error %d", ret);
|
|
||||||
-
|
|
||||||
+out_free_context:
|
|
||||||
+ krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
+out_unlock:
|
|
||||||
status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
if (status)
|
|
||||||
fatal(status);
|
|
||||||
-
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
-
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check a client given external credential cache.
|
|
||||||
*
|
|
||||||
- * Returns 0 upon success. ctxt->kinit_done and ctxt->kinit_successful
|
|
||||||
- * are set for cleanup purposes. The krb5 context and ccache entries in
|
|
||||||
- * the lookup_context are also filled in.
|
|
||||||
+ * Returns 0 upon success. ctxt->kinit_successful is set for cleanup
|
|
||||||
+ * purposes. The krb5 context and ccache entries in the lookup_context
|
|
||||||
+ * are also filled in.
|
|
||||||
*
|
|
||||||
* Upon failure, -1 is returned.
|
|
||||||
*/
|
|
||||||
@@ -605,10 +602,18 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
krb5_principal krb5_client_princ;
|
|
||||||
krb5_error_code ret;
|
|
||||||
char *cc_princ, *client_princ;
|
|
||||||
+ int status;
|
|
||||||
+
|
|
||||||
+ status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
|
|
||||||
- if (ctxt->kinit_done)
|
|
||||||
+ if (ctxt->kinit_successful) {
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
return 0;
|
|
||||||
- ctxt->kinit_done = 1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
debug(logopt,
|
|
||||||
"using external credential cache for auth: client principal %s",
|
|
||||||
@@ -617,33 +622,26 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
ret = krb5_init_context(&ctxt->krb5ctxt);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_init_context failed with %d", ret);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_unlock;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krb5_cc_resolve(ctxt->krb5ctxt, ctxt->client_cc, &ctxt->krb5_ccache);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_cc_resolve failed with error %d",
|
|
||||||
ret);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_cleanup_cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krb5_cc_get_principal(ctxt->krb5ctxt, ctxt->krb5_ccache, &def_princ);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_cc_get_principal failed with error %d", ret);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_cleanup_cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krb5_unparse_name(ctxt->krb5ctxt, def_princ, &cc_princ);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, "krb5_unparse_name failed with error %d", ret);
|
|
||||||
- krb5_free_principal(ctxt->krb5ctxt, def_princ);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_cleanup_def_princ;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(logopt, "external credential cache default principal %s", cc_princ);
|
|
||||||
@@ -666,10 +664,8 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
error(logopt,
|
|
||||||
"krb5_sname_to_principal failed for "
|
|
||||||
"%s with error %d", default_client, ret);
|
|
||||||
- krb5_free_principal(ctxt->krb5ctxt, def_princ);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ krb5_free_unparsed_name(ctxt->krb5ctxt, cc_princ);
|
|
||||||
+ goto out_cleanup_def_princ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -680,10 +676,8 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
"krb5_unparse_name failed with error %d",
|
|
||||||
ret);
|
|
||||||
krb5_free_principal(ctxt->krb5ctxt, krb5_client_princ);
|
|
||||||
- krb5_free_principal(ctxt->krb5ctxt, def_princ);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ krb5_free_unparsed_name(ctxt->krb5ctxt, cc_princ);
|
|
||||||
+ goto out_cleanup_def_princ;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug(logopt,
|
|
||||||
@@ -710,10 +704,7 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
if (!ctxt->client_princ)
|
|
||||||
krb5_free_unparsed_name(ctxt->krb5ctxt, client_princ);
|
|
||||||
krb5_free_unparsed_name(ctxt->krb5ctxt, cc_princ);
|
|
||||||
- krb5_free_principal(ctxt->krb5ctxt, def_princ);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_cleanup_def_princ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ctxt->client_princ)
|
|
||||||
@@ -724,15 +715,24 @@ sasl_do_kinit_ext_cc(unsigned logopt, st
|
|
||||||
/* Set the environment variable to point to the external cred cache */
|
|
||||||
if (setenv(krb5ccenv, ctxt->client_cc, 1) != 0) {
|
|
||||||
error(logopt, "setenv failed with %d", errno);
|
|
||||||
- krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
- krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
- return -1;
|
|
||||||
+ goto out_cleanup_cc;
|
|
||||||
}
|
|
||||||
ctxt->kinit_successful = 1;
|
|
||||||
|
|
||||||
debug(logopt, "Kerberos authentication was successful!");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
+
|
|
||||||
+out_cleanup_def_princ:
|
|
||||||
+ krb5_free_principal(ctxt->krb5ctxt, def_princ);
|
|
||||||
+out_cleanup_cc:
|
|
||||||
+ krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
+ krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
+out_unlock:
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
+ return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -974,11 +974,19 @@ void autofs_sasl_dispose(struct ldap_con
|
|
||||||
{
|
|
||||||
int status, ret;
|
|
||||||
|
|
||||||
+ status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
+
|
|
||||||
if (ctxt->sasl_mech && !strncmp(ctxt->sasl_mech, "EXTERNAL", 8)) {
|
|
||||||
if (conn && conn->ldap) {
|
|
||||||
ldap_unbind_s(conn->ldap);
|
|
||||||
conn->ldap = NULL;
|
|
||||||
+ ctxt->kinit_successful = 0;
|
|
||||||
}
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -988,10 +996,6 @@ void autofs_sasl_dispose(struct ldap_con
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctxt->kinit_successful) {
|
|
||||||
- status = pthread_mutex_lock(&krb5cc_mutex);
|
|
||||||
- if (status)
|
|
||||||
- fatal(status);
|
|
||||||
-
|
|
||||||
if (--krb5cc_in_use || ctxt->client_cc)
|
|
||||||
ret = krb5_cc_close(ctxt->krb5ctxt, ctxt->krb5_ccache);
|
|
||||||
else
|
|
||||||
@@ -1000,19 +1004,18 @@ void autofs_sasl_dispose(struct ldap_con
|
|
||||||
logmsg("krb5_cc_destroy failed with non-fatal error %d",
|
|
||||||
ret);
|
|
||||||
|
|
||||||
- status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
- if (status)
|
|
||||||
- fatal(status);
|
|
||||||
-
|
|
||||||
krb5_free_context(ctxt->krb5ctxt);
|
|
||||||
if (unsetenv(krb5ccenv) != 0)
|
|
||||||
logerr("unsetenv failed with error %d", errno);
|
|
||||||
|
|
||||||
ctxt->krb5ctxt = NULL;
|
|
||||||
ctxt->krb5_ccache = NULL;
|
|
||||||
- ctxt->kinit_done = 0;
|
|
||||||
ctxt->kinit_successful = 0;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ status = pthread_mutex_unlock(&krb5cc_mutex);
|
|
||||||
+ if (status)
|
|
||||||
+ fatal(status);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *sasl_mutex_new(void)
|
|
@ -1,64 +0,0 @@
|
|||||||
autofs-5.1.6 - fix program map multi-mount lookup after mount fail
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
For the case of a singleton multi-mount program map lookup following
|
|
||||||
a mount fail (and the negative timeout has passed) the lookup key is
|
|
||||||
what's expected for an indirect map key but the the root offset map
|
|
||||||
entry already exists. This causes autofs to think it has an incorrect
|
|
||||||
lookup key and it fails the lookup when it should take the opptunity
|
|
||||||
to delete and update the cache entry since it's not actually in use
|
|
||||||
yet.
|
|
||||||
|
|
||||||
If a check is done to see if the lookup is for the root offset,
|
|
||||||
deleting the entry fails because it contains an offset. Later when
|
|
||||||
parsing is done the offset will get updated and can get out of sync
|
|
||||||
with the entry of the multi-mount owner. That's not a problem as the
|
|
||||||
offsets would be deleted on eventual expire but it's best to clean
|
|
||||||
out the entry and start a fresh so the most up to date map entry
|
|
||||||
is being used.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
modules/lookup_program.c | 7 +++++--
|
|
||||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 981a0333..3c784d34 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
xx/xx/2020 autofs-5.1.7
|
|
||||||
- make bind mounts propagation slave by default.
|
|
||||||
- update ldap READMEs and schema definitions.
|
|
||||||
+- fix program map multi-mount lookup after mount fail.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/modules/lookup_program.c b/modules/lookup_program.c
|
|
||||||
index fcb1af74..ca209488 100644
|
|
||||||
--- a/modules/lookup_program.c
|
|
||||||
+++ b/modules/lookup_program.c
|
|
||||||
@@ -646,7 +646,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
|
|
||||||
name_len, ent, ctxt->parse->context);
|
|
||||||
goto out_free;
|
|
||||||
} else {
|
|
||||||
- if (me->multi) {
|
|
||||||
+ if (me->multi && me->multi != me) {
|
|
||||||
cache_unlock(mc);
|
|
||||||
warn(ap->logopt, MODPREFIX
|
|
||||||
"unexpected lookup for active multi-mount"
|
|
||||||
@@ -656,8 +656,11 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
|
|
||||||
cache_unlock(mc);
|
|
||||||
cache_writelock(mc);
|
|
||||||
me = cache_lookup_distinct(mc, name);
|
|
||||||
- if (me)
|
|
||||||
+ if (me) {
|
|
||||||
+ if (me->multi)
|
|
||||||
+ cache_delete_offset_list(mc, name);
|
|
||||||
cache_delete(mc, name);
|
|
||||||
+ }
|
|
||||||
cache_unlock(mc);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
autofs-5.1.6 - fix quoted string length calc in expandsunent()
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
The expandsunent() function in modules/parse_sun.c fails to properly
|
|
||||||
handle the ending " in a quoted string causing the length calculation
|
|
||||||
to not account for the ending quote and also doesn't properly account
|
|
||||||
for the remainder of the string being expanded.
|
|
||||||
|
|
||||||
Also, when called again (after being called to get the length) the
|
|
||||||
allocated buffer is too small leading to out of bounds accesses.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
modules/parse_sun.c | 6 ++++--
|
|
||||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 2c500a48..90f67336 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -9,6 +9,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- remove intr hosts map mount option.
|
|
||||||
- fix trailing dollar sun entry expansion.
|
|
||||||
- initialize struct addrinfo for getaddrinfo() calls.
|
|
||||||
+- fix quoted string length calc in expandsunent().
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
|
|
||||||
index f6c22d15..80fdf476 100644
|
|
||||||
--- a/modules/parse_sun.c
|
|
||||||
+++ b/modules/parse_sun.c
|
|
||||||
@@ -213,9 +213,11 @@ int expandsunent(const char *src, char *dst, const char *key,
|
|
||||||
*dst++ = *src;
|
|
||||||
src++;
|
|
||||||
}
|
|
||||||
- if (*src && dst) {
|
|
||||||
+ if (*src) {
|
|
||||||
len++;
|
|
||||||
- *dst++ = *src++;
|
|
||||||
+ if (dst)
|
|
||||||
+ *dst++ = *src;
|
|
||||||
+ src++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
autofs-5.1.6 - fix trailing dollar sun entry expansion
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
In modules/parse_sun.c:expandsunent() if we see "$ " or "$<NULL>" in
|
|
||||||
the entry it can't be a macro, and the value can't be quoted since '\'
|
|
||||||
and '"' cases are handled seperately in the swicth, so treat the
|
|
||||||
character as a valid entry character.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
modules/parse_sun.c | 12 ++++++++++++
|
|
||||||
2 files changed, 13 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index fa5992aa..07a85cde 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -7,6 +7,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- correct fsf address.
|
|
||||||
- samples: fix Makefile targets' directory dependencies
|
|
||||||
- remove intr hosts map mount option.
|
|
||||||
+- fix trailing dollar sun entry expansion.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
|
|
||||||
index 71867ef1..f6c22d15 100644
|
|
||||||
--- a/modules/parse_sun.c
|
|
||||||
+++ b/modules/parse_sun.c
|
|
||||||
@@ -161,6 +161,18 @@ int expandsunent(const char *src, char *dst, const char *key,
|
|
||||||
}
|
|
||||||
src = p + 1;
|
|
||||||
} else {
|
|
||||||
+ /* If the '$' is folloed by a space or NULL it
|
|
||||||
+ * can't be a macro, and the value can't be
|
|
||||||
+ * quoted since '\' and '"' cases are handled
|
|
||||||
+ * in other cases, so treat the $ as a valid
|
|
||||||
+ * map entry character.
|
|
||||||
+ */
|
|
||||||
+ if (isblank(*src) || !*src) {
|
|
||||||
+ if (dst)
|
|
||||||
+ *dst++ = ch;
|
|
||||||
+ len++;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
p = src;
|
|
||||||
while (isalnum(*p) || *p == '_')
|
|
||||||
p++;
|
|
@ -1,116 +0,0 @@
|
|||||||
autofs-5.1.6 - initialize struct addrinfo for getaddrinfo() calls
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
The getaddrinfo() call may have become more fussy about initialization
|
|
||||||
of the passed in struct addrinfo that receives the results.
|
|
||||||
|
|
||||||
It's good practice to initialize it prior to the gataddrinfo() call just
|
|
||||||
in case.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
lib/parse_subs.c | 1 +
|
|
||||||
lib/rpc_subs.c | 1 +
|
|
||||||
modules/dclist.c | 1 +
|
|
||||||
modules/parse_amd.c | 3 +++
|
|
||||||
modules/replicated.c | 2 ++
|
|
||||||
6 files changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 07a85cde..2c500a48 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -8,6 +8,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- samples: fix Makefile targets' directory dependencies
|
|
||||||
- remove intr hosts map mount option.
|
|
||||||
- fix trailing dollar sun entry expansion.
|
|
||||||
+- initialize struct addrinfo for getaddrinfo() calls.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/lib/parse_subs.c b/lib/parse_subs.c
|
|
||||||
index cdda2e1a..0ee00d51 100644
|
|
||||||
--- a/lib/parse_subs.c
|
|
||||||
+++ b/lib/parse_subs.c
|
|
||||||
@@ -475,6 +475,7 @@ unsigned int get_network_proximity(const char *name)
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME;
|
|
||||||
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(name_or_num, NULL, &hints, &ni);
|
|
||||||
if (ret) {
|
|
||||||
logerr("hostname lookup for %s failed: %s",
|
|
||||||
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
|
||||||
index 8b23627a..643b7687 100644
|
|
||||||
--- a/lib/rpc_subs.c
|
|
||||||
+++ b/lib/rpc_subs.c
|
|
||||||
@@ -691,6 +691,7 @@ static int create_client(struct conn_info *info, CLIENT **client)
|
|
||||||
else
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
|
|
||||||
+ ai = NULL;
|
|
||||||
ret = getaddrinfo(info->host, NULL, &hints, &ai);
|
|
||||||
if (ret) {
|
|
||||||
error(LOGOPT_ANY,
|
|
||||||
diff --git a/modules/dclist.c b/modules/dclist.c
|
|
||||||
index ba32134d..c34c3a91 100644
|
|
||||||
--- a/modules/dclist.c
|
|
||||||
+++ b/modules/dclist.c
|
|
||||||
@@ -355,6 +355,7 @@ static char *getdnsdomainname(unsigned int logopt)
|
|
||||||
hints.ai_family = AF_UNSPEC;
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(name, NULL, &hints, &ni);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt,
|
|
||||||
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
|
|
||||||
index d8b9ea24..943a48b6 100644
|
|
||||||
--- a/modules/parse_amd.c
|
|
||||||
+++ b/modules/parse_amd.c
|
|
||||||
@@ -269,6 +269,7 @@ static int match_my_name(struct autofs_point *ap, const char *name, struct subst
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
|
|
||||||
/* Get host canonical name */
|
|
||||||
+ cni = NULL;
|
|
||||||
ret = getaddrinfo(v->val, NULL, &hints, &cni);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, MODPREFIX
|
|
||||||
@@ -280,6 +281,7 @@ static int match_my_name(struct autofs_point *ap, const char *name, struct subst
|
|
||||||
hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME;
|
|
||||||
|
|
||||||
/* Resolve comparison name to its names and compare */
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(exp_name, NULL, &hints, &ni);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, MODPREFIX
|
|
||||||
@@ -775,6 +777,7 @@ static char *normalize_hostname(unsigned int logopt, const char *host,
|
|
||||||
hints.ai_family = AF_UNSPEC;
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(host, NULL, &hints, &ni);
|
|
||||||
if (ret) {
|
|
||||||
error(logopt, MODPREFIX
|
|
||||||
diff --git a/modules/replicated.c b/modules/replicated.c
|
|
||||||
index 91fce882..03d4ba1e 100644
|
|
||||||
--- a/modules/replicated.c
|
|
||||||
+++ b/modules/replicated.c
|
|
||||||
@@ -982,6 +982,7 @@ static int add_host_addrs(struct host **list, const char *host, int ent_num,
|
|
||||||
hints.ai_family = AF_UNSPEC;
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(name, NULL, &hints, &ni);
|
|
||||||
if (ret)
|
|
||||||
goto try_name;
|
|
||||||
@@ -1002,6 +1003,7 @@ try_name:
|
|
||||||
hints.ai_family = AF_UNSPEC;
|
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
|
||||||
|
|
||||||
+ ni = NULL;
|
|
||||||
ret = getaddrinfo(name, NULL, &hints, &ni);
|
|
||||||
if (ret) {
|
|
||||||
error(LOGOPT_ANY,
|
|
@ -1,52 +0,0 @@
|
|||||||
autofs-5.1.6 - samples/ldap.schema fix
|
|
||||||
|
|
||||||
From: Michael Peek <peek@nimbios.org>
|
|
||||||
|
|
||||||
This bug starts with version 5.1.3, and continues up to and including
|
|
||||||
the latest 5.1.6. Version 5.1.2 was fine.
|
|
||||||
|
|
||||||
When slapd is invoked while including the sample LDAP schema file
|
|
||||||
autofs.schema, slapd will crash with the following error:
|
|
||||||
|
|
||||||
5f359370 /<path-to>/autofs.schema: line 14 attributetype:
|
|
||||||
AttributeType inappropriate matching rule: "caseExactMatch"
|
|
||||||
|
|
||||||
The problem is on line 13, which reads:
|
|
||||||
|
|
||||||
EQUALITY caseExactMatch
|
|
||||||
|
|
||||||
It should read:
|
|
||||||
|
|
||||||
EQUALITY caseExactIA5Match
|
|
||||||
|
|
||||||
Attached is a patch that will make the necessary change to
|
|
||||||
samples/autofs.schema that works for all versions 5.1.3 to 5.1.6.
|
|
||||||
|
|
||||||
Signed-off-by: Michael Peek <peek@nimbios.org>
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
samples/autofs.schema | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- autofs-5.1.6.orig/CHANGELOG
|
|
||||||
+++ autofs-5.1.6/CHANGELOG
|
|
||||||
@@ -13,6 +13,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix autofs mount options construction.
|
|
||||||
- mount_nfs.c fix local rdma share not mounting.
|
|
||||||
- fix ldap sasl reconnect problem.
|
|
||||||
+- samples/ldap.schema fix.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
--- autofs-5.1.6.orig/samples/autofs.schema
|
|
||||||
+++ autofs-5.1.6/samples/autofs.schema
|
|
||||||
@@ -10,7 +10,7 @@
|
|
||||||
|
|
||||||
attributetype ( 1.3.6.1.4.1.2312.4.1.2 NAME 'automountInformation'
|
|
||||||
DESC 'Information used by the autofs automounter'
|
|
||||||
- EQUALITY caseExactMatch
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
|
|
||||||
|
|
||||||
objectclass ( 1.3.6.1.4.1.2312.4.2.3 NAME 'automount' SUP top STRUCTURAL
|
|
@ -1,262 +0,0 @@
|
|||||||
autofs-5.1.6 - make bind mounts propagation slave by default
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
Make setting mount propagation on bind mounts mandatory with a default
|
|
||||||
of propagation slave.
|
|
||||||
|
|
||||||
When using multi-mounts that have bind mounts the bind mount will have
|
|
||||||
the same properties as its parent which is commonly propagation shared.
|
|
||||||
And if the mount target is also propagation shared this can lead to a
|
|
||||||
deadlock when attempting to access the offset mounts. When this happens
|
|
||||||
an unwanted offset mount is propagated back to the target file system
|
|
||||||
resulting in a deadlock since the automount target is itself an
|
|
||||||
(unwanted) automount trigger.
|
|
||||||
|
|
||||||
This problem has been present much longer than I originally thought,
|
|
||||||
perhaps since mount propagation was introduced into the kernel, so
|
|
||||||
explicitly setting bind mount propagation is the sensible thing to do.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 3 +++
|
|
||||||
include/automount.h | 9 +++++----
|
|
||||||
lib/master_parse.y | 29 +++++++++++++++++------------
|
|
||||||
lib/master_tok.l | 1 +
|
|
||||||
man/auto.master.5.in | 19 ++++++++++---------
|
|
||||||
modules/mount_bind.c | 40 ++++++++++++++++++++++------------------
|
|
||||||
6 files changed, 58 insertions(+), 43 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 847a9b01..f5a1a0e3 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -1,3 +1,6 @@
|
|
||||||
+xx/xx/2020 autofs-5.1.7
|
|
||||||
+- make bind mounts propagation slave by default.
|
|
||||||
+
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
- fix hesiod string check in master_parse().
|
|
||||||
diff --git a/include/automount.h b/include/automount.h
|
|
||||||
index 4fd0ba96..fe9c7fee 100644
|
|
||||||
--- a/include/automount.h
|
|
||||||
+++ b/include/automount.h
|
|
||||||
@@ -551,14 +551,15 @@ struct kernel_mod_version {
|
|
||||||
#define MOUNT_FLAG_AMD_CACHE_ALL 0x0080
|
|
||||||
|
|
||||||
/* Set mount propagation for bind mounts */
|
|
||||||
-#define MOUNT_FLAG_SLAVE 0x0100
|
|
||||||
-#define MOUNT_FLAG_PRIVATE 0x0200
|
|
||||||
+#define MOUNT_FLAG_SHARED 0x0100
|
|
||||||
+#define MOUNT_FLAG_SLAVE 0x0200
|
|
||||||
+#define MOUNT_FLAG_PRIVATE 0x0400
|
|
||||||
|
|
||||||
/* Use strict expire semantics if requested and kernel supports it */
|
|
||||||
-#define MOUNT_FLAG_STRICTEXPIRE 0x0400
|
|
||||||
+#define MOUNT_FLAG_STRICTEXPIRE 0x0800
|
|
||||||
|
|
||||||
/* Indicator for applications to ignore the mount entry */
|
|
||||||
-#define MOUNT_FLAG_IGNORE 0x0800
|
|
||||||
+#define MOUNT_FLAG_IGNORE 0x1000
|
|
||||||
|
|
||||||
struct autofs_point {
|
|
||||||
pthread_t thid;
|
|
||||||
diff --git a/lib/master_parse.y b/lib/master_parse.y
|
|
||||||
index f817f739..08e44b57 100644
|
|
||||||
--- a/lib/master_parse.y
|
|
||||||
+++ b/lib/master_parse.y
|
|
||||||
@@ -59,8 +59,6 @@ static long timeout;
|
|
||||||
static long negative_timeout;
|
|
||||||
static unsigned symlnk;
|
|
||||||
static unsigned strictexpire;
|
|
||||||
-static unsigned slave;
|
|
||||||
-static unsigned private;
|
|
||||||
static unsigned nobind;
|
|
||||||
static unsigned ghost;
|
|
||||||
extern unsigned global_selection_options;
|
|
||||||
@@ -72,6 +70,14 @@ static int tmp_argc;
|
|
||||||
static char **local_argv;
|
|
||||||
static int local_argc;
|
|
||||||
|
|
||||||
+#define PROPAGATION_SHARED MOUNT_FLAG_SHARED
|
|
||||||
+#define PROPAGATION_SLAVE MOUNT_FLAG_SLAVE
|
|
||||||
+#define PROPAGATION_PRIVATE MOUNT_FLAG_PRIVATE
|
|
||||||
+#define PROPAGATION_MASK (MOUNT_FLAG_SHARED | \
|
|
||||||
+ MOUNT_FLAG_SLAVE | \
|
|
||||||
+ MOUNT_FLAG_PRIVATE)
|
|
||||||
+static unsigned int propagation;
|
|
||||||
+
|
|
||||||
static char errstr[MAX_ERR_LEN];
|
|
||||||
|
|
||||||
static unsigned int verbose;
|
|
||||||
@@ -106,7 +112,7 @@ static int master_fprintf(FILE *, char *, ...);
|
|
||||||
%token MAP
|
|
||||||
%token OPT_TIMEOUT OPT_NTIMEOUT OPT_NOBIND OPT_NOGHOST OPT_GHOST OPT_VERBOSE
|
|
||||||
%token OPT_DEBUG OPT_RANDOM OPT_USE_WEIGHT OPT_SYMLINK OPT_MODE
|
|
||||||
-%token OPT_STRICTEXPIRE OPT_SLAVE OPT_PRIVATE
|
|
||||||
+%token OPT_STRICTEXPIRE OPT_SHARED OPT_SLAVE OPT_PRIVATE
|
|
||||||
%token COLON COMMA NL DDASH
|
|
||||||
%type <strtype> map
|
|
||||||
%type <strtype> options
|
|
||||||
@@ -208,6 +214,7 @@ line:
|
|
||||||
| PATH OPT_TIMEOUT { master_notify($1); YYABORT; }
|
|
||||||
| PATH OPT_SYMLINK { master_notify($1); YYABORT; }
|
|
||||||
| PATH OPT_STRICTEXPIRE { master_notify($1); YYABORT; }
|
|
||||||
+ | PATH OPT_SHARED { master_notify($1); YYABORT; }
|
|
||||||
| PATH OPT_SLAVE { master_notify($1); YYABORT; }
|
|
||||||
| PATH OPT_PRIVATE { master_notify($1); YYABORT; }
|
|
||||||
| PATH OPT_NOBIND { master_notify($1); YYABORT; }
|
|
||||||
@@ -622,8 +629,9 @@ daemon_option: OPT_TIMEOUT NUMBER { timeout = $2; }
|
|
||||||
| OPT_NTIMEOUT NUMBER { negative_timeout = $2; }
|
|
||||||
| OPT_SYMLINK { symlnk = 1; }
|
|
||||||
| OPT_STRICTEXPIRE { strictexpire = 1; }
|
|
||||||
- | OPT_SLAVE { slave = 1; }
|
|
||||||
- | OPT_PRIVATE { private = 1; }
|
|
||||||
+ | OPT_SHARED { propagation = PROPAGATION_SHARED; }
|
|
||||||
+ | OPT_SLAVE { propagation = PROPAGATION_SLAVE; }
|
|
||||||
+ | OPT_PRIVATE { propagation = PROPAGATION_PRIVATE; }
|
|
||||||
| OPT_NOBIND { nobind = 1; }
|
|
||||||
| OPT_NOGHOST { ghost = 0; }
|
|
||||||
| OPT_GHOST { ghost = 1; }
|
|
||||||
@@ -697,8 +705,7 @@ static void local_init_vars(void)
|
|
||||||
negative_timeout = 0;
|
|
||||||
symlnk = 0;
|
|
||||||
strictexpire = 0;
|
|
||||||
- slave = 0;
|
|
||||||
- private = 0;
|
|
||||||
+ propagation = PROPAGATION_SLAVE;
|
|
||||||
nobind = 0;
|
|
||||||
ghost = defaults_get_browse_mode();
|
|
||||||
random_selection = global_selection_options & MOUNT_FLAG_RANDOM_SELECT;
|
|
||||||
@@ -888,7 +895,6 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne
|
|
||||||
ghost = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
if (!entry->ap) {
|
|
||||||
ret = master_add_autofs_point(entry, logopt, nobind, ghost, 0);
|
|
||||||
if (!ret) {
|
|
||||||
@@ -899,6 +905,9 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ entry->ap->flags &= ~(PROPAGATION_MASK);
|
|
||||||
+ entry->ap->flags |= propagation;
|
|
||||||
+
|
|
||||||
if (random_selection)
|
|
||||||
entry->ap->flags |= MOUNT_FLAG_RANDOM_SELECT;
|
|
||||||
if (use_weight)
|
|
||||||
@@ -907,10 +916,6 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne
|
|
||||||
entry->ap->flags |= MOUNT_FLAG_SYMLINK;
|
|
||||||
if (strictexpire)
|
|
||||||
entry->ap->flags |= MOUNT_FLAG_STRICTEXPIRE;
|
|
||||||
- if (slave)
|
|
||||||
- entry->ap->flags |= MOUNT_FLAG_SLAVE;
|
|
||||||
- if (private)
|
|
||||||
- entry->ap->flags |= MOUNT_FLAG_PRIVATE;
|
|
||||||
if (negative_timeout)
|
|
||||||
entry->ap->negative_timeout = negative_timeout;
|
|
||||||
if (mode && mode < LONG_MAX)
|
|
||||||
diff --git a/lib/master_tok.l b/lib/master_tok.l
|
|
||||||
index 7486710b..87a6b958 100644
|
|
||||||
--- a/lib/master_tok.l
|
|
||||||
+++ b/lib/master_tok.l
|
|
||||||
@@ -389,6 +389,7 @@ MODE (--mode{OPTWS}|--mode{OPTWS}={OPTWS})
|
|
||||||
-?symlink { return(OPT_SYMLINK); }
|
|
||||||
-?nobind { return(OPT_NOBIND); }
|
|
||||||
-?nobrowse { return(OPT_NOGHOST); }
|
|
||||||
+ -?shared { return(OPT_SHARED); }
|
|
||||||
-?slave { return(OPT_SLAVE); }
|
|
||||||
-?private { return(OPT_PRIVATE); }
|
|
||||||
-?strictexpire { return(OPT_STRICTEXPIRE); }
|
|
||||||
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
|
|
||||||
index 6e510a59..2a0b672a 100644
|
|
||||||
--- a/man/auto.master.5.in
|
|
||||||
+++ b/man/auto.master.5.in
|
|
||||||
@@ -208,17 +208,18 @@ applications scanning the mount tree. Note that this doesn't completely
|
|
||||||
resolve the problem of expired automounts being immediately re-mounted
|
|
||||||
due to application accesses triggered by the expire itself.
|
|
||||||
.TP
|
|
||||||
-.I slave \fPor\fI private
|
|
||||||
+.I slave\fP, \fIprivate\fP or \fIshared\fP
|
|
||||||
This option allows mount propagation of bind mounts to be set to
|
|
||||||
-either \fIslave\fP or \fIprivate\fP. This option may be needed when using
|
|
||||||
-multi-mounts that have bind mounts that bind to a file system that is
|
|
||||||
-propagation shared. This is because the bind mount will have the same
|
|
||||||
-properties as its target which causes problems for offset mounts. When
|
|
||||||
-this happens an unwanted offset mount is propagated back to the target
|
|
||||||
-file system resulting in a deadlock when attempting to access the offset.
|
|
||||||
+\fIslave\fP, \fIprivate\fP or \fIshared\fP. This option defaults to
|
|
||||||
+\fIslave\fP if no option is given. When using multi-mounts that have
|
|
||||||
+bind mounts the bind mount will have the same properties as its parent
|
|
||||||
+which is commonly propagation \fIshared\fP. And if the mount target is
|
|
||||||
+also propagation \fIshared\fP this can lead to a deadlock when attempting
|
|
||||||
+to access the offset mounts. When this happens an unwanted offset mount
|
|
||||||
+is propagated back to the target file system resulting in a deadlock
|
|
||||||
+since the automount target is itself an (unwanted) automount trigger.
|
|
||||||
This option is an autofs pseudo mount option that can be used in the
|
|
||||||
-master map only. By default, bind mounts will inherit the mount propagation
|
|
||||||
-of the target file system.
|
|
||||||
+master map only.
|
|
||||||
.TP
|
|
||||||
.I "\-r, \-\-random-multimount-selection"
|
|
||||||
Enables the use of random selection when choosing a host from a
|
|
||||||
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
|
|
||||||
index 9cba0d7a..5253501c 100644
|
|
||||||
--- a/modules/mount_bind.c
|
|
||||||
+++ b/modules/mount_bind.c
|
|
||||||
@@ -153,6 +153,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
|
||||||
|
|
||||||
if (!symlnk && bind_works) {
|
|
||||||
int status, existed = 1;
|
|
||||||
+ int flags;
|
|
||||||
|
|
||||||
debug(ap->logopt, MODPREFIX "calling mkdir_path %s", fullpath);
|
|
||||||
|
|
||||||
@@ -190,24 +191,27 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
|
||||||
what, fstype, fullpath);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (ap->flags & (MOUNT_FLAG_SLAVE | MOUNT_FLAG_PRIVATE)) {
|
|
||||||
- int flags = MS_SLAVE;
|
|
||||||
-
|
|
||||||
- if (ap->flags & MOUNT_FLAG_PRIVATE)
|
|
||||||
- flags = MS_PRIVATE;
|
|
||||||
-
|
|
||||||
- /* The bind mount has succeeded but if the target
|
|
||||||
- * mount is propagation shared propagation of child
|
|
||||||
- * mounts (autofs offset mounts for example) back to
|
|
||||||
- * the target of the bind mount must be avoided or
|
|
||||||
- * autofs trigger mounts will deadlock.
|
|
||||||
- */
|
|
||||||
- err = mount(NULL, fullpath, NULL, flags, NULL);
|
|
||||||
- if (err) {
|
|
||||||
- warn(ap->logopt,
|
|
||||||
- "failed to set propagation for %s",
|
|
||||||
- fullpath, root);
|
|
||||||
- }
|
|
||||||
+ /* The bind mount has succeeded, now set the mount propagation.
|
|
||||||
+ *
|
|
||||||
+ * The default is propagation shared, change it if the master
|
|
||||||
+ * map entry has a different option specified.
|
|
||||||
+ */
|
|
||||||
+ flags = MS_SLAVE;
|
|
||||||
+ if (ap->flags & MOUNT_FLAG_PRIVATE)
|
|
||||||
+ flags = MS_PRIVATE;
|
|
||||||
+ else if (ap->flags & MOUNT_FLAG_SHARED)
|
|
||||||
+ flags = MS_SHARED;
|
|
||||||
+
|
|
||||||
+ /* Note: If the parent mount is propagation shared propagation
|
|
||||||
+ * of child mounts (autofs offset mounts for example) back to
|
|
||||||
+ * the target of the bind mount can happen in some cases and
|
|
||||||
+ * must be avoided or autofs trigger mounts will deadlock.
|
|
||||||
+ */
|
|
||||||
+ err = mount(NULL, fullpath, NULL, flags, NULL);
|
|
||||||
+ if (err) {
|
|
||||||
+ warn(ap->logopt,
|
|
||||||
+ "failed to set propagation for %s",
|
|
||||||
+ fullpath, root);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
@ -1,54 +0,0 @@
|
|||||||
autofs-5.1.6 - mount_nfs.c fix local rdma share not mounting
|
|
||||||
|
|
||||||
From: Achilles Gaikwad <agaikwad@redhat.com>
|
|
||||||
|
|
||||||
When using the same system as nfs-server and nfs-client, and
|
|
||||||
using `nobind` option for autofs we would fall to the code where
|
|
||||||
we let `mount.nfs(8)` to handle the mount. However, when the
|
|
||||||
nfs-server and the nfs-client is the same system we end up calling
|
|
||||||
`rpc_ping` which gives negative return code. Due to this we fall to
|
|
||||||
the label next: and never attempt a mount of nfs share.
|
|
||||||
This patch fixes this BUG by not probing rpc_ping if we're
|
|
||||||
using rdma.
|
|
||||||
|
|
||||||
Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
modules/mount_nfs.c | 11 ++++++++---
|
|
||||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 2565b04d..4dc1b179 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -11,6 +11,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- initialize struct addrinfo for getaddrinfo() calls.
|
|
||||||
- fix quoted string length calc in expandsunent().
|
|
||||||
- fix autofs mount options construction.
|
|
||||||
+- mount_nfs.c fix local rdma share not mounting.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
|
|
||||||
index 4e3e703f..f1b3fb3a 100644
|
|
||||||
--- a/modules/mount_nfs.c
|
|
||||||
+++ b/modules/mount_nfs.c
|
|
||||||
@@ -375,9 +375,14 @@ dont_probe:
|
|
||||||
*/
|
|
||||||
if (this->proximity == PROXIMITY_LOCAL) {
|
|
||||||
char *host = this->name ? this->name : "localhost";
|
|
||||||
- int ret;
|
|
||||||
-
|
|
||||||
- ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT);
|
|
||||||
+ int ret = 1;
|
|
||||||
+
|
|
||||||
+ /* If we're using RDMA, rpc_ping will fail when
|
|
||||||
+ * nfs-server is local. Therefore, don't probe
|
|
||||||
+ * when we're using RDMA.
|
|
||||||
+ */
|
|
||||||
+ if(!rdma)
|
|
||||||
+ ret = rpc_ping(host, port, vers, 2, 0, RPC_CLOSE_DEFAULT);
|
|
||||||
if (ret <= 0)
|
|
||||||
goto next;
|
|
||||||
}
|
|
@ -1,125 +0,0 @@
|
|||||||
autofs-5.1.6 - remove intr hosts map mount option
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
Don't use the intr option on NFS mounts by default, it's been ignored
|
|
||||||
by the kernel for a long time now.
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
man/auto.master.5.in | 4 ++--
|
|
||||||
man/autofs.5 | 4 ++--
|
|
||||||
modules/parse_sun.c | 9 +++------
|
|
||||||
samples/auto.misc | 2 +-
|
|
||||||
samples/auto.net | 2 +-
|
|
||||||
6 files changed, 10 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index 106b811c..fa5992aa 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -6,6 +6,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix a regression with map instance lookup.
|
|
||||||
- correct fsf address.
|
|
||||||
- samples: fix Makefile targets' directory dependencies
|
|
||||||
+- remove intr hosts map mount option.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
|
|
||||||
index 2a0b672a..72fbfd23 100644
|
|
||||||
--- a/man/auto.master.5.in
|
|
||||||
+++ b/man/auto.master.5.in
|
|
||||||
@@ -262,8 +262,8 @@ For example, with an entry in the master map of
|
|
||||||
accessing /net/myserver will mount exports from myserver on directories below
|
|
||||||
/net/myserver.
|
|
||||||
.P
|
|
||||||
-NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev,intr" options
|
|
||||||
-unless overridden by explicitly specifying the "suid", "dev" or "nointr" options in the
|
|
||||||
+NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev" options
|
|
||||||
+unless overridden by explicitly specifying the "suid", "dev" options in the
|
|
||||||
master map entry.
|
|
||||||
.SH LDAP MAPS
|
|
||||||
If the map type \fBldap\fP is specified the mapname is of the form
|
|
||||||
diff --git a/man/autofs.5 b/man/autofs.5
|
|
||||||
index d32e772e..569a2683 100644
|
|
||||||
--- a/man/autofs.5
|
|
||||||
+++ b/man/autofs.5
|
|
||||||
@@ -86,13 +86,13 @@ Indirect map:
|
|
||||||
.RS +.2i
|
|
||||||
.ta 1.0i 3.0i
|
|
||||||
.nf
|
|
||||||
-kernel \-ro,soft,intr ftp.kernel.org:/pub/linux
|
|
||||||
+kernel \-ro,soft ftp.kernel.org:/pub/linux
|
|
||||||
boot \-fstype=ext2 :/dev/hda1
|
|
||||||
windoze \-fstype=smbfs ://windoze/c
|
|
||||||
removable \-fstype=ext2 :/dev/hdd
|
|
||||||
cd \-fstype=iso9660,ro :/dev/hdc
|
|
||||||
floppy \-fstype=auto :/dev/fd0
|
|
||||||
-server \-rw,hard,intr / \-ro myserver.me.org:/ \\
|
|
||||||
+server \-rw,hard / \-ro myserver.me.org:/ \\
|
|
||||||
/usr myserver.me.org:/usr \\
|
|
||||||
/home myserver.me.org:/home
|
|
||||||
.fi
|
|
||||||
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
|
|
||||||
index 88dde0b2..71867ef1 100644
|
|
||||||
--- a/modules/parse_sun.c
|
|
||||||
+++ b/modules/parse_sun.c
|
|
||||||
@@ -618,10 +618,9 @@ static int sun_mount(struct autofs_point *ap, const char *root,
|
|
||||||
int len = strlen(options);
|
|
||||||
int suid = strstr(options, "suid") ? 0 : 7;
|
|
||||||
int dev = strstr(options, "dev") ? 0 : 6;
|
|
||||||
- int nointr = strstr(options, "nointr") ? 0 : 5;
|
|
||||||
|
|
||||||
- if (suid || dev || nointr) {
|
|
||||||
- char *tmp = alloca(len + suid + dev + nointr + 1);
|
|
||||||
+ if (suid || dev) {
|
|
||||||
+ char *tmp = alloca(len + suid + dev + 1);
|
|
||||||
if (!tmp) {
|
|
||||||
error(ap->logopt, MODPREFIX
|
|
||||||
"alloca failed for options");
|
|
||||||
@@ -635,8 +634,6 @@ static int sun_mount(struct autofs_point *ap, const char *root,
|
|
||||||
strcat(tmp, ",nosuid");
|
|
||||||
if (dev)
|
|
||||||
strcat(tmp, ",nodev");
|
|
||||||
- if (nointr)
|
|
||||||
- strcat(tmp, ",intr");
|
|
||||||
options = tmp;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
@@ -648,7 +645,7 @@ static int sun_mount(struct autofs_point *ap, const char *root,
|
|
||||||
return -1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
- strcpy(tmp, "nosuid,nodev,intr");
|
|
||||||
+ strcpy(tmp, "nosuid,nodev");
|
|
||||||
options = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/samples/auto.misc b/samples/auto.misc
|
|
||||||
index 0ee5e75f..fdda0e73 100644
|
|
||||||
--- a/samples/auto.misc
|
|
||||||
+++ b/samples/auto.misc
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
|
|
||||||
|
|
||||||
# the following entries are samples to pique your imagination
|
|
||||||
-#linux -ro,soft,intr ftp.example.org:/pub/linux
|
|
||||||
+#linux -ro,soft ftp.example.org:/pub/linux
|
|
||||||
#boot -fstype=ext2 :/dev/hda1
|
|
||||||
#floppy -fstype=auto :/dev/fd0
|
|
||||||
#floppy -fstype=ext2 :/dev/fd0
|
|
||||||
diff --git a/samples/auto.net b/samples/auto.net
|
|
||||||
index 0384f611..c5b145d5 100755
|
|
||||||
--- a/samples/auto.net
|
|
||||||
+++ b/samples/auto.net
|
|
||||||
@@ -9,7 +9,7 @@ key="$1"
|
|
||||||
|
|
||||||
# add "nosymlink" here if you want to suppress symlinking local filesystems
|
|
||||||
# add "nonstrict" to make it OK for some filesystems to not mount
|
|
||||||
-opts="-fstype=nfs,hard,intr,nodev,nosuid"
|
|
||||||
+opts="-fstype=nfs,hard,nodev,nosuid"
|
|
||||||
|
|
||||||
for P in /bin /sbin /usr/bin /usr/sbin
|
|
||||||
do
|
|
@ -1,885 +0,0 @@
|
|||||||
autofs-5.1.6 - update ldap READMEs and schema definitions
|
|
||||||
|
|
||||||
From: Ian Kent <raven@themaw.net>
|
|
||||||
|
|
||||||
The autofs schema in samples/autofs.schema should not be used for
|
|
||||||
autofs map information, it's very old and may be inaccurate or may
|
|
||||||
conflict with other schema definitions included in LDAP server
|
|
||||||
distributions.
|
|
||||||
|
|
||||||
The README.autofs-schema has been updated to alert people to this
|
|
||||||
but the schema file has not yet been removed.
|
|
||||||
|
|
||||||
A new README.ldap-schema has been added which recommends using either
|
|
||||||
of rfc2307 or rfc2307bis schema for autofs Sun format map information
|
|
||||||
stored in LDAP and at least one of these schema should be included in
|
|
||||||
LDAP server distributions. Additionally the README notes the schema
|
|
||||||
that needs to be used for autofs amd format maps is present in the
|
|
||||||
file samples/am-utils-ldap.schema.
|
|
||||||
|
|
||||||
Ian
|
|
||||||
|
|
||||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1
|
|
||||||
README.autofs-schema | 8 -
|
|
||||||
README.ldap-schema | 14 ++
|
|
||||||
autofs.spec | 3
|
|
||||||
samples/am-utils-ldap-id.txt | 360 ++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
samples/am-utils-ldap.schema | 52 ++++++
|
|
||||||
samples/rfc2307.schema | 37 ++++
|
|
||||||
samples/rfc2307bis.schema | 310 ++++++++++++++++++++++++++++++++++++
|
|
||||||
8 files changed, 780 insertions(+), 5 deletions(-)
|
|
||||||
create mode 100644 README.ldap-schema
|
|
||||||
create mode 100644 samples/am-utils-ldap-id.txt
|
|
||||||
create mode 100644 samples/am-utils-ldap.schema
|
|
||||||
create mode 100644 samples/rfc2307.schema
|
|
||||||
create mode 100644 samples/rfc2307bis.schema
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index f5a1a0e3..981a0333 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
xx/xx/2020 autofs-5.1.7
|
|
||||||
- make bind mounts propagation slave by default.
|
|
||||||
+- update ldap READMEs and schema definitions.
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/README.autofs-schema b/README.autofs-schema
|
|
||||||
index c121e1c3..b8c6d6a5 100644
|
|
||||||
--- a/README.autofs-schema
|
|
||||||
+++ b/README.autofs-schema
|
|
||||||
@@ -9,10 +9,10 @@ not clear what schema to use for Linux autofs information.
|
|
||||||
|
|
||||||
The schema was corrected somewhere along the line but the autofs
|
|
||||||
distribution copy was never updated. The schema has now been
|
|
||||||
-updated but it is not recommended for use as the schema for autofs
|
|
||||||
-map information.
|
|
||||||
+updated but may not be accurate and may conflict with other LDAP
|
|
||||||
+schemas so it is not recommended for use for autofs map information.
|
|
||||||
|
|
||||||
-The rfc2307 or, preferably the, rfc2307bis schema is the recommened
|
|
||||||
-schema to use.
|
|
||||||
+The rfc2307 or the rfc2307bis schema is the recommened schema to
|
|
||||||
+use, based on requirements.
|
|
||||||
|
|
||||||
Ian
|
|
||||||
diff --git a/README.ldap-schema b/README.ldap-schema
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..6cb0ba1c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/README.ldap-schema
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+LDAP Schema
|
|
||||||
+===========
|
|
||||||
+
|
|
||||||
+LDAP Schema definitions may be found in the samples sub-directory.
|
|
||||||
+
|
|
||||||
+The ldap schema rfc2307.schema and rfc2307bis.schema may be used by
|
|
||||||
+autofs for Sun format automount maps, the choice of which is used is
|
|
||||||
+dependent on user needs. They are included for reference only as at
|
|
||||||
+least one of these should be included in LDAP server distributions.
|
|
||||||
+
|
|
||||||
+The ldap schema am-utils-ldap.schema and am-utils-ldap-id.txt describe
|
|
||||||
+the schema used by autofs for amd format maps.
|
|
||||||
+
|
|
||||||
+Ian
|
|
||||||
diff --git a/autofs.spec b/autofs.spec
|
|
||||||
index 18e93a8d..22e7adf4 100644
|
|
||||||
--- a/autofs.spec
|
|
||||||
+++ b/autofs.spec
|
|
||||||
@@ -194,7 +194,8 @@ fi
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
-%doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/autofs.schema samples/autofs_ldap_auth.conf
|
|
||||||
+%doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/*.schema
|
|
||||||
+%doc samples/am-utils-ldap-id.txt samples/autofs_ldap_auth.conf
|
|
||||||
%config %{init_file_name}
|
|
||||||
%config(noreplace) /etc/auto.master
|
|
||||||
%config(noreplace) /etc/autofs.conf
|
|
||||||
diff --git a/samples/am-utils-ldap-id.txt b/samples/am-utils-ldap-id.txt
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..33a9187b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/samples/am-utils-ldap-id.txt
|
|
||||||
@@ -0,0 +1,360 @@
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+INTERNET-DRAFT Leif Johansson
|
|
||||||
+Intented Category: Experimental Stockholm University
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ A directory (X.500 and LDAPv3) schema for Berkely automounter
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+1. Status of this Memo
|
|
||||||
+
|
|
||||||
+ This memo describes a directory (LDAP or X.500) schema for storing amd (Berkely-
|
|
||||||
+ style automounter) mount info maps. The schema is currently beeing supported by
|
|
||||||
+ the (beta version of the) am-utils version 6 package [AMUTILS].
|
|
||||||
+
|
|
||||||
+2. Overview and Rationale
|
|
||||||
+
|
|
||||||
+ Directory services such as X.500 [X500] or LDAP [RFC2251] are a natural choice of
|
|
||||||
+ repository for amd mount map databases. All Object Identifiers in this document
|
|
||||||
+ are prefixed by amdSchema-id to be assigned later. The relation between this
|
|
||||||
+ schema and the automount schema elements in [HOWARD] are mostly superficial. The
|
|
||||||
+ model for the elements in [HOWARD] was the SUN automounter which has quite a
|
|
||||||
+ different syntax for mount maps. Furthermore the intended usage of this schema
|
|
||||||
+ differs from that of [HOWARD] in many respects.
|
|
||||||
+
|
|
||||||
+3. DSA requirements
|
|
||||||
+
|
|
||||||
+ Directory servers implementing this schema SHOULD maintain the modifyTimestamp
|
|
||||||
+ operational attribute. If not the amdMapCacheTtl attribute SHOULD be set to 0
|
|
||||||
+ indicating to clients that caching of map entries SHOULD be turned off. Clients
|
|
||||||
+ wishing to use the amdMap schema MAY use the modifyTimestamp information to set
|
|
||||||
+ the ttl for internal caching schemes. A value of 0 for the amdMapCacheTtl must
|
|
||||||
+ result in clients turning off any local caching.
|
|
||||||
+
|
|
||||||
+4. Syntax definitions
|
|
||||||
+
|
|
||||||
+ The following attribute syntax is defined in this document:
|
|
||||||
+
|
|
||||||
+ amdlocationlist
|
|
||||||
+
|
|
||||||
+ This syntax represents a amd map value. This is the syntax expressed in BNF using
|
|
||||||
+ definitions from [RFC2252]:
|
|
||||||
+
|
|
||||||
+ amdlocationlist = amdlocationselection |
|
|
||||||
+ amdlocationlist whsp "||" whsp amdlocationselection
|
|
||||||
+
|
|
||||||
+ amdlocationselection = amdlocation |
|
|
||||||
+ amdlocationselection whsp amdlocation
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 1]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ amdlocation = amdlocationinfo |
|
|
||||||
+ "-" amdlocationinfo |
|
|
||||||
+ "-"
|
|
||||||
+
|
|
||||||
+ amdlocationinfo = seloropt |
|
|
||||||
+ amdlocationinfo ";" seloropt |
|
|
||||||
+ ";"
|
|
||||||
+
|
|
||||||
+ seloropt = seletion |
|
|
||||||
+ optass
|
|
||||||
+
|
|
||||||
+ selection = keystring "==" printablestring
|
|
||||||
+ keystring "!=" printablestring
|
|
||||||
+
|
|
||||||
+ optass = keystring
|
|
||||||
+
|
|
||||||
+ X.500 servers or LDAPv3 servers (supporting the binary attribute option) may use
|
|
||||||
+ the following syntax definition:
|
|
||||||
+
|
|
||||||
+ AmdLocationList ::= SEQUENCE OF {
|
|
||||||
+ SEQUENCE OF {
|
|
||||||
+ location AmdLocation
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ AmdLocation ::= SET OF {
|
|
||||||
+ CHOICE {
|
|
||||||
+ location [0] AmdLocationInfo
|
|
||||||
+ notlocation [1] AmdLocationInfo
|
|
||||||
+ not [2] NULL
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ AmdLocationInfo ::= SET OF {
|
|
||||||
+ CHOICE {
|
|
||||||
+ selection [0] AmdSelection
|
|
||||||
+ option [1] AmdOption
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ AmdSelection ::= CHOICE {
|
|
||||||
+ eq [0] AttributeAndValue
|
|
||||||
+ ne [1] AttributeAndValue
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ AmdOption ::= AttributeAndValue
|
|
||||||
+ AttributeAndValue ::= SEQUENCE {
|
|
||||||
+ attribute IA5String
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 2]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ value IA5String
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+5. Attribute types
|
|
||||||
+
|
|
||||||
+ The following attribute types are defined in this document:
|
|
||||||
+
|
|
||||||
+ amdMapName
|
|
||||||
+ amdMapCacheTtl
|
|
||||||
+ amdMapEntry
|
|
||||||
+ amdMapEntryKey
|
|
||||||
+ amdMapEntryValue
|
|
||||||
+
|
|
||||||
+ amdSchema-a OBJECT IDENTIFIER ::= { amdSchema-id 1 }
|
|
||||||
+
|
|
||||||
+ amdMapName ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX IA5String
|
|
||||||
+ EQUALITY MATCHING RULE caseIgoreExactMatch
|
|
||||||
+ --ID { amdSchema-a 1 }
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "This attribute is the symbolic and in the naming
|
|
||||||
+ context unique name of an amd map. This corresponds
|
|
||||||
+ in the case of a flat file database to the name of
|
|
||||||
+ the file or the mount-point of the map."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ amdMapCacheTtl
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX Integer
|
|
||||||
+ EQUALITY MATCHING RULE integerExactMatch
|
|
||||||
+ --ID { amdSchema-a 2 }
|
|
||||||
+ SINGLE VALUED
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "The maximum time-to-live for the entries in this
|
|
||||||
+ map. After this many milliseconds the map has to
|
|
||||||
+ be cleared from local caches and reloaded. A value
|
|
||||||
+ of 0 disables caching."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntry
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX DistinguishedName
|
|
||||||
+ EQUALITY MATHCING RULE dNCaseIgnoreExactMatch
|
|
||||||
+ --ID { amdSchema-a 3 }
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "A multivalued attribute listing the distinguished
|
|
||||||
+ names of the amdMapEntries making up this amdMap
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 3]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ object."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntryKey ::= {
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX IA5String
|
|
||||||
+ EQUALITY MATCHING RULE stringExactMatch
|
|
||||||
+ --ID { amdSchema-a 4 }
|
|
||||||
+ SINGLE VALUED
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "The value of this attribute is usually the name of
|
|
||||||
+ a mountpoint for this amdMapEntry."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntryValue ::= {
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX AmdLocationList
|
|
||||||
+ --ID { amdSchema-a 5 }
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "This is the actual mount information for the amdMapEntry
|
|
||||||
+ using the syntax described above."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntryKey ::= {
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX IA5String
|
|
||||||
+ EQUALITY MATCHING RULE stringExactMatch
|
|
||||||
+ --ID { amdSchema-a 4 }
|
|
||||||
+ SINGLE VALUED
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "The value of this attribute is usually the name of
|
|
||||||
+ a mountpoint for this amdMapEntry."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntryValue ::= {
|
|
||||||
+ ATTRIBUTE ::= {
|
|
||||||
+ WITH SYNTAX AmdLocationList
|
|
||||||
+ --ID { amdSchema-a 5 }
|
|
||||||
+ DESCRIPTION
|
|
||||||
+ "This is the actual mount information for the amdMapEntry
|
|
||||||
+ using the syntax described above."
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+6. Object classes
|
|
||||||
+
|
|
||||||
+ The following object classes are defined in this document:
|
|
||||||
+
|
|
||||||
+ amdMap
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 4]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ amdMapEntry
|
|
||||||
+
|
|
||||||
+ defined as follows:
|
|
||||||
+
|
|
||||||
+ amdSchema-oc ::= { amdSchema-id 2 }
|
|
||||||
+
|
|
||||||
+ amdMap OBJECT-CLASS ::= {
|
|
||||||
+ SUBCLASS OF { top }
|
|
||||||
+ KIND auxiliary
|
|
||||||
+ --ID { amdSchema-oc 1 }
|
|
||||||
+ MAY CONTAIN { amdMapCacheTtl , cn }
|
|
||||||
+ MUST CONTAIN { amdMapName , amdMapEntry }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ amdMapEntry OBJECT-CLASS ::= {
|
|
||||||
+ SUBCLASS OF { top }
|
|
||||||
+ KIND structural
|
|
||||||
+ --ID { amdSchema-oc 2 }
|
|
||||||
+ MUST CONTAIN {
|
|
||||||
+ amdMapName ,
|
|
||||||
+ amdEntryKey ,
|
|
||||||
+ amdEntryValue ,
|
|
||||||
+ } MAY CONTAIN
|
|
||||||
+ { cn } DESCRIPTION "An entry of this
|
|
||||||
+ object class describes mount information relative to a
|
|
||||||
+ certain amdMap entry"
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+7. Examples
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+8. Security Considerations
|
|
||||||
+
|
|
||||||
+ Due to the security problems posed by NFS care should be taken not to advertise
|
|
||||||
+ exported filesystems. Therefore it is often desirable to limit access to entries
|
|
||||||
+ carrying amd mount map information to those systems to which the corresponding
|
|
||||||
+ filesystems have been exported.
|
|
||||||
+
|
|
||||||
+9. References
|
|
||||||
+
|
|
||||||
+ [AMUTILS]
|
|
||||||
+ am-utils homepage: http://shekel.cs.columbia.edu/~erez/am-utils.html
|
|
||||||
+
|
|
||||||
+ [RFC2251]
|
|
||||||
+ M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access
|
|
||||||
+ Protocol (v3)", RFC 2251, December 1997.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 5]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Internet draft Berkeley AMD LDAP Schema 30 March 1998
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ [RFC2252]
|
|
||||||
+ M. Wahl, A. Coulbeck, T. Howes, S. Kille, "Lightweight Directory
|
|
||||||
+ Access Protocol (v3): Attribute Syntax Definitions", RFC 2252,
|
|
||||||
+ December 1997.
|
|
||||||
+
|
|
||||||
+ [RFC2253]
|
|
||||||
+ M. Wahl, S. Kille, T. Howes, "Lightweight Directory Access
|
|
||||||
+ Protocol (v3): UTF-8 String Representation of Distinguished
|
|
||||||
+ Names", RFC 2253, December 1997.
|
|
||||||
+
|
|
||||||
+ [HOWARD]
|
|
||||||
+ Luke Howard, "An Approach for Using LDAP as a Network
|
|
||||||
+ Information Service", draft-howard-nis-schema-??.txt, Internet
|
|
||||||
+ draft.
|
|
||||||
+
|
|
||||||
+ [X500]
|
|
||||||
+ ITU something or other.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Author's Address
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ Leif Johansson
|
|
||||||
+ Department of Mathematics
|
|
||||||
+ Stockholm University
|
|
||||||
+ S-106 91 Stockholm
|
|
||||||
+ SWEDEN
|
|
||||||
+
|
|
||||||
+ Email: leifj AT matematik.su.se
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Johansson [Page 6]
|
|
||||||
+
|
|
||||||
+
|
|
||||||
diff --git a/samples/am-utils-ldap.schema b/samples/am-utils-ldap.schema
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..9594d2fe
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/samples/am-utils-ldap.schema
|
|
||||||
@@ -0,0 +1,52 @@
|
|
||||||
+# A schema for the Berkeley automounter (AMD)
|
|
||||||
+# Authored by Erez Zadok and/or source maintainers
|
|
||||||
+# Definition by Tim Colles <timc at dai.ed.ac.uk>
|
|
||||||
+# Revised by Adam Morley <adam at gmi.com>
|
|
||||||
+
|
|
||||||
+# OID Base is 1.3.6.1.4.1.10180
|
|
||||||
+#
|
|
||||||
+# Syntaxes are under 1.3.6.1.4.1.10180.3.175-199
|
|
||||||
+# Attribute types are under 1.3.6.1.4.1.10180.2.175-199
|
|
||||||
+# Object classes are under 1.3.6.1.4.1.10180.1.175-199
|
|
||||||
+
|
|
||||||
+# Attribute Type Definitions
|
|
||||||
+
|
|
||||||
+attributetype ( 1.3.6.1.4.1.10180.2.175
|
|
||||||
+ NAME 'amdmapTimestamp'
|
|
||||||
+ DESC 'Probably the time the map was last modified'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributetype ( 1.3.6.1.4.1.10180.2.176
|
|
||||||
+ NAME 'amdmapName'
|
|
||||||
+ DESC 'The symbolic name of the map, ie. map_name'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributetype ( 1.3.6.1.4.1.10180.2.177
|
|
||||||
+ NAME 'amdmapKey'
|
|
||||||
+ DESC 'The key value for this entry'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributetype ( 1.3.6.1.4.1.10180.2.178
|
|
||||||
+ NAME 'amdmapValue'
|
|
||||||
+ DESC 'The mount information for this entry'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+# Object Class Definitions
|
|
||||||
+
|
|
||||||
+objectclass ( 1.3.6.1.4.1.10180.1.175 NAME 'amdmapTimestamp'
|
|
||||||
+ SUP top STRUCTURAL
|
|
||||||
+ DESC 'Timestamp for an AMD map'
|
|
||||||
+ MUST ( cn $ amdmapName $ amdmapTimestamp ) )
|
|
||||||
+
|
|
||||||
+objectclass ( 1.3.6.1.4.1.10180.1.176 NAME 'amdmap'
|
|
||||||
+ SUP top STRUCTURAL
|
|
||||||
+ DESC 'Defines an AMD map entry'
|
|
||||||
+ MUST ( cn $ amdmapName $ amdmapKey $ amdmapValue ) )
|
|
||||||
diff --git a/samples/rfc2307.schema b/samples/rfc2307.schema
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..e8b15edf
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/samples/rfc2307.schema
|
|
||||||
@@ -0,0 +1,37 @@
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.31
|
|
||||||
+ NAME 'automountMapName'
|
|
||||||
+ DESC 'automount Map Name'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
|
|
||||||
+ X-ORIGIN 'user defined' )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.32
|
|
||||||
+ NAME 'automountKey'
|
|
||||||
+ DESC 'Automount Key value'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
|
|
||||||
+ X-ORIGIN 'user defined' )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.33
|
|
||||||
+ NAME 'automountInformation'
|
|
||||||
+ DESC 'Automount information'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE
|
|
||||||
+ X-ORIGIN 'user defined' )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.16
|
|
||||||
+ NAME 'automountMap'
|
|
||||||
+ DESC 'Automount Map information'
|
|
||||||
+ SUP top STRUCTURAL
|
|
||||||
+ MUST automountMapName
|
|
||||||
+ MAY description
|
|
||||||
+ X-ORIGIN 'user defined' )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.17
|
|
||||||
+ NAME 'automount'
|
|
||||||
+ DESC 'Automount information'
|
|
||||||
+ SUP top STRUCTURAL
|
|
||||||
+ MUST ( automountKey $ automountInformation )
|
|
||||||
+ MAY description
|
|
||||||
+ X-ORIGIN 'user defined' )
|
|
||||||
+
|
|
||||||
diff --git a/samples/rfc2307bis.schema b/samples/rfc2307bis.schema
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..a626b3fe
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/samples/rfc2307bis.schema
|
|
||||||
@@ -0,0 +1,310 @@
|
|
||||||
+###
|
|
||||||
+# Extracted from: http://tools.ietf.org/html/draft-howard-rfc2307bis-02
|
|
||||||
+###
|
|
||||||
+
|
|
||||||
+# Builtin
|
|
||||||
+#attributeType ( 1.3.6.1.1.1.1.0 NAME 'uidNumber'
|
|
||||||
+# DESC 'An integer uniquely identifying a user in an
|
|
||||||
+# administrative domain'
|
|
||||||
+# EQUALITY integerMatch
|
|
||||||
+# ORDERING integerOrderingMatch
|
|
||||||
+# SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+# SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+# Builtin
|
|
||||||
+#attributeType ( 1.3.6.1.1.1.1.1 NAME 'gidNumber'
|
|
||||||
+# DESC 'An integer uniquely identifying a group in an
|
|
||||||
+# administrative domain'
|
|
||||||
+# EQUALITY integerMatch
|
|
||||||
+# ORDERING integerOrderingMatch
|
|
||||||
+# SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+# SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.2 NAME 'gecos'
|
|
||||||
+ DESC 'The GECOS field; the common name'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SUBSTR caseIgnoreSubstringsMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.3 NAME 'homeDirectory'
|
|
||||||
+ DESC 'The absolute path to the home directory'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.4 NAME 'loginShell'
|
|
||||||
+ DESC 'The path to the login shell'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.5 NAME 'shadowLastChange'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.6 NAME 'shadowMin'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.7 NAME 'shadowMax'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.8 NAME 'shadowWarning'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.9 NAME 'shadowInactive'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.10 NAME 'shadowExpire'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.11 NAME 'shadowFlag'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.12 NAME 'memberUid'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.13 NAME 'memberNisNetgroup'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.14 NAME 'nisNetgroupTriple'
|
|
||||||
+ DESC 'Netgroup triple'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SUBSTR caseIgnoreSubstringsMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.15 NAME 'ipServicePort'
|
|
||||||
+ DESC 'Service port number'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.16 NAME 'ipServiceProtocol'
|
|
||||||
+ DESC 'Service protocol name'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.17 NAME 'ipProtocolNumber'
|
|
||||||
+ DESC 'IP protocol number'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.18 NAME 'oncRpcNumber'
|
|
||||||
+ DESC 'ONC RPC number'
|
|
||||||
+ EQUALITY integerMatch
|
|
||||||
+ ORDERING integerOrderingMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.19 NAME 'ipHostNumber'
|
|
||||||
+ DESC 'IPv4 addresses as a dotted decimal omitting leading
|
|
||||||
+ zeros or IPv6 addresses as defined in RFC2373'
|
|
||||||
+ EQUALITY caseIgnoreIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.20 NAME 'ipNetworkNumber'
|
|
||||||
+ DESC 'IP network omitting leading zeros, eg. 192.168'
|
|
||||||
+ EQUALITY caseIgnoreIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.21 NAME 'ipNetmaskNumber'
|
|
||||||
+ DESC 'IP netmask omitting leading zeros, eg. 255.255.255.0'
|
|
||||||
+ EQUALITY caseIgnoreIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.22 NAME 'macAddress'
|
|
||||||
+ DESC 'MAC address in maximal, colon separated hex
|
|
||||||
+ notation, eg. 00:00:92:90:ee:e2'
|
|
||||||
+ EQUALITY caseIgnoreIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.23 NAME 'bootParameter'
|
|
||||||
+ DESC 'rpc.bootparamd parameter'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.24 NAME 'bootFile'
|
|
||||||
+ DESC 'Boot image name'
|
|
||||||
+ EQUALITY caseExactIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.26 NAME 'nisMapName'
|
|
||||||
+ DESC 'Name of a generic NIS map'
|
|
||||||
+ EQUALITY caseIgnoreMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64} )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.27 NAME 'nisMapEntry'
|
|
||||||
+ DESC 'A generic NIS entry'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024}
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.28 NAME 'nisPublicKey'
|
|
||||||
+ DESC 'NIS public key'
|
|
||||||
+ EQUALITY octetStringMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.29 NAME 'nisSecretKey'
|
|
||||||
+ DESC 'NIS secret key'
|
|
||||||
+ EQUALITY octetStringMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.30 NAME 'nisDomain'
|
|
||||||
+ DESC 'NIS domain'
|
|
||||||
+ EQUALITY caseIgnoreIA5Match
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.31 NAME 'automountMapName'
|
|
||||||
+ DESC 'automount Map Name'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.32 NAME 'automountKey'
|
|
||||||
+ DESC 'Automount Key value'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+attributeType ( 1.3.6.1.1.1.1.33 NAME 'automountInformation'
|
|
||||||
+ DESC 'Automount information'
|
|
||||||
+ EQUALITY caseExactMatch
|
|
||||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
|
|
||||||
+ SINGLE-VALUE )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.0 NAME 'posixAccount' SUP top AUXILIARY
|
|
||||||
+ DESC 'Abstraction of an account with POSIX attributes'
|
|
||||||
+ MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
|
|
||||||
+ MAY ( userPassword $ loginShell $ gecos $
|
|
||||||
+ description ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.1 NAME 'shadowAccount' SUP top AUXILIARY
|
|
||||||
+ DESC 'Additional attributes for shadow passwords'
|
|
||||||
+ MUST uid
|
|
||||||
+ MAY ( userPassword $ description $
|
|
||||||
+ shadowLastChange $ shadowMin $ shadowMax $
|
|
||||||
+ shadowWarning $ shadowInactive $
|
|
||||||
+ shadowExpire $ shadowFlag ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.2 NAME 'posixGroup' SUP top AUXILIARY
|
|
||||||
+ DESC 'Abstraction of a group of accounts'
|
|
||||||
+ MUST gidNumber
|
|
||||||
+ MAY ( userPassword $ memberUid $
|
|
||||||
+ description ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.3 NAME 'ipService' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Abstraction an Internet Protocol service.
|
|
||||||
+ Maps an IP port and protocol (such as tcp or udp)
|
|
||||||
+ to one or more names; the distinguished value of
|
|
||||||
+ the cn attribute denotes the services canonical
|
|
||||||
+ name'
|
|
||||||
+ MUST ( cn $ ipServicePort $ ipServiceProtocol )
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.4 NAME 'ipProtocol' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Abstraction of an IP protocol. Maps a protocol number
|
|
||||||
+ to one or more names. The distinguished value of the cn
|
|
||||||
+ attribute denotes the protocol canonical name'
|
|
||||||
+ MUST ( cn $ ipProtocolNumber )
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.5 NAME 'oncRpc' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Abstraction of an Open Network Computing (ONC)
|
|
||||||
+ [RFC1057] Remote Procedure Call (RPC) binding.
|
|
||||||
+ This class maps an ONC RPC number to a name.
|
|
||||||
+ The distinguished value of the cn attribute denotes
|
|
||||||
+ the RPC service canonical name'
|
|
||||||
+ MUST ( cn $ oncRpcNumber )
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.6 NAME 'ipHost' SUP top AUXILIARY
|
|
||||||
+ DESC 'Abstraction of a host, an IP device. The distinguished
|
|
||||||
+ value of the cn attribute denotes the hosts canonical
|
|
||||||
+ name. Device SHOULD be used as a structural class'
|
|
||||||
+ MUST ( cn $ ipHostNumber )
|
|
||||||
+ MAY ( userPassword $ l $ description $
|
|
||||||
+ manager ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.7 NAME 'ipNetwork' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Abstraction of a network. The distinguished value of
|
|
||||||
+ the cn attribute denotes the network canonical name'
|
|
||||||
+ MUST ipNetworkNumber
|
|
||||||
+ MAY ( cn $ ipNetmaskNumber $ l $ description $ manager ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Abstraction of a netgroup. May refer to other
|
|
||||||
+ netgroups'
|
|
||||||
+ MUST cn
|
|
||||||
+ MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.9 NAME 'nisMap' SUP top STRUCTURAL
|
|
||||||
+ DESC 'A generic abstraction of a NIS map'
|
|
||||||
+ MUST nisMapName
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.10 NAME 'nisObject' SUP top STRUCTURAL
|
|
||||||
+ DESC 'An entry in a NIS map'
|
|
||||||
+ MUST ( cn $ nisMapEntry $ nisMapName ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.11 NAME 'ieee802Device' SUP top AUXILIARY
|
|
||||||
+ DESC 'A device with a MAC address; device SHOULD be
|
|
||||||
+ used as a structural class'
|
|
||||||
+ MAY macAddress )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.12 NAME 'bootableDevice' SUP top AUXILIARY
|
|
||||||
+ DESC 'A device with boot parameters; device SHOULD be
|
|
||||||
+ used as a structural class'
|
|
||||||
+ MAY ( bootFile $ bootParameter ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.14 NAME 'nisKeyObject' SUP top AUXILIARY
|
|
||||||
+ DESC 'An object with a public and secret key'
|
|
||||||
+ MUST ( cn $ nisPublicKey $ nisSecretKey )
|
|
||||||
+ MAY ( uidNumber $ description ) )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.15 NAME 'nisDomainObject' SUP top AUXILIARY
|
|
||||||
+ DESC 'Associates a NIS domain with a naming context'
|
|
||||||
+ MUST nisDomain )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.16 NAME 'automountMap' SUP top STRUCTURAL
|
|
||||||
+ MUST ( automountMapName )
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.17 NAME 'automount' SUP top STRUCTURAL
|
|
||||||
+ DESC 'Automount information'
|
|
||||||
+ MUST ( automountKey $ automountInformation )
|
|
||||||
+ MAY description )
|
|
||||||
+
|
|
||||||
+objectClass ( 1.3.6.1.1.1.2.18 NAME 'groupOfMembers' SUP top STRUCTURAL
|
|
||||||
+ DESC 'A group with members (DNs)'
|
|
||||||
+ MUST cn
|
|
||||||
+ MAY ( businessCategory $ seeAlso $ owner $ ou $ o $
|
|
||||||
+ description $ member ) )
|
|
@ -1,94 +0,0 @@
|
|||||||
samples: fix Makefile targets' directory dependencies
|
|
||||||
|
|
||||||
From: Kyle Russell <bkylerussell@gmail.com>
|
|
||||||
|
|
||||||
Introduce an order-only prerequisite on dirs for targets that actually
|
|
||||||
use these directories to guarantee they exist at install time; otherwise,
|
|
||||||
the sample install commands can result in ENOENT in a parallelized make
|
|
||||||
invocation.
|
|
||||||
|
|
||||||
Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
|
|
||||||
---
|
|
||||||
CHANGELOG | 1 +
|
|
||||||
samples/Makefile | 14 +++++++-------
|
|
||||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CHANGELOG b/CHANGELOG
|
|
||||||
index f53f9adf..106b811c 100644
|
|
||||||
--- a/CHANGELOG
|
|
||||||
+++ b/CHANGELOG
|
|
||||||
@@ -5,6 +5,7 @@ xx/xx/2020 autofs-5.1.7
|
|
||||||
- fix browse dir not re-created on symlink expire.
|
|
||||||
- fix a regression with map instance lookup.
|
|
||||||
- correct fsf address.
|
|
||||||
+- samples: fix Makefile targets' directory dependencies
|
|
||||||
|
|
||||||
07/10/2019 autofs-5.1.6
|
|
||||||
- support strictexpire mount option.
|
|
||||||
diff --git a/samples/Makefile b/samples/Makefile
|
|
||||||
index e7f242a7..a505b1f9 100644
|
|
||||||
--- a/samples/Makefile
|
|
||||||
+++ b/samples/Makefile
|
|
||||||
@@ -53,7 +53,7 @@ CONFIG = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs.conf.orig || echo
|
|
||||||
CEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs || echo "no")
|
|
||||||
|
|
||||||
.PHONY: autofs.conf
|
|
||||||
-autofs.conf: autofs.conf.default
|
|
||||||
+autofs.conf: autofs.conf.default | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs default configuation in $(autofsmapdir)"
|
|
||||||
@if test -z "$(CONFIG)" ; \
|
|
||||||
@@ -76,7 +76,7 @@ CINIT = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs.orig || echo "-b -
|
|
||||||
CIEXISTS = $(shell test -e $(INSTALLROOT)$(autofsconfdir)/autofs || echo "no")
|
|
||||||
|
|
||||||
.PHONY: autofs.sysinit
|
|
||||||
-autofs.sysinit: autofs.init.conf
|
|
||||||
+autofs.sysinit: autofs.init.conf | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs init configuation in $(autofsconfdir)"
|
|
||||||
@if test -z "$(CINIT)" ; \
|
|
||||||
@@ -99,7 +99,7 @@ AUTH = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs_ldap_auth.conf.orig
|
|
||||||
AEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/autofs_ldap_auth.conf || echo "no")
|
|
||||||
|
|
||||||
.PHONY: autofs_ldap_auth.conf
|
|
||||||
-autofs_ldap_auth.conf:
|
|
||||||
+autofs_ldap_auth.conf: | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs ldap auth config \"autofs_ldap_auth.conf\" in $(autofsmapdir)"
|
|
||||||
@if test -z "$(AUTH)" ; \
|
|
||||||
@@ -122,7 +122,7 @@ MASTER = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.master.orig || echo
|
|
||||||
MEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.master || echo "no")
|
|
||||||
|
|
||||||
.PHONY: auto.master
|
|
||||||
-auto.master:
|
|
||||||
+auto.master: | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs default master map in $(autofsmapdir)"
|
|
||||||
@if test -z "$(MASTER)" ; \
|
|
||||||
@@ -145,7 +145,7 @@ MISC = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.misc.orig || echo "-b
|
|
||||||
IEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.misc || echo "no")
|
|
||||||
|
|
||||||
.PHONY: auto.misc
|
|
||||||
-auto.misc:
|
|
||||||
+auto.misc: | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs sample map \"auto.misc\" in $(autofsmapdir)"
|
|
||||||
@if test -z "$(MISC)" ; \
|
|
||||||
@@ -168,7 +168,7 @@ NET = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.net.orig || echo "-b --
|
|
||||||
NEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.net || echo "no")
|
|
||||||
|
|
||||||
.PHONY: auto.net
|
|
||||||
-auto.net:
|
|
||||||
+auto.net: | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs sample map \"auto.net\" in $(autofsmapdir)"
|
|
||||||
@if test -z "$(NET)" ; \
|
|
||||||
@@ -191,7 +191,7 @@ SMB = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.smb.orig || echo "-b --
|
|
||||||
SEXISTS = $(shell test -e $(INSTALLROOT)$(autofsmapdir)/auto.smb || echo "no")
|
|
||||||
|
|
||||||
.PHONY: auto.smb
|
|
||||||
-auto.smb:
|
|
||||||
+auto.smb: | dirs
|
|
||||||
@echo
|
|
||||||
@echo "Installing autofs sample map \"auto.smb\" in $(autofsmapdir)"
|
|
||||||
@if test -z "$(SMB)" ; \
|
|
64
autofs.spec
64
autofs.spec
@ -5,31 +5,17 @@
|
|||||||
# disable them.
|
# disable them.
|
||||||
%define with_systemd %{?_without_systemd: 0} %{?!_without_systemd: 1}
|
%define with_systemd %{?_without_systemd: 0} %{?!_without_systemd: 1}
|
||||||
|
|
||||||
|
# Use --without fedfs in your rpmbuild command or force values to 0 to
|
||||||
|
# disable them.
|
||||||
|
%define with_fedfs %{?_without_fedfs: 0} %{?!_without_fedfs: 1}
|
||||||
|
|
||||||
Summary: A tool for automatically mounting and unmounting filesystems
|
Summary: A tool for automatically mounting and unmounting filesystems
|
||||||
Name: autofs
|
Name: autofs
|
||||||
Version: 5.1.6
|
Version: 5.1.7
|
||||||
Release: 11%{?dist}
|
Release: 1%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
|
Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
|
||||||
Patch001: autofs-5.1.6-make-bind-mounts-propagation-slave-by-default.patch
|
|
||||||
Patch002: autofs-5.1.6-update-ldap-READMEs-and-schema-definitions.patch
|
|
||||||
Patch003: autofs-5.1.6-fix-program-map-multi-mount-lookup-after-mount-fail.patch
|
|
||||||
Patch004: autofs-5.1.6-fix-browse-dir-not-re-created-on-symlink-expire.patch
|
|
||||||
Patch005: autofs-5.1.6-fix-a-regression-with-map-instance-lookup.patch
|
|
||||||
Patch006: autofs-5.1.6-correct-fsf-address.patch
|
|
||||||
Patch007: autofs-samples-fix-Makefile-targets-directory-dependencies.patch
|
|
||||||
Patch008: autofs-5.1.6-remove-intr-hosts-map-mount-option.patch
|
|
||||||
Patch009: autofs-5.1.6-fix-trailing-dollar-sun-entry-expansion.patch
|
|
||||||
Patch010: autofs-5.1.6-fix-double-quoting-in-auto.smb.patch
|
|
||||||
Patch011: autofs-5.1.6-initialize-struct-addrinfo-for-getaddrinfo-calls.patch
|
|
||||||
Patch012: autofs-5.1.6-fix-quoted-string-length-calc-in-expandsunent.patch
|
|
||||||
Patch013: autofs-5.1.6-fix-double-quoting-of-ampersand-in-auto.smb-as-well.patch
|
|
||||||
Patch014: autofs-5.1.6-fix-autofs-mount-options-construction.patch
|
|
||||||
Patch015: autofs-5.1.6-mount_nfs_c-fix-local-rdma-share-not-mounting.patch
|
|
||||||
Patch016: autofs-5.1.6-fix-ldap-sasl-reconnect-problem.patch
|
|
||||||
Patch017: autofs-5.1.6-ldap-schema-fix.patch
|
|
||||||
Patch018: autofs-5.1.6-fix-configure-force-shutdown-check.patch
|
|
||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
@ -40,6 +26,7 @@ BuildRequires: autoconf, openldap-devel, bison, flex, libxml2-devel
|
|||||||
BuildRequires: cyrus-sasl-devel, openssl-devel module-init-tools util-linux
|
BuildRequires: cyrus-sasl-devel, openssl-devel module-init-tools util-linux
|
||||||
BuildRequires: e2fsprogs libtirpc-devel libsss_autofs libnsl2-devel
|
BuildRequires: e2fsprogs libtirpc-devel libsss_autofs libnsl2-devel
|
||||||
BuildRequires: rpcgen pkgconfig krb5-devel
|
BuildRequires: rpcgen pkgconfig krb5-devel
|
||||||
|
BuildRequires: make
|
||||||
Conflicts: cyrus-sasl-lib < 2.1.23-9
|
Conflicts: cyrus-sasl-lib < 2.1.23-9
|
||||||
Requires: bash coreutils sed gawk grep module-init-tools /bin/ps
|
Requires: bash coreutils sed gawk grep module-init-tools /bin/ps
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
@ -90,24 +77,9 @@ echo %{version}-%{release} > .version
|
|||||||
%define unitdir %{?_unitdir:/usr/lib/systemd/system}
|
%define unitdir %{?_unitdir:/usr/lib/systemd/system}
|
||||||
%define systemd_configure_arg --with-systemd
|
%define systemd_configure_arg --with-systemd
|
||||||
%endif
|
%endif
|
||||||
%patch001 -p1
|
%if %{with_fedfs}
|
||||||
%patch002 -p1
|
%define fedfs_configure_arg --enable-fedfs
|
||||||
%patch003 -p1
|
%endif
|
||||||
%patch004 -p1
|
|
||||||
%patch005 -p1
|
|
||||||
%patch006 -p1
|
|
||||||
%patch007 -p1
|
|
||||||
%patch008 -p1
|
|
||||||
%patch009 -p1
|
|
||||||
%patch010 -p1
|
|
||||||
%patch011 -p1
|
|
||||||
%patch012 -p1
|
|
||||||
%patch013 -p1
|
|
||||||
%patch014 -p1
|
|
||||||
%patch015 -p1
|
|
||||||
%patch016 -p1
|
|
||||||
%patch017 -p1
|
|
||||||
%patch018 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
LDFLAGS=-Wl,-z,now
|
LDFLAGS=-Wl,-z,now
|
||||||
@ -116,7 +88,10 @@ LDFLAGS=-Wl,-z,now
|
|||||||
--enable-ignore-busy \
|
--enable-ignore-busy \
|
||||||
--enable-force-shutdown \
|
--enable-force-shutdown \
|
||||||
--without-hesiod \
|
--without-hesiod \
|
||||||
--with-libtirpc %{?systemd_configure_arg:}
|
--with-libtirpc \
|
||||||
|
%{?systemd_configure_arg:} \
|
||||||
|
%{?fedfs_configure_arg:}
|
||||||
|
|
||||||
make initdir=%{_initrddir} DONTSTRIP=1
|
make initdir=%{_initrddir} DONTSTRIP=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -202,11 +177,20 @@ fi
|
|||||||
%config(noreplace) /etc/sysconfig/autofs
|
%config(noreplace) /etc/sysconfig/autofs
|
||||||
%config(noreplace) /etc/autofs_ldap_auth.conf
|
%config(noreplace) /etc/autofs_ldap_auth.conf
|
||||||
%{_sbindir}/automount
|
%{_sbindir}/automount
|
||||||
%{_mandir}/*/*
|
%if %{with_fedfs}
|
||||||
|
%{_sbindir}/mount.fedfs
|
||||||
|
%{_sbindir}/fedfs-map-nfs4
|
||||||
|
%endif
|
||||||
|
%dir %{_libdir}/autofs
|
||||||
|
%{_libdir}/libautofs.so
|
||||||
%{_libdir}/autofs/
|
%{_libdir}/autofs/
|
||||||
|
%{_mandir}/*/*
|
||||||
%dir /etc/auto.master.d
|
%dir /etc/auto.master.d
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 25 2021 Ian Kent <ikent@redhat.com> - 1:5.1.7-1
|
||||||
|
- Update to upstream release 5.1.7.
|
||||||
|
|
||||||
* Mon Aug 31 2020 Ian Kent <ikent@redhat.com> - 1:5.1.6-11
|
* Mon Aug 31 2020 Ian Kent <ikent@redhat.com> - 1:5.1.6-11
|
||||||
- fix configure force shutdown check.
|
- fix configure force shutdown check.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (autofs-5.1.6.tar.gz) = e08ae85c65c21918640096caa1fa489937cd84c181dbe8a233d3fabc958d8d500820b73756ba3e343429199fa6bfe05c703005ec8fd013cc6839e69477d0ea0e
|
SHA512 (autofs-5.1.7.tar.gz) = d29d44c67456d7b1288a88d60226c85d620118be7ac8f7b930381f2a87486014b306a0c59a27e1ea9406bfd303e0bf0c8e912bc1fe351a4729ed2c124be5d928
|
||||||
|
Loading…
Reference in New Issue
Block a user