Current patch queue
Subsystems (3)
Ian Kent
maintainercover Current patch queue
Here are the patches I currently have in my queue. I hope to commit them by the end of the week if possible.
Comments welcome.
---
Ian Kent (17):
autofs-5.1.4 - fix flag file permission
autofs-5.1.4 - fix directory create permission
autofs-5.1.4 - fix use after free in do_master_list_reset() autofs-5.1.4 - fix deadlock in dumpmaps
autofs-5.1.4 - dont use array for path when not necessary autofs-5.1.4 - fix prefix option handling in expand_entry() autofs-5.1.4 - fix sublink option not set from defaults autofs-5.1.4 - fix error return in do_nfs_mount()
autofs-5.1.4 - add error handling for ext_mount_add()
autofs-5.1.4 - account for recent libnsl changes
autofs-5.1.4 - dont allow trailing slash in master map mount points autofs-5.1.4 - fix libresolv configure check
autofs-5.1.4 - add fedfs-getsrvinfo.c
autofs-5.1.4 - add mount.fedfs.c
autofs-5.1.4 - add fedfs-map-nfs4.c
autofs-5.1.4 - add conditional inclusion of fedfs binaries autofs-5.1.4 - add an example fedfs master map entry to the installed master map
NeilBrown (3):
autofs-5.1.4 - use_hostname_for_mounts shouldn't prevent selection among replicas autofs-5.1.4 - fix monotonic_elapsed
autofs-5.1.4 - Makefiles.rules: remove 'samples' from SUBDIRS
CHANGELOG | 22 ++ Makefile | 3 Makefile.conf.in | 6 - Makefile.rules | 8 - aclocal.m4 | 45 ++++ autofs.spec | 20 ++ configure | 345 +++++++++++++++++++++++++++++++-- configure.in | 40 ++-- daemon/automount.c | 10 + daemon/direct.c | 4 daemon/flag.c | 2 daemon/indirect.c | 2 daemon/lookup.c | 2 daemon/spawn.c | 1 fedfs/Makefile | 44 ++++ fedfs/fedfs-getsrvinfo.c | 311 +++++++++++++++++++++++++++++ fedfs/fedfs-getsrvinfo.h | 52 +++++ fedfs/fedfs-gpl-boiler.h | 40 ++++ fedfs/fedfs-map-nfs4.c | 204 +++++++++++++++++++ fedfs/fedfs-nls.h | 38 ++++ fedfs/fedfs-token.h | 40 ++++ fedfs/mount.fedfs.c | 485 ++++++++++++++++++++++++++++++++++++++++++++++ include/automount.h | 1 include/config.h.in | 3 include/replicated.h | 3 lib/master_parse.y | 5 lib/mounts.c | 5 lib/rpc_subs.c | 4 modules/Makefile | 10 + modules/mount_bind.c | 6 - modules/mount_changer.c | 2 modules/mount_ext2.c | 2 modules/mount_generic.c | 2 modules/mount_nfs.c | 4 modules/parse_amd.c | 75 ++++++- modules/replicated.c | 35 ++- samples/auto.master | 6 + 37 files changed, 1792 insertions(+), 95 deletions(-) create mode 100644 fedfs/Makefile create mode 100644 fedfs/fedfs-getsrvinfo.c create mode 100644 fedfs/fedfs-getsrvinfo.h create mode 100644 fedfs/fedfs-gpl-boiler.h create mode 100644 fedfs/fedfs-map-nfs4.c create mode 100644 fedfs/fedfs-nls.h create mode 100644 fedfs/fedfs-token.h create mode 100644 fedfs/mount.fedfs.c
--
Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 1/20 autofs-5.1.4 - fix flag file permission
The flag file used to check if automount(8) is running was being created with mode 0 which caused unnecessary dac_override AVC failures.
There's no reason to protect this file so just use 0644 as the file permission.
--- CHANGELOG | 3 +++ daemon/flag.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
CHANGELOG +3 -0
@@ -1,3 +1,6 @@ +xx/xx/2018 autofs-5.1.5 +- fix flag file permission. + 19/12/2017 autofs-5.1.4 - fix spec file url. - fix unset tsd group name handling.
daemon/flag.c +1 -1
@@ -164,7 +164,7 @@ int aquire_flag_file(void)while (!we_created_flagfile) {int errsv, i, j; - i =open_fd_mode (linkf,O_WRONLY |O_CREAT ,0 ); + i =open_fd_mode (linkf,O_WRONLY |O_CREAT ,0644 );if (i <0 ) {release_flag_file ();return 0 ;
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 2/20 autofs-5.1.4 - fix directory create permission
In reply to Ian Kentautofs mount point directory creation is done using a permission of 0555.
But it is necessary to create directories within autofs mount points for some map entry types so write access should be set for the owner on mount point directories.
--- CHANGELOG | 1 + daemon/automount.c | 2 ++ daemon/direct.c | 4 ++-- daemon/indirect.c | 2 +- daemon/lookup.c | 2 +- include/automount.h | 1 + modules/mount_bind.c | 6 +++--- modules/mount_changer.c | 2 +- modules/mount_ext2.c | 2 +- modules/mount_generic.c | 2 +- modules/mount_nfs.c | 2 +- modules/parse_amd.c | 2 +- 12 files changed, 16 insertions(+), 12 deletions(-)
CHANGELOG +1 -0
@@ -1,5 +1,6 @@ xx/xx/2018 autofs-5.1.5 - fix flag file permission. +- fix directory create permission. 19/12/2017 autofs-5.1.4 - fix spec file url.
daemon/automount.c +2 -0
@@ -51,6 +51,8 @@ const char *libdir = AUTOFS_LIB_DIR; /* Location of library modules */const char *mapdir =AUTOFS_MAP_DIR ;/* Location of mount maps */ const char *confdir =AUTOFS_CONF_DIR ;/* Location of autofs config file */ +unsigned int mp_mode =0755 ; +unsigned int nfs_mount_uses_string_options =0 ;static struct nfs_mount_vers vers, check = {1 ,1 ,1 };
daemon/direct.c +2 -2
@@ -424,7 +424,7 @@ int do_mount_autofs_direct(struct autofs_point *ap, }/* In case the directory doesn't exist, try to mkdir it */ -if (mkdir_path (me->key,0555 ) <0 ) { +if (mkdir_path (me->key, mp_mode) <0 ) {if (errno !=EEXIST && errno !=EROFS ) {crit (ap->logopt,"failed to create mount directory %s" , me->key);
@@ -739,7 +739,7 @@ int mount_autofs_offset(struct autofs_point *ap, struct mapent *me, const char *strcat (mountpoint, offset);/* In case the directory doesn't exist, try to mkdir it */ -if (mkdir_path (mountpoint,0555 ) <0 ) { +if (mkdir_path (mountpoint, mp_mode) <0 ) {if (errno ==EEXIST ) {/* * If the mount point directory is a real mount
daemon/indirect.c +1 -1
@@ -133,7 +133,7 @@ static int do_mount_autofs_indirect(struct autofs_point *ap, const char *root) }/* In case the directory doesn't exist, try to mkdir it */ -if (mkdir_path (root,0555 ) <0 ) { +if (mkdir_path (root, mp_mode) <0 ) {if (errno !=EEXIST && errno !=EROFS ) { crit(ap->logopt, "failed to create autofs directory %s",
daemon/lookup.c +1 -1
@@ -802,7 +802,7 @@ int lookup_ghost(struct autofs_point *ap, const char *root) goto next; } - ret =mkdir_path (fullpath,0555 ); + ret =mkdir_path (fullpath, mp_mode);if (ret <0 && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); warn(ap->logopt,
include/automount.h +1 -0
@@ -269,6 +269,7 @@ void reset_signals(void);int do_mount (struct autofs_point *ap,const char *root,const char *name,int name_len,const char *what,const char *fstype,const char *options); +extern unsigned int mp_mode;int mkdir_path (const char *path,mode_t mode);int rmdir_path (struct autofs_point *ap,const char *path,dev_t dev);
modules/mount_bind.c +3 -3
@@ -151,7 +151,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, intdebug (ap->logopt,MODPREFIX "calling mkdir_path %s" , fullpath); - status =mkdir_path (fullpath,0555 ); + status =mkdir_path (fullpath, mp_mode);if (status && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
@@ -203,7 +203,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int }else {debug (ap->logopt,MODPREFIX "calling mkdir_path %s" , basepath); -if (mkdir_path (basepath,0555 ) && errno !=EEXIST ) { +if (mkdir_path (basepath, mp_mode) && errno !=EEXIST ) {char *estr; estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
@@ -219,7 +219,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int"failed to create symlink %s -> %s" , fullpath, what);if ((ap->flags &MOUNT_FLAG_GHOST ) && !status) { -if (mkdir_path (fullpath,0555 ) && errno !=EEXIST ) { +if (mkdir_path (fullpath, mp_mode) && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt, MODPREFIX "mkdir_path %s failed: %s",
modules/mount_changer.c +1 -1
@@ -87,7 +87,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, intdebug (ap->logopt,MODPREFIX "calling mkdir_path %s" , fullpath); - status =mkdir_path (fullpath,0555 ); + status =mkdir_path (fullpath, mp_mode);if (status && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
modules/mount_ext2.c +1 -1
@@ -69,7 +69,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, intdebug (ap->logopt,MODPREFIX "calling mkdir_path %s" , fullpath); - status =mkdir_path (fullpath,0555 ); + status =mkdir_path (fullpath, mp_mode);if (status && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
modules/mount_generic.c +1 -1
@@ -68,7 +68,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, intdebug (ap->logopt,MODPREFIX "calling mkdir_path %s" , fullpath); - status =mkdir_path (fullpath,0555 ); + status =mkdir_path (fullpath, mp_mode);if (status && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
modules/mount_nfs.c +1 -1
@@ -277,7 +277,7 @@ dont_probe:debug (ap->logopt,MODPREFIX "calling mkdir_path %s" , fullpath); - status =mkdir_path (fullpath,0555 ); + status =mkdir_path (fullpath, mp_mode);if (status && errno !=EEXIST ) {char *estr =strerror_r (errno, buf,MAX_ERR_BUF ); error(ap->logopt,
modules/parse_amd.c +1 -1
@@ -1288,7 +1288,7 @@ static int do_program_mount(struct autofs_point *ap, rv =0 ;ext_mount_add (&entry->ext_mount, entry->fs,1 ); }else { - rv =mkdir_path (entry->fs,0555 ); + rv =mkdir_path (entry->fs, mp_mode);if (rv && errno !=EEXIST ) {char buf[MAX_ERR_BUF ];char *estr;
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 3/20 autofs-5.1.4 - fix use after free in do_master_list_reset()
In reply to Ian KentUmm ... list_for_each() can't be used in do_master_list_reset() because the subject entry of the loop is removed for the list within the loop body. Therefore it can't be used to calculate the next pointer within a for (...) loop.
There is no list_for_each_safe() macro in the list.h of autofs so it needs to be done manually.
--- CHANGELOG | 1 + daemon/automount.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
CHANGELOG +1 -0
@@ -1,6 +1,7 @@ xx/xx/2018 autofs-5.1.5 - fix flag file permission. - fix directory create permission. +- fix use after free in do_master_list_reset(). 19/12/2017 autofs-5.1.4 - fix spec file url.
daemon/automount.c +6 -2
@@ -2070,14 +2070,18 @@ static void remove_empty_args(char **argv, int *argc)static void do_master_list_reset (struct master *master) { -struct list_head *head, *p; +struct list_head *head, *p, *n;master_mutex_lock (); head = &master->mounts; -list_for_each (p, head) { + n = head->next; +while (n != head) {struct master_mapent *entry; + p = n; + n = p->next; + entry = list_entry(p, struct master_mapent, list);if (!list_empty (&entry->list))
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 4/20 autofs-5.1.4 - fix deadlock in dumpmaps
In reply to Ian KentCommit a223d11fa8e (autofs-5.1.3 - serialize calls to open_xxxx() functions) introduces a deadlock when using the dumpmaps function.
In this case the open fd mutex needs to be unlocked in the forked child process of the do_spawn() function.
--- CHANGELOG | 1 + daemon/spawn.c | 1 + 2 files changed, 2 insertions(+)
CHANGELOG +1 -0
@@ -2,6 +2,7 @@ xx/xx/2018 autofs-5.1.5 - fix flag file permission. - fix directory create permission. - fix use after free in do_master_list_reset(). +- fix deadlock in dumpmaps. 19/12/2017 autofs-5.1.4 - fix spec file url.
daemon/spawn.c +1 -0
@@ -338,6 +338,7 @@ static int do_spawn(unsigned logopt, unsigned int wait,dup2 (pipefd[1 ],STDOUT_FILENO );dup2 (pipefd[1 ],STDERR_FILENO );close (pipefd[1 ]); +open_mutex_unlock ();/* what to mount must always be second last */ while (*pargv++)
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 5/20 autofs-5.1.4 - dont use array for path when not necessary
In reply to Ian KentIn parse_amd.c:do_link_mount() a character array is used to construct a path when a pointer to the relevant amd entry field is sufficient.
--- CHANGELOG | 1 + modules/parse_amd.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
CHANGELOG +1 -0
@@ -3,6 +3,7 @@ xx/xx/2018 autofs-5.1.5 - fix directory create permission. - fix use after free in do_master_list_reset(). - fix deadlock in dumpmaps. +- dont use array for path when not necessary. 19/12/2017 autofs-5.1.4 - fix spec file url.
modules/parse_amd.c +3 -3
@@ -967,8 +967,8 @@ static int do_auto_mount(struct autofs_point *ap, const char *name,static int do_link_mount (struct autofs_point *ap,const char *name,struct amd_entry *entry,unsigned int flags) { -char target[PATH_MAX +1 ];const char *opts = (entry->opts && *entry->opts) ? entry->opts :NULL ; +char *target;int ret;if (entry->sublink) {
@@ -977,14 +977,14 @@ static int do_link_mount(struct autofs_point *ap, const char *name, "error: sublink option length is too long");return 0 ; } -strcpy (target, entry->sublink); + target = entry->sublink; }else {if (strlen (entry->fs) >PATH_MAX ) {error (ap->logopt,MODPREFIX "error: fs option length is too long" );return 0 ; } -strcpy (target, entry->fs); + target = entry->fs; }if (!(flags &CONF_AUTOFS_USE_LOFS ))
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 6/20 autofs-5.1.4 - fix prefix option handling in expand_entry()
In reply to Ian KentThe changes to fix the defaults handling in the amd map parser caused the prefix option to not be expanded and also to not be propagated to submounts in some cases.
But the prefix should be expanded in modules/parse_amd.c:expand_entry() along with the reset of the amd map entry fields.
Just adding this to modules/parse_amd.c:expand_entry() (where it should be) fixes the amd map entry expansion and also fixes the propagation of the prefix to submounts.
--- CHANGELOG | 1 + modules/parse_amd.c | 11 +++++++++++ 2 files changed, 12 insertions(+)
CHANGELOG +1 -0
@@ -4,6 +4,7 @@ xx/xx/2018 autofs-5.1.5 - fix use after free in do_master_list_reset(). - fix deadlock in dumpmaps. - dont use array for path when not necessary. +- fix prefix option handling in expand_entry(). 19/12/2017 autofs-5.1.4 - fix spec file url.
modules/parse_amd.c +11 -0
@@ -725,6 +725,17 @@ static struct substvar *expand_entry(struct autofs_point *ap, entry->rhost = host; } next: +if (entry->pref) { +if (expand_selectors (ap, entry->pref, &expand, sv)) { +debug (logopt,MODPREFIX +"pref expand(\"%s\") -> %s" , + entry->pref, expand); +free (entry->pref); + entry->pref = expand; + } + sv =macro_addvar (sv,"pref" ,4 , entry->pref); + } +if (entry->sublink) {if (expand_selectors (ap, entry->sublink, &expand, sv)) { debug(logopt, MODPREFIX
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 7/20 autofs-5.1.4 - fix sublink option not set from defaults
In reply to Ian KentIf the amd entry sublink option is given in a defaults entry it isn't merged into the current entry during parsing.
--- CHANGELOG | 1 + modules/parse_amd.c | 12 ++++++++++++ 2 files changed, 13 insertions(+)
CHANGELOG +1 -0
@@ -5,6 +5,7 @@ xx/xx/2018 autofs-5.1.5 - fix deadlock in dumpmaps. - dont use array for path when not necessary. - fix prefix option handling in expand_entry(). +- fix sublink option not set from defaults. 19/12/2017 autofs-5.1.4 - fix spec file url.
modules/parse_amd.c +12 -0
@@ -645,6 +645,18 @@ static void update_with_defaults(struct amd_entry *defaults, } } +if (!entry->sublink) { +if (defaults->sublink) { + tmp =strdup (defaults->sublink); +if (tmp) + entry->sublink = tmp; + }else { + v =macro_findvar (sv,"sublink" ,2 ); +if (v) + entry->sublink =strdup (v->val); + } + } +return ; }
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 8/20 autofs-5.1.4 - fix error return in do_nfs_mount()
In reply to Ian KentFix incorrect error return in modules/parse_amd.c:do_nfs_mount().
--- CHANGELOG | 1 + modules/parse_amd.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
CHANGELOG +1 -0
@@ -6,6 +6,7 @@ xx/xx/2018 autofs-5.1.5 - dont use array for path when not necessary. - fix prefix option handling in expand_entry(). - fix sublink option not set from defaults. +- fix error return in do_nfs_mount(). 19/12/2017 autofs-5.1.4 - fix spec file url.
modules/parse_amd.c +1 -1
@@ -1099,7 +1099,7 @@ static int do_nfs_mount(struct autofs_point *ap, const char *name,if (strlen (entry->rhost) +strlen (entry->rfs) +1 >PATH_MAX ) {error (ap->logopt,MODPREFIX "error: rhost + rfs options length is too long" ); -return 0 ; +return 1 ; }strcpy (target, entry->rhost);
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 9/20 autofs-5.1.4 - add error handling for ext_mount_add()
In reply to Ian KentAdd error handling (memory allocation failures) for ext_mount_add().
--- CHANGELOG | 1 + lib/mounts.c | 5 +---- modules/parse_amd.c | 42 ++++++++++++++++++++++++++++++------------ 3 files changed, 32 insertions(+), 16 deletions(-)
CHANGELOG +1 -0
@@ -7,6 +7,7 @@ xx/xx/2018 autofs-5.1.5 - fix prefix option handling in expand_entry(). - fix sublink option not set from defaults. - fix error return in do_nfs_mount(). +- add error handling for ext_mount_add(). 19/12/2017 autofs-5.1.4 - fix spec file url.
lib/mounts.c +1 -4
@@ -715,15 +715,12 @@ int ext_mount_add(struct list_head *entry, const char *path, unsigned int umount } em =malloc (sizeof (struct ext_mount )); -if (!em) { - ret =-1 ; +if (!em) goto done; - } em->mountpoint =strdup (path);if (!em->mountpoint) {free (em); - ret =-1 ; goto done; } em->umount = umount;
modules/parse_amd.c +30 -12
67 lines not on this page · raw message
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 10/20 autofs-5.1.4 - account for recent libnsl changes
In reply to Ian KentThe glibc RPC code has been dropped.
The NIS functionality comes in the libnsl library but it installs its files into sub directories of the system include and library directories.
So configure needs to check for this and allow for it in the compile and linking of the NIS and NIS+ lookup modules.
--- CHANGELOG | 1 Makefile.conf.in | 4 - Makefile.rules | 2 aclocal.m4 | 45 ++++++++ configure | 288 ++++++++++++++++++++++++++++++++++++++++++++++++--- configure.in | 27 ++--- include/config.h.in | 3 + modules/Makefile | 10 ++ 8 files changed, 343 insertions(+), 37 deletions(-)
CHANGELOG +1 -0
@@ -8,6 +8,7 @@ xx/xx/2018 autofs-5.1.5 - fix sublink option not set from defaults. - fix error return in do_nfs_mount(). - add error handling for ext_mount_add(). +- account for recent libnsl changes. 19/12/2017 autofs-5.1.4 - fix spec file url.
Makefile.conf.in +2 -2
@@ -14,8 +14,8 @@ DAEMON_LDFLAGS = @DAEMON_LDFLAGS@ # Glibc < 2.17 requires librt for clock_gettime() LIBCLOCK_GETTIME = @LIBCLOCK_GETTIME@ -# Special parameters for glibc (libc 6) -LIBNSL = @LIBNSL@ +NSLLIB = @NSL_LIBS@ +NSLCFLAGS = @NSL_CFLAGS@ LIBRESOLV = @LIBRESOLV@ # Hesiod support: yes (1) no (0)
Makefile.rules +0 -2
@@ -54,8 +54,6 @@ ifdef DMALLOCLIB LIBS += $(DMALLOCLIB) endif -LIBS += $(LIBNSL) - LIBS += $(LIBCLOCK_GETTIME) # Standard rules
aclocal.m4 +45 -0
48 lines not on this page · raw message
configure +273 -15
348 lines not on this page · raw message
configure.in +9 -18
@@ -209,11 +209,13 @@ fi AC_CHECK_LIB(rt, clock_gettime, LIBCLOCK_GETTIME="-lrt") AC_SUBST(LIBCLOCK_GETTIME) -# -# glibc/libc 6 new libraries -# -AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl") -AC_SUBST(LIBNSL) +PKG_PROG_PKG_CONFIG() +PKG_CHECK_MODULES([NSL],[libnsl],, +[ +AC_CHECK_LIB(nsl, yp_match, NSL_LIBS="-lnsl") +AC_SUBST(NSL_LIBS) +NSL_CFLAGS="" +]) AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv") AC_SUBST(LIBRESOLV)
@@ -254,19 +256,8 @@ AC_SUBST(LIBHESIOD) AC_SUBST(HESIOD_FLAGS) LDFLAGS="${AF_tmp_ldflags}" -# NIS+ support? -HAVE_NISPLUS=0 -AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1) -AC_SUBST(HAVE_NISPLUS) - -# YellowPages support? -HAVE_YPCLNT=0 -AC_CHECK_HEADER([rpcsvc/ypclnt.h], HAVE_YPCLNT=1) -AC_SUBST(HAVE_YPCLNT) -if test "$HAVE_YPCLNT" = "1"; then - AC_DEFINE(HAVE_YPCLNT, 1, - [Define if using YellowPages]) -fi +AF_CHECK_YPCLNT_HEADER() +AF_CHECK_NIS_HEADER() # # OpenLDAP support? Expect that this may have a special directory...
include/config.h.in +3 -0
@@ -57,6 +57,9 @@ /* define if you have MOUNT_NFS */ #undef HAVE_MOUNT_NFS +/* Define if using NIS+ */ +#undef HAVE_NISPLUS + /* define if the umount command supports the -c option */ #undef HAVE_NO_CANON_UMOUNT
modules/Makefile +10 -0
@@ -116,6 +116,16 @@ parse_amd.so: parse_amd.c amd_parse.tab.o amd_tok.o # # Ad hoc compilation rules for modules which need auxilliary libraries # +lookup_yp.so: lookup_yp.c + $(CC) $(SOLDFLAGS) $(CFLAGS) $(NSLCFLAGS) -o lookup_yp.so \ + lookup_yp.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBS) $(NSLLIB) + $(STRIP) lookup_yp.so + +lookup_nisplus.so: lookup_nisplus.c + $(CC) $(SOLDFLAGS) $(CFLAGS) $(NSLCFLAGS) -o lookup_nisplus.so \ + lookup_nisplus.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBS) $(NSLLIB) + $(STRIP) lookup_nisplus.so + lookup_hesiod.so: lookup_hesiod.c $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \ lookup_hesiod.c $(LDFLAGS) $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV) $(LIBS)
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 11/20 autofs-5.1.4 - use_hostname_for_mounts shouldn't prevent selection among replicas
In reply to Ian KentFrom: NeilBrown <[email protected]>
If several replicas have been specified for a mount point, and use_hostname_for_mount is set to "yes", the selection between these replicas is currently disabled and the last in the list is always chosen.
There is little point selecting between different addresses for the one host in this case, but it is still worth selecting between different hosts, particularly if different weights have been specified.
This patch restores the "prune_host_list()" functionality when use_hostname_for_mount is set, and modifies it slightly so that only on IP address for any host:/path entry in the config file is willl be successfully probed. After a success, further addresses from the same entry are skipped. This is achieved by tracking an entry number ("ent_num") for each 'struct host'.
--- CHANGELOG | 1 + include/replicated.h | 3 ++- modules/mount_nfs.c | 2 +- modules/replicated.c | 35 ++++++++++++++++++++--------------- 4 files changed, 24 insertions(+), 17 deletions(-)
CHANGELOG +1 -0
@@ -9,6 +9,7 @@ xx/xx/2018 autofs-5.1.5 - fix error return in do_nfs_mount(). - add error handling for ext_mount_add(). - account for recent libnsl changes. +- use_hostname_for_mounts shouldn't prevent selection among replicas. 19/12/2017 autofs-5.1.4 - fix spec file url.
include/replicated.h +2 -1
@@ -57,6 +57,7 @@struct host {char *name; +int ent_num;struct sockaddr *addr;size_t addr_len;unsigned int rr;
@@ -70,7 +71,7 @@ struct host { };void seed_random (void ); -struct host *new_host (const char *,struct sockaddr *,size_t , +struct host *new_host (const char *,int ,struct sockaddr *,size_t ,unsigned int ,unsigned int ,unsigned int );void free_host_list (struct host **);int parse_location (unsigned ,struct host **,const char *,unsigned int );
modules/mount_nfs.c +1 -1
@@ -236,7 +236,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int (vers & NFS4_VERS_MASK) != 0 && !(vers & UDP6_REQUESTED)) {unsigned int v4_probe_ok =0 ; -struct host *tmp =new_host (hosts->name, +struct host *tmp =new_host (hosts->name,0 , hosts->addr, hosts->addr_len, hosts->proximity, hosts->weight, hosts->options);
modules/replicated.c +20 -15
@@ -83,7 +83,7 @@ void seed_random(void)return ; } -struct host *new_host (const char *name, +struct host *new_host (const char *name,int ent_num,struct sockaddr *addr,size_t addr_len,unsigned int proximity,unsigned int weight,unsigned int options)
@@ -116,6 +116,7 @@ struct host *new_host(const char *name,memset (new,0 ,sizeof (struct host )); new->name = tmp1; + new->ent_num = ent_num; new->addr_len = addr_len; new->addr = tmp2; new->proximity = proximity;
@@ -714,7 +715,7 @@ done:int prune_host_list (unsigned logopt,struct host **list,unsigned int vers,int port) { -struct host *this, *last, *first; +struct host *this, *last, *first, *prev;struct host *new =NULL ;unsigned int proximity, selected_version =0 ;unsigned int v2_tcp_count, v3_tcp_count, v4_tcp_count;
@@ -726,12 +727,6 @@ int prune_host_list(unsigned logopt, struct host **list,if (!*list)return 0 ; -/* If we're using the host name then there's no point probing -* avialability and respose time. -*/ -if (defaults_use_hostname_for_mounts ()) -return 1 ; -/* Use closest hosts to choose NFS version */ first = *list;
@@ -877,11 +872,18 @@ int prune_host_list(unsigned logopt, struct host **list, first = last; this = first; + prev =NULL ;while (this) {struct host *next = this->next;if (!this->name) {remove_host (list, this);add_host (&new, this); + }else if (defaults_use_hostname_for_mounts () && prev && + prev->ent_num == this->ent_num) { +/* When we use the hostname to mount, there is no +* point in probing every address it has, just one is +* enough. Skip the rest. +*/ }else { status =get_supported_ver_and_cost (logopt, this, selected_version, port);
@@ -889,6 +891,7 @@ int prune_host_list(unsigned logopt, struct host **list, this->version = selected_version;remove_host (list, this);add_host (&new, this); + prev = this; } } this = next;
@@ -901,7 +904,7 @@ int prune_host_list(unsigned logopt, struct host **list, }static int add_new_host (struct host **list, -const char *host,unsigned int weight, +const char *host,int ent_num,unsigned int weight,struct addrinfo *host_addr,unsigned int rr,unsigned int options) {
@@ -940,7 +943,7 @@ static int add_new_host(struct host **list,else return 0 ; - new =new_host (host, host_addr->ai_addr, addr_len, prx, weight, options); + new =new_host (host, ent_num, host_addr->ai_addr, addr_len, prx, weight, options);if (!new)return 0 ;
@@ -953,7 +956,7 @@ static int add_new_host(struct host **list,return 1 ; } -static int add_host_addrs (struct host **list,const char *host, +static int add_host_addrs (struct host **list,const char *host,int ent_num,unsigned int weight,unsigned int options) {struct addrinfo hints, *ni, *this;
@@ -988,7 +991,7 @@ static int add_host_addrs(struct host **list, const char *host, this = ni;while (this) { - ret =add_new_host (list, host, weight, this,0 , options); + ret =add_new_host (list, host, ent_num, weight, this,0 , options);if (!ret)break ; this = this->ai_next;
@@ -1027,7 +1030,7 @@ try_name: rr++; this = ni;while (this) { - ret =add_new_host (list, host, weight, this, rr, options); + ret =add_new_host (list, host, ent_num, weight, this, rr, options);if (!ret)break ; this = this->ai_next;
@@ -1120,6 +1123,7 @@ int parse_location(unsigned logopt, struct host **hosts, {char *str, *p, *delim;unsigned int empty =1 ; +int ent_num =1 ;if (!list)return 0 ;
@@ -1177,7 +1181,7 @@ int parse_location(unsigned logopt, struct host **hosts, }if (p != delim) { -if (!add_host_addrs (hosts, p, weight, options)) { +if (!add_host_addrs (hosts, p, ent_num, weight, options)) {if (empty) { p = next;continue ;
@@ -1199,7 +1203,7 @@ int parse_location(unsigned logopt, struct host **hosts, *delim ='\0' ; next = delim +1 ; -if (!add_host_addrs (hosts, p, weight, options)) { +if (!add_host_addrs (hosts, p, ent_num, weight, options)) { p = next;continue ; }
@@ -1213,6 +1217,7 @@ int parse_location(unsigned logopt, struct host **hosts,return 0 ; } + ent_num++; p = next; }
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 12/20 autofs-5.1.4 - fix monotonic_elapsed
In reply to Ian KentFrom: NeilBrown <[email protected]>
When automount probes multiple hosts to find the one which responds most quickly, it currently ignores the nanoseconds. This often makes the cost "0", which makes weights ineffective.
The cause is that monotonic_elapsed() casts tv_nsec to a double *after* dividing by 1 billion, rather than before.
With this change, weights become effective for choosing between hosts which respond in under one second.
--- CHANGELOG | 1 + lib/rpc_subs.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
CHANGELOG +1 -0
@@ -10,6 +10,7 @@ xx/xx/2018 autofs-5.1.5 - add error handling for ext_mount_add(). - account for recent libnsl changes. - use_hostname_for_mounts shouldn't prevent selection among replicas. +- fix monotonic_elapsed. 19/12/2017 autofs-5.1.4 - fix spec file url.
lib/rpc_subs.c +2 -2
@@ -1093,9 +1093,9 @@ double monotonic_elapsed(struct timespec start, struct timespec end)double t1, t2; t1 = (double ) start.tv_sec + - (double ) (start.tv_nsec/(1000 *1000 *1000 )); + ((double ) start.tv_nsec/(1000 *1000 *1000 )); t2 = (double ) end.tv_sec + - (double ) (end.tv_nsec/(1000 *1000 *1000 )); + ((double ) end.tv_nsec/(1000 *1000 *1000 ));return t2 - t1; }
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 13/20 autofs-5.1.4 - Makefiles.rules: remove 'samples' from SUBDIRS
In reply to Ian KentFrom: NeilBrown <[email protected]>
The rules in Makefile make it quite clear that 'samples' is not expected to be part of SUBDIRS. e.g.
- The rule for "clean" handles both $(SUBDIRS) *and* samples.
- There are separate "install" and "install_samples" targets.
However SUBDIRS does contain 'samples'. This means that
a simple "make; make install" will over-write your configuration files.
So remove 'samples' from SUBDIRS. Note that it has been removed in the past, but then got added back again.
--- CHANGELOG | 1 + Makefile.rules | 2 +- autofs.spec | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-)
CHANGELOG +1 -0
@@ -11,6 +11,7 @@ xx/xx/2018 autofs-5.1.5 - account for recent libnsl changes. - use_hostname_for_mounts shouldn't prevent selection among replicas. - fix monotonic_elapsed. +- Makefiles.rules: remove 'samples' from SUBDIRS. 19/12/2017 autofs-5.1.4 - fix spec file url.
Makefile.rules +1 -1
@@ -3,7 +3,7 @@ # # Root directory contents -SUBDIRS = lib daemon modules man samples +SUBDIRS = lib daemon modules man INCDIRS = include INCFILES = COPYING COPYRIGHT NEWS README* TODO Makefile Makefile.rules \ Makefile.conf.in .version .autofs-* configure.in aclocal.m4 \
autofs.spec +6 -0
@@ -121,6 +121,12 @@ install -m 755 redhat/autofs.init $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs install -m 644 redhat/autofs.conf $RPM_BUILD_ROOT/etc/autofs.conf install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs +install -m 644 samples/auto.master $RPM_BUILD_ROOT/etc/auto.master +install -m 644 samples/auto.misc $RPM_BUILD_ROOT/etc/auto.misc +install -m 644 samples/auto.net $RPM_BUILD_ROOT/etc/auto.net +install -m 644 samples/auto.smb $RPM_BUILD_ROOT/etc/auto.smb +install -m 600 samples/autofs_ldap_auth.conf $RPM_BUILD_ROOT/etc/autofs_ldap_auth.conf + %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 14/20 autofs-5.1.4 - dont allow trailing slash in master map mount points
In reply to Ian KentIf a master map mount point path has a trailing '/' this can cause problems so remove them at parse time.
--- CHANGELOG | 1 + lib/master_parse.y | 5 +++++ 2 files changed, 6 insertions(+)
CHANGELOG +1 -0
@@ -12,6 +12,7 @@ xx/xx/2018 autofs-5.1.5 - use_hostname_for_mounts shouldn't prevent selection among replicas. - fix monotonic_elapsed. - Makefiles.rules: remove 'samples' from SUBDIRS. +- dont allow trailing slash in master map mount points. 19/12/2017 autofs-5.1.4 - fix spec file url.
lib/master_parse.y +5 -0
@@ -749,6 +749,7 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne struct map_source *source; unsigned int logopt = logging; unsigned int m_logopt = master->logopt; + size_t mp_len; int ret; local_init_vars();
@@ -763,6 +764,10 @@ int master_parse_entry(const char *buffer, unsigned int default_timeout, unsigne return 0; } + mp_len = strlen(path); + while (mp_len && path[--mp_len] == '/') + path[mp_len] = 0; + nc = master->nc; /* Add null map entries to the null map cache */
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 15/20 autofs-5.1.4 - fix libresolv configure check
In reply to Ian KentThe libresolv functions are not found by AC_CHECK_LIB() unless they are prefixed with "__".
So change the library check to also look for __<function> during the check.
--- CHANGELOG | 1 + configure | 41 +++++++++++++++++++++++++++++++++++++++++ configure.in | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-)
CHANGELOG +1 -0
@@ -13,6 +13,7 @@ xx/xx/2018 autofs-5.1.5 - fix monotonic_elapsed. - Makefiles.rules: remove 'samples' from SUBDIRS. - dont allow trailing slash in master map mount points. +- fix libresolv configure check. 19/12/2017 autofs-5.1.4 - fix spec file url.
configure +41 -0
47 lines not on this page · raw message
configure.in +1 -1
@@ -217,7 +217,7 @@ AC_SUBST(NSL_LIBS) NSL_CFLAGS="" ]) -AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv") +AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv", AC_CHECK_LIB(resolv, __res_query, LIBRESOLV="-lresolv")) AC_SUBST(LIBRESOLV) #
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 16/20 autofs-5.1.4 - add fedfs-getsrvinfo.c
In reply to Ian KentAdd the fedfs domain information discovery library functions.
--- CHANGELOG | 1 fedfs/fedfs-getsrvinfo.c | 311 ++++++++++++++++++++++++++++++++++++++++++++++ fedfs/fedfs-getsrvinfo.h | 52 ++++++++ 3 files changed, 364 insertions(+) create mode 100644 fedfs/fedfs-getsrvinfo.c create mode 100644 fedfs/fedfs-getsrvinfo.h
CHANGELOG +1 -0
@@ -14,6 +14,7 @@ xx/xx/2018 autofs-5.1.5 - Makefiles.rules: remove 'samples' from SUBDIRS. - dont allow trailing slash in master map mount points. - fix libresolv configure check. +- add fedfs-getsrvinfo.c. 19/12/2017 autofs-5.1.4 - fix spec file url.
fedfs/fedfs-getsrvinfo.c new file +311 -0
311 lines not on this page · raw message
fedfs/fedfs-getsrvinfo.h new file +52 -0
52 lines not on this page · raw message
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 17/20 autofs-5.1.4 - add mount.fedfs.c
In reply to Ian KentAdd build and install of the mount.fedfs binary.
--- CHANGELOG | 1 Makefile | 3 Makefile.rules | 2 autofs.spec | 1 fedfs/Makefile | 36 +++ fedfs/fedfs-gpl-boiler.h | 40 ++++ fedfs/fedfs-nls.h | 38 ++++ fedfs/mount.fedfs.c | 485 ++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 605 insertions(+), 1 deletion(-) create mode 100644 fedfs/Makefile create mode 100644 fedfs/fedfs-gpl-boiler.h create mode 100644 fedfs/fedfs-nls.h create mode 100644 fedfs/mount.fedfs.c
CHANGELOG +1 -0
@@ -15,6 +15,7 @@ xx/xx/2018 autofs-5.1.5 - dont allow trailing slash in master map mount points. - fix libresolv configure check. - add fedfs-getsrvinfo.c. +- add mount.fedfs.c. 19/12/2017 autofs-5.1.4 - fix spec file url.
Makefile +3 -0
@@ -19,6 +19,9 @@ kernel: samples: set -e; if [ -d samples ]; then $(MAKE) -C samples all; fi +fedfs: + set -e; if [ -d fedfs ]; then $(MAKE) -C fedfs all; fi + clean: for i in $(SUBDIRS) samples; do \ if [ -d $$i ]; then $(MAKE) -C $$i clean; fi; done
Makefile.rules +1 -1
@@ -3,7 +3,7 @@ # # Root directory contents -SUBDIRS = lib daemon modules man +SUBDIRS = lib daemon fedfs modules man INCDIRS = include INCFILES = COPYING COPYRIGHT NEWS README* TODO Makefile Makefile.rules \ Makefile.conf.in .version .autofs-* configure.in aclocal.m4 \
autofs.spec +1 -0
@@ -191,6 +191,7 @@ fi %config(noreplace) /etc/sysconfig/autofs %config(noreplace) /etc/autofs_ldap_auth.conf %{_sbindir}/automount +%{_sbindir}/mount.fedfs %dir %{_libdir}/autofs %{_libdir}/autofs/* %{_mandir}/*/*
fedfs/Makefile new file +36 -0
@@ -0,0 +1,36 @@ +# +# Makefile for mount.fedfs +# + +-include ../Makefile.conf +include ../Makefile.rules + +SRCS = mount.fedfs.c +HDRS = fedfs-getsrvinfo.h fedfs-gpl-boiler.h fedfs-nls.h + +fedfs-getsrvinfo_OBJ = fedfs-getsrvinfo.o + +mount_fedfs_OBJ = mount.fedfs.o + +version := $(shell cat ../.version) + +CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include +CFLAGS += -DVERSION_STRING=\"$(version)\" +LDFLAGS += -rdynamic + +all: mount.fedfs + +mount.fedfs: $(mount_fedfs_OBJ) $(fedfs-getsrvinfo_OBJ) $(HDRS) + $(CC) -o mount.fedfs \ + $(mount_fedfs_OBJ) $(fedfs-getsrvinfo_OBJ) \ + $(LDFLAGS) $(LIBRESOLV) $(LIBS) + +clean: + rm -f *.o *.s *~ mount.fedfs + +install: all + install -d -m 755 $(INSTALLROOT)$(sbindir) + if ! test -x $(INSTALLROOT)$(sbindir)/mount.fedfs; \ + then \ + install -c mount.fedfs -m 755 $(INSTALLROOT)$(sbindir); \ + fi
fedfs/fedfs-gpl-boiler.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2011 Oracle. All rights reserved. +* +* This file is part of fedfs-utils. +* +* fedfs-utils is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2.0 as +* published by the Free Software Foundation. +* +* fedfs-utils is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License version 2.0 for more details. +* +* You should have received a copy of the GNU General Public License +* version 2.0 along with fedfs-utils. If not, see: +* +* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +*/ + +#ifndef _GPL_BOILER_H_ +#define _GPL_BOILER_H_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +/** +* GPLv2 boilerplate for usage messages +*/ +static const char *fedfs_gpl_boilerplate = +"\nCopyright 2010, 2011, 2012, 2013 Oracle. " +"All rights reserved.\n\n" +"License GPLv2: " +"<http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>\n" +"This is free software. " +"You are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" ; + +#endif /* !_GPL_BOILER_H_ */
fedfs/fedfs-nls.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* From util-linux/include/nls.h (GPLv2) +*/ + +#ifndef UTIL_LINUX_NLS_H +#define UTIL_LINUX_NLS_H + +int main (int argc,char *argv[]); + +#ifndef LOCALEDIR +#define LOCALEDIR "/usr/share/locale" +#endif + +#ifdef HAVE_LOCALE_H +# include <locale.h> +#else +# undef setlocale +# define setlocale (Category, Locale) ({})/* empty */ +#endif + +#ifdef ENABLE_NLS +# include <libintl.h> +# define _ (Text) gettext (Text) +# ifdef gettext_noop +# define N_ (String) gettext_noop (String) +# else +# define N_ (String) (String) +# endif +#else +# undef bindtextdomain +# define bindtextdomain (Domain, Directory)/* empty */ +# undef textdomain +# define textdomain (Domain)/* empty */ +# define _ (Text) (Text) +# define N_ (Text) (Text) +#endif + +#endif /* UTIL_LINUX_NLS_H */
fedfs/mount.fedfs.c new file +485 -0
485 lines not on this page · raw message
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 18/20 autofs-5.1.4 - add fedfs-map-nfs4.c
In reply to Ian KentAdd build (and install) of the fedfs program map, fedfs-map-nfs4.
--- CHANGELOG | 1 autofs.spec | 1 fedfs/Makefile | 12 ++- fedfs/fedfs-map-nfs4.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++++ fedfs/fedfs-token.h | 40 +++++++++ 5 files changed, 256 insertions(+), 2 deletions(-) create mode 100644 fedfs/fedfs-map-nfs4.c create mode 100644 fedfs/fedfs-token.h
CHANGELOG +1 -0
@@ -16,6 +16,7 @@ xx/xx/2018 autofs-5.1.5 - fix libresolv configure check. - add fedfs-getsrvinfo.c. - add mount.fedfs.c. +- add fedfs-map-nfs4.c. 19/12/2017 autofs-5.1.4 - fix spec file url.
autofs.spec +1 -0
@@ -192,6 +192,7 @@ fi %config(noreplace) /etc/autofs_ldap_auth.conf %{_sbindir}/automount %{_sbindir}/mount.fedfs +%{_sbindir}/fedfs-map-nfs4 %dir %{_libdir}/autofs %{_libdir}/autofs/* %{_mandir}/*/*
fedfs/Makefile +10 -2
@@ -6,11 +6,13 @@ include ../Makefile.rules SRCS = mount.fedfs.c -HDRS = fedfs-getsrvinfo.h fedfs-gpl-boiler.h fedfs-nls.h +HDRS = fedfs-getsrvinfo.h fedfs-gpl-boiler.h fedfs-nls.h \ + fedfs-token.h fedfs-getsrvinfo_OBJ = fedfs-getsrvinfo.o mount_fedfs_OBJ = mount.fedfs.o +fedfs-map-nfs4_OBJ = fedfs-map-nfs4.o version := $(shell cat ../.version)
@@ -18,18 +20,24 @@ CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include CFLAGS += -DVERSION_STRING=\"$(version)\" LDFLAGS += -rdynamic -all: mount.fedfs +all: mount.fedfs fedfs-map-nfs4 mount.fedfs: $(mount_fedfs_OBJ) $(fedfs-getsrvinfo_OBJ) $(HDRS) $(CC) -o mount.fedfs \ $(mount_fedfs_OBJ) $(fedfs-getsrvinfo_OBJ) \ $(LDFLAGS) $(LIBRESOLV) $(LIBS) +fedfs-map-nfs4: $(fedfs-map-nfs4_OBJ) $(fedfs-getsrvinfo_OBJ) $(HDRS) + $(CC) -o fedfs-map-nfs4 \ + $(fedfs-map-nfs4_OBJ) $(fedfs-getsrvinfo_OBJ) \ + $(LDFLAGS) $(LIBRESOLV) $(LIBS) + clean: rm -f *.o *.s *~ mount.fedfs install: all install -d -m 755 $(INSTALLROOT)$(sbindir) + install -c fedfs-map-nfs4 -m 755 $(INSTALLROOT)$(sbindir); \ if ! test -x $(INSTALLROOT)$(sbindir)/mount.fedfs; \ then \ install -c mount.fedfs -m 755 $(INSTALLROOT)$(sbindir); \
fedfs/fedfs-map-nfs4.c new file +204 -0
204 lines not on this page · raw message
fedfs/fedfs-token.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright (C) 2007 Oracle. All rights reserved. +* Copyright (C) 2007 Chuck Lever <[email protected]> +* +* This file is part of fedfs-utils. +* +* fedfs-utils is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2.0 as +* published by the Free Software Foundation. +* +* fedfs-utils is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License version 2.0 for more details. +* +* You should have received a copy of the GNU General Public License +* version 2.0 along with fedfs-utils. If not, see: +* +* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +*/ + +#ifndef _FEDFS_UTILS_TOKEN_H +#define _FEDFS_UTILS_TOKEN_H + +#include <sys/cdefs.h> + +/** +* Private tokenizer state object +*/ +struct tokenizer ; + +__attribute_malloc__ +struct tokenizer *tk_new_tokenizer(const char *string, +const char delimiter); +__attribute_malloc__ +char *tk_next_token(struct tokenizer *state); +void tk_free_tokenizer (struct tokenizer *state); +int tk_tokenizer_error (const struct tokenizer *state); + +#endif /* !_FEDFS_UTILS_TOKEN_H */
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 19/20 autofs-5.1.4 - add conditional inclusion of fedfs binaries
In reply to Ian KentAdd conditional inclusion of the fedfs binaries.
Using configure a --with-fedfs is needed to build and install the fedfs binaries.
Using rpmbuild -tb <autofs tar> it's necessary to add the option --without fedfs to exclude the fedfs binaries from the resulting rpm package.
--- CHANGELOG | 1 + Makefile.conf.in | 2 ++ Makefile.rules | 6 +++++- autofs.spec | 12 +++++++++++- configure | 16 ++++++++++++++++ configure.in | 9 +++++++++ 6 files changed, 44 insertions(+), 2 deletions(-)
CHANGELOG +1 -0
@@ -17,6 +17,7 @@ xx/xx/2018 autofs-5.1.5 - add fedfs-getsrvinfo.c. - add mount.fedfs.c. - add fedfs-map-nfs4.c. +- add conditional inclusion of fedfs binaries. 19/12/2017 autofs-5.1.4 - fix spec file url.
Makefile.conf.in +2 -0
@@ -58,6 +58,8 @@ EXT3FS = @HAVE_E3FSCK@ # Support for calling e4fsck when mounting ext4 filesystems EXT4FS = @HAVE_E4FSCK@ +FEDFS = @ENABLE_FEDFS@ + LEX = @PATH_LEX@ YACC = @PATH_YACC@ RPCGEN = @PATH_RPCGEN@
Makefile.rules +5 -1
@@ -3,12 +3,16 @@ # # Root directory contents -SUBDIRS = lib daemon fedfs modules man +SUBDIRS = lib daemon modules man INCDIRS = include INCFILES = COPYING COPYRIGHT NEWS README* TODO Makefile Makefile.rules \ Makefile.conf.in .version .autofs-* configure.in aclocal.m4 \ configure *.patch autofs.spec +ifeq ($(FEDFS), 1) + SUBDIRS += fedfs +endif + # Attempt to be friends with autotools INSTALLROOT = $(DESTDIR)
autofs.spec +11 -1
@@ -16,6 +16,10 @@ # disable them. %define with_libtirpc %{?_without_libtirpc: 0} %{?!_without_libtirpc: 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 from automatically mounting and umounting filesystems. Name: autofs %define version 5.1.4
@@ -82,6 +86,9 @@ echo %{version}-%{release} > .version %if %{with_libtirpc} %define libtirpc_configure_arg --with-libtirpc %endif +%if %{with_fedfs} + %define fedfs_configure_arg --enable-fedfs +%endif %build CFLAGS="$RPM_OPT_FLAGS -Wall" \
@@ -90,7 +97,8 @@ LDFLAGS="-Wl,-z,now" \ --disable-mount-locking \ --enable-ignore-busy \ %{?systemd_configure_arg:} \ - %{?libtirpc_configure_arg:} + %{?libtirpc_configure_arg:} \ + %{?fedfs_configure_arg:} CFLAGS="$RPM_OPT_FLAGS -Wall" LDFLAGS="-Wl,-z,now" make initdir=/etc/rc.d/init.d DONTSTRIP=1 %install
@@ -191,8 +199,10 @@ fi %config(noreplace) /etc/sysconfig/autofs %config(noreplace) /etc/autofs_ldap_auth.conf %{_sbindir}/automount +%if %{with_fedfs} %{_sbindir}/mount.fedfs %{_sbindir}/fedfs-map-nfs4 +%endif %dir %{_libdir}/autofs %{_libdir}/autofs/* %{_mandir}/*/*
configure +16 -0
@@ -648,6 +648,7 @@ NSL_CFLAGS LIBCLOCK_GETTIME KRB5_CONFIG XML_CONFIG +ENABLE_FEDFS sssldir HAVE_SSS_AUTOFS PATH_RPCGEN
@@ -743,6 +744,7 @@ with_libtirpc with_dmalloc enable_sloppy_mount enable_no_canon_umount +enable_fedfs with_hesiod with_openldap with_sasl
@@ -1377,6 +1379,7 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-sloppy-mount enable the use of the -s option to mount --enable-no-canon-umount enable the use of the -c option to umount + --enable-fedfs enable inclusion of fedfs binaries mount.fedfs and fedfs-map-nfs4 --disable-ext-env disable search in environment for substitution variable --disable-mount-locking disable use of locking when spawning mount command --enable-force-shutdown enable USR1 signal to force unlink umount of any
@@ -4246,6 +4249,19 @@ $as_echo "#define HAVE_NO_CANON_UMOUNT 1" >>confdefs.h fi +ENABLE_FEDFS="" +# Check whether --enable-fedfs was given. +if test "${enable_fedfs+set}" = set; then : + enableval=$enable_fedfs; +else + enable_fedfs=no +fi + +if test x$enable_fedfs = xyes; then + ENABLE_FEDFS="1" +fi + + # LDAP SASL auth needs libxml and Kerberos for ac_prog in xml2-config do
configure.in +9 -0
@@ -195,6 +195,15 @@ if test x$enable_no_canon_umount = xyes; then AC_DEFINE(HAVE_NO_CANON_UMOUNT, 1, [define if the umount command supports the -c option]) fi +ENABLE_FEDFS="" +AC_ARG_ENABLE(fedfs, +[ --enable-fedfs enable inclusion of fedfs binaries mount.fedfs and fedfs-map-nfs4],, + enable_fedfs=no) +if test x$enable_fedfs = xyes; then + ENABLE_FEDFS="1" +fi +AC_SUBST(ENABLE_FEDFS) + # LDAP SASL auth needs libxml and Kerberos AF_CHECK_LIBXML() AF_CHECK_KRB5()
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerPATCH 20/20 autofs-5.1.4 - add an example fedfs master map entry to the installed master map
In reply to Ian KentAdd an example of using the fedfs program map (to facilitate access to fedfs domain mounts) to the installed master map.
--- CHANGELOG | 1 + samples/auto.master | 6 ++++++ 2 files changed, 7 insertions(+)
CHANGELOG +1 -0
@@ -18,6 +18,7 @@ xx/xx/2018 autofs-5.1.5 - add mount.fedfs.c. - add fedfs-map-nfs4.c. - add conditional inclusion of fedfs binaries. +- add an example fedfs master map entry to the installed master map. 19/12/2017 autofs-5.1.4 - fix spec file url.
samples/auto.master +6 -0
@@ -17,6 +17,12 @@ # +dir:/etc/auto.master.d # +# If you have fedfs setup and the realted binaries, either +# built as part of autofs or installed from another package, +# uncomment this line to use the fedfs program map to access +# your fedfs mounts. +#/nfs4 /usr/sbin/fedfs-map-nfs4 nobind +# # Include central master map if it can be found using # nsswitch sources. #
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Re: [PATCH 20/20] autofs-5.1.4 - add an example fedfs master map entry to the installed master map
Quoted 24 lines · Ian Kent
Add an example of using the fedfs program map (to facilitate access to fedfs domain mounts) to the installed master map.
--- CHANGELOG | 1 + samples/auto.master | 6 ++++++ 2 files changed, 7 insertions(+)CHANGELOG +1
-0@@ -18,6 +18,7 @@ xx/xx/2018 autofs-5.1.5 - add mount.fedfs.c. - add fedfs-map-nfs4.c. - add conditional inclusion of fedfs binaries. +- add an example fedfs master map entry to the installed master map. 19/12/2017 autofs-5.1.4 - fix spec file url.samples/auto.master +0
-0
samples/auto.master line 20
Quoted 4 lines
samples/auto.master +1
-0@@ -17,6 +17,12 @@ # +dir:/etc/auto.master.d # +# If you have fedfs setup and the realted binaries, either
s/setup/set up/ (?)
s/realted/related/
Regards
Vince
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerRe: [PATCH 20/20] autofs-5.1.4 - add an example fedfs master map entry to the installed master map
Quoted 18 lines · Vincent McIntyre
Quoted 17 lines · Ian Kent
Add an example of using the fedfs program map (to facilitate access to fedfs domain mounts) to the installed master map.
--- CHANGELOG | 1 + samples/auto.master | 6 ++++++ 2 files changed, 7 insertions(+)CHANGELOG +1
-0@@ -18,6 +18,7 @@ xx/xx/2018 autofs-5.1.5 - add mount.fedfs.c. - add fedfs-map-nfs4.c. - add conditional inclusion of fedfs binaries. +- add an example fedfs master map entry to the installed master map.
Quoted 14 lines
samples/auto.master line 20
Quoted 11 lines
CHANGELOG +0
-019/12/2017 autofs-5.1.4 - fix spec file url.samples/auto.master +1
-0@@ -17,6 +17,12 @@ # +dir:/etc/auto.master.d # +# If you have fedfs setup and the realted binaries, eithers/setup/set up/ (?)
s/realted/related/
Ha, thanks Vince.
Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in