Browse Source

autofs: Updated (4.1.4 -> 5.0.5)

stable/0.2
Christian Wiese 14 years ago committed by Christian Wiese
parent
commit
decee6ad8d
  1. 116
      filesystem/autofs/2-fg.patch
  2. 625
      filesystem/autofs/3-syslog.patch
  3. 54
      filesystem/autofs/autofs-5.0.5-heimdal.patch
  4. 11
      filesystem/autofs/autofs.conf
  5. 76
      filesystem/autofs/autofs.desc

116
filesystem/autofs/2-fg.patch

@ -1,116 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../autofs/2-fg.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
add -f --foreground option which prevents automount from daemonizing
adapted from: http://lkml.org/lkml/2004/10/7/217 by Denis Vlasenko
diff -urpN autofs-4.1.4/daemon/automount.c autofs-4.1.4-fg/daemon/automount.c
--- autofs-4.1.4/daemon/automount.c 2005-03-06 06:43:55.000000000 -0300
+++ autofs-4.1.4-fg/daemon/automount.c 2006-02-12 10:21:38.000000000 -0300
@@ -60,6 +60,7 @@ static int submount = 0;
int do_verbose = 0; /* Verbose feedback option */
int do_debug = 0; /* Enable full debug output */
+int daemonize = 1; /* Shall we daemonize? */
sigset_t ready_sigs; /* signals only accepted in ST_READY */
sigset_t lock_sigs; /* signals blocked for locking */
@@ -1282,7 +1283,7 @@ static void become_daemon(void)
chdir("/");
/* Detach from foreground process */
- if (!submount) {
+ if (!submount && daemonize) {
pid = fork();
if (pid > 0)
exit(0);
@@ -1311,9 +1311,15 @@
* ouselves from the controling tty. This ensures we don't get unexpected
* signals. This call also sets us as the process group leader.
*/
- if (!submount && (setsid() == -1)) {
- crit("setsid: %m");
- exit(1);
+ if (!submount) {
+ if (daemonize && (setsid() == -1)) {
+ crit("setsid: %m");
+ exit(1);
+ }
+ if (!daemonize && (setpgrp() == -1)) {
+ crit("setpgrp: %m");
+ exit(1);
+ }
}
my_pgrp = getpgrp();
@@ -1327,7 +1328,7 @@ static void become_daemon(void)
crit("redirecting file descriptors failed: %m");
exit(1);
}
- close(nullfd);
+ if (nullfd > 2) close(nullfd);
/* Write pid file if requested */
if (pid_file) {
@@ -1379,7 +1380,19 @@ static unsigned long getnumopt(char *str
static void usage(void)
{
- fprintf(stderr, "Usage: %s [options] path map_type [args...]\n", program);
+ fprintf(stderr,
+ "Usage: %s [options] path map_type [args...]\n"
+ " -h --help this text\n"
+ " -p --pid-file f write process id to file f\n"
+ " -t --timeout n auto-unmount in n seconds (0-disable)\n"
+ " -f --foreground do not daemonize\n"
+ " -v --verbose be verbose\n"
+ " -d --debug be even more verbose\n"
+ " -V --version print version and exit\n"
+ /* " -g --ghost \n" */
+ /* " --submount \n" */
+ , program
+ );
}
static void setup_signals(__sighandler_t event_handler, __sighandler_t cld_handler)
@@ -1666,6 +1679,7 @@ int main(int argc, char *argv[])
{"help", 0, 0, 'h'},
{"pid-file", 1, 0, 'p'},
{"timeout", 1, 0, 't'},
+ {"foreground", 0, 0, 'f'},
{"verbose", 0, 0, 'v'},
{"debug", 0, 0, 'd'},
{"version", 0, 0, 'V'},
@@ -1683,7 +1697,7 @@ int main(int argc, char *argv[])
ap.dir_created = 0; /* We haven't created the main directory yet */
opterr = 0;
- while ((opt = getopt_long(argc, argv, "+hp:t:vdVg", long_options, NULL)) != EOF) {
+ while ((opt = getopt_long(argc, argv, "+hp:t:fvdVg", long_options, NULL)) != EOF) {
switch (opt) {
case 'h':
usage();
@@ -1697,6 +1711,10 @@ int main(int argc, char *argv[])
ap.exp_timeout = getnumopt(optarg, opt);
break;
+ case 'f':
+ daemonize = 0;
+ break;
+
case 'v':
do_verbose = 1;
break;

625
filesystem/autofs/3-syslog.patch

@ -1,625 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../autofs/3-syslog.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
add -s --stderr option which makes automounter send all log output to stderr
adapted from: http://lkml.org/lkml/2004/10/7/217 by Denis Vlasenko
diff -urpN autofs-4.1.4-fg/daemon/automount.c autofs-4.1.4-syslog/daemon/automount.c
--- autofs-4.1.4-fg/daemon/automount.c 2006-02-12 10:21:38.000000000 -0300
+++ autofs-4.1.4-syslog/daemon/automount.c 2006-02-12 10:22:03.000000000 -0300
@@ -39,7 +39,7 @@
#include <linux/auto_fs4.h>
#ifndef NDEBUG
-#define assert(x) do { if (!(x)) { syslog(LOG_CRIT, __FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
+#define assert(x) do { if (!(x)) { crit(__FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
#else
#define assert(x) do { } while(0)
#endif
@@ -62,6 +62,8 @@ int do_verbose = 0; /* Verbose feedback
int do_debug = 0; /* Enable full debug output */
int daemonize = 1; /* Shall we daemonize? */
+int log_stderr; /* Use stderr instead of syslog? */
+
sigset_t ready_sigs; /* signals only accepted in ST_READY */
sigset_t lock_sigs; /* signals blocked for locking */
sigset_t sigchld_mask;
@@ -160,7 +162,7 @@ static int umount_ent(const char *root,
umount_ok = 1;
if (umount_ok || is_smbfs) {
- rv = spawnll(LOG_DEBUG,
+ rv = spawnll(debug,
PATH_UMOUNT, PATH_UMOUNT, path_buf, NULL);
}
}
@@ -314,13 +316,13 @@ static int do_umount_autofs(void)
struct stat st;
int ret;
- rv = spawnll(LOG_DEBUG,
+ rv = spawnll(debug,
PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
if (rv & MTAB_NOTUPDATED) {
info("umount %s succeeded: "
"mtab not updated, retrying to clean\n",
ap.path);
- rv = spawnll(LOG_DEBUG,
+ rv = spawnll(debug,
PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
}
ret = stat(ap.path, &st);
@@ -450,7 +452,7 @@ static int mount_autofs(char *path)
}
our_name[len] = '\0';
- if (spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
+ if (spawnll(debug, PATH_MOUNT, PATH_MOUNT,
"-t", "autofs", "-o", options, our_name, path, NULL) != 0) {
crit("failed to mount autofs path %s", ap.path);
rmdir_path(ap.path);
@@ -542,7 +544,7 @@ static int send_fail(unsigned int wait_q
return 0;
debug("send_fail: token=%d\n", wait_queue_token);
if (ioctl(ap.ioctlfd, AUTOFS_IOC_FAIL, wait_queue_token) < 0) {
- syslog(LOG_ERR, "AUTOFS_IOC_FAIL: %m");
+ error("AUTOFS_IOC_FAIL: %m");
return 1;
}
return 0;
@@ -948,7 +950,7 @@ static int get_pkt(int fd, union autofs_
if (poll(fds, 2, -1) == -1) {
if (errno == EINTR)
continue;
- syslog(LOG_ERR, "get_pkt: poll failed: %m");
+ error("get_pkt: poll failed: %s", strerror(errno));
return -1;
}
@@ -1277,7 +1279,6 @@ static void become_daemon(void)
{
FILE *pidfp;
pid_t pid;
- int nullfd;
/* Don't BUSY any directories unnecessarily */
chdir("/");
@@ -1293,9 +1294,12 @@ static void become_daemon(void)
exit(1);
}
}
-
- /* Open syslog */
- openlog("automount", LOG_PID, LOG_DAEMON);
+ /* Initialize logging subsystem */
+ if(!log_stderr) {
+ log_to_syslog();
+ } else {
+ log_to_stderr();
+ }
/* Initialize global data */
my_pid = getpid();
@@ -1317,26 +1321,14 @@ static void become_daemon(void)
}
my_pgrp = getpgrp();
- /* Redirect all our file descriptors to /dev/null */
- if ((nullfd = open("/dev/null", O_RDWR)) < 0) {
- crit("cannot open /dev/null: %m");
- exit(1);
- }
-
- if (dup2(nullfd, STDIN_FILENO) < 0 ||
- dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
- crit("redirecting file descriptors failed: %m");
- exit(1);
- }
- if (nullfd > 2) close(nullfd);
-
/* Write pid file if requested */
if (pid_file) {
if ((pidfp = fopen(pid_file, "wt"))) {
fprintf(pidfp, "%lu\n", (unsigned long) my_pid);
fclose(pidfp);
} else {
- warn("failed to write pid file %s: %m", pid_file);
+ warn("failed to write pid file %s: %s", pid_file,
+ strerror(errno));
pid_file = NULL;
}
}
@@ -1386,6 +1378,7 @@ static void usage(void)
" -p --pid-file f write process id to file f\n"
" -t --timeout n auto-unmount in n seconds (0-disable)\n"
" -f --foreground do not daemonize\n"
+ " -s --stderr log to stderr instead of syslog\n"
" -v --verbose be verbose\n"
" -d --debug be even more verbose\n"
" -V --version print version and exit\n"
@@ -1680,6 +1673,7 @@ int main(int argc, char *argv[])
{"pid-file", 1, 0, 'p'},
{"timeout", 1, 0, 't'},
{"foreground", 0, 0, 'f'},
+ {"stderr", 0, 0, 's'},
{"verbose", 0, 0, 'v'},
{"debug", 0, 0, 'd'},
{"version", 0, 0, 'V'},
@@ -1697,7 +1691,7 @@ int main(int argc, char *argv[])
ap.dir_created = 0; /* We haven't created the main directory yet */
opterr = 0;
- while ((opt = getopt_long(argc, argv, "+hp:t:fvdVg", long_options, NULL)) != EOF) {
+ while ((opt = getopt_long(argc, argv, "+hp:t:fsvdVg", long_options, NULL)) != EOF) {
switch (opt) {
case 'h':
usage();
@@ -1715,6 +1709,10 @@ int main(int argc, char *argv[])
daemonize = 0;
break;
+ case 's':
+ log_stderr = 1;
+ break;
+
case 'v':
do_verbose = 1;
break;
@@ -1739,7 +1737,7 @@ int main(int argc, char *argv[])
}
if (geteuid() != 0) {
- fprintf(stderr, "%s: This program must be run by root.\n", program);
+ fprintf(stderr, "%s: This program must be run by root\n", program);
exit(1);
}
@@ -1766,9 +1764,9 @@ int main(int argc, char *argv[])
#ifdef DEBUG
if (mapargc) {
int i;
- syslog(LOG_DEBUG, "Map argc = %d", mapargc);
+ debug("Map argc = %d", mapargc);
for (i = 0; i < mapargc; i++)
- syslog(LOG_DEBUG, "Map argv[%d] = %s", i, mapargv[i]);
+ debug("Map argv[%d] = %s", i, mapargv[i]);
}
#endif
diff -urpN autofs-4.1.4-fg/daemon/spawn.c autofs-4.1.4-syslog/daemon/spawn.c
--- autofs-4.1.4-fg/daemon/spawn.c 2005-02-10 09:56:53.000000000 -0300
+++ autofs-4.1.4-syslog/daemon/spawn.c 2006-02-12 10:22:03.000000000 -0300
@@ -199,7 +199,7 @@ out:
#define ERRBUFSIZ 2047 /* Max length of error string excl \0 */
-static int do_spawn(int logpri, int use_lock, const char *prog, const char *const *argv)
+static int do_spawn(logger* log, int use_lock, const char *prog, const char *const *argv)
{
pid_t f;
int status, pipefd[2];
@@ -260,7 +260,7 @@ static int do_spawn(int logpri, int use_
while (errp && (p = memchr(sp, '\n', errp))) {
*p++ = '\0';
if (sp[0]) /* Don't output empty lines */
- syslog(logpri, ">> %s", sp);
+ log(">> %s", sp);
errp -= (p - sp);
sp = p;
}
@@ -271,7 +271,7 @@ static int do_spawn(int logpri, int use_
if (errp >= ERRBUFSIZ) {
/* Line too long, split */
errbuf[errp] = '\0';
- syslog(logpri, ">> %s", errbuf);
+ log(">> %s", errbuf);
errp = 0;
}
}
@@ -281,7 +281,7 @@ static int do_spawn(int logpri, int use_
if (errp > 0) {
/* End of file without \n */
errbuf[errp] = '\0';
- syslog(logpri, ">> %s", errbuf);
+ log(">> %s", errbuf);
}
if (waitpid(f, &status, 0) != f)
@@ -296,12 +296,12 @@ static int do_spawn(int logpri, int use_
}
}
-int spawnv(int logpri, const char *prog, const char *const *argv)
+int spawnv(logger* log, const char *prog, const char *const *argv)
{
- return do_spawn(logpri, 0, prog, argv);
+ return do_spawn(log, 0, prog, argv);
}
-int spawnl(int logpri, const char *prog, ...)
+int spawnl(logger* log, const char *prog, ...)
{
va_list arg;
int argc;
@@ -319,10 +319,10 @@ int spawnl(int logpri, const char *prog,
while ((*p++ = va_arg(arg, char *)));
va_end(arg);
- return do_spawn(logpri, 0, prog, (const char **) argv);
+ return do_spawn(log, 0, prog, (const char **) argv);
}
-int spawnll(int logpri, const char *prog, ...)
+int spawnll(logger* log, const char *prog, ...)
{
va_list arg;
int argc;
@@ -340,5 +340,5 @@ int spawnll(int logpri, const char *prog
while ((*p++ = va_arg(arg, char *)));
va_end(arg);
- return do_spawn(logpri, 1, prog, (const char **) argv);
+ return do_spawn(log, 1, prog, (const char **) argv);
}
diff -urpN autofs-4.1.4-fg/include/automount.h autofs-4.1.4-syslog/include/automount.h
--- autofs-4.1.4-fg/include/automount.h 2005-01-26 10:03:02.000000000 -0300
+++ autofs-4.1.4-syslog/include/automount.h 2006-02-12 10:22:03.000000000 -0300
@@ -117,13 +117,30 @@ struct autofs_point {
extern struct autofs_point ap;
+ /* log notification */
+
+extern int do_verbose;
+extern int do_debug;
+
+typedef void logger(const char* msg, ...);
+
+extern void (*info)(const char* msg, ...);
+extern void (*notice)(const char* msg, ...);
+extern void (*warn)(const char* msg, ...);
+extern void (*error)(const char* msg, ...);
+extern void (*crit)(const char* msg, ...);
+extern void (*debug)(const char* msg, ...);
+
+void log_to_syslog();
+void log_to_stderr();
+
/* Standard function used by daemon or modules */
int aquire_lock(void);
void release_lock(void);
-int spawnll(int logpri, const char *prog, ...);
-int spawnl(int logpri, const char *prog, ...);
-int spawnv(int logpri, const char *prog, const char *const *argv);
+int spawnll(logger *log, const char *prog, ...);
+int spawnl(logger *log, const char *prog, ...);
+int spawnv(logger *log, const char *prog, const char *const *argv);
void reset_signals(void);
void ignore_signals(void);
void discard_pending(int sig);
@@ -282,25 +299,6 @@ int is_mounted(const char *table, const
int has_fstab_option(const char *path, const char *opt);
int allow_owner_mount(const char *);
-/* log notification */
-extern int do_verbose;
-extern int do_debug;
-
-#define info(msg, args...) \
-if (do_verbose || do_debug) \
- syslog(LOG_INFO, msg, ##args);
-
-#define warn(msg, args...) \
-if (do_verbose || do_debug) \
- syslog(LOG_WARNING, msg, ##args);
-
-#define error(msg, args...) syslog(LOG_ERR, msg, ##args);
-
-#define crit(msg, args...) syslog(LOG_CRIT, msg, ##args);
-
-#define debug(msg, args...) \
-if (do_debug) \
- syslog(LOG_DEBUG, msg, ##args);
#endif
diff -urpN autofs-4.1.4-fg/lib/Makefile autofs-4.1.4-syslog/lib/Makefile
--- autofs-4.1.4-fg/lib/Makefile 2005-01-09 06:16:43.000000000 -0300
+++ autofs-4.1.4-syslog/lib/Makefile 2006-02-12 11:06:37.000000000 -0300
@@ -12,7 +12,7 @@ RANLIB = /usr/bin/ranlib
SRCS = cache.c listmount.c cat_path.c rpc_subs.c mounts.c lock.c
RPCS = mount.h mount_clnt.c mount_xdr.c
OBJS = cache.o mount_clnt.o mount_xdr.o listmount.o \
- cat_path.o rpc_subs.o mounts.o lock.o
+ cat_path.o rpc_subs.o mounts.o lock.o log.o
LIB = autofs.a
@@ -48,6 +48,10 @@ listmount.o: listmount.c
$(CC) $(CFLAGS) -o listmount.o -c listmount.c
$(STRIP) listmount.o
+log.o: log.c
+ $(CC) $(CFLAGS) -o log.o -c log.c
+ $(STRIP) log.o
+
install: all
clean:
diff -urpN autofs-4.1.4-fg/lib/log.c autofs-4.1.4-syslog/lib/log.c
--- autofs-4.1.4-fg/lib/log.c 1969-12-31 21:00:00.000000000 -0300
+++ autofs-4.1.4-syslog/lib/log.c 2006-02-12 10:22:03.000000000 -0300
@@ -0,0 +1,116 @@
+#include <stdarg.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <unistd.h>
+#include <fcntl.h> /* open() */
+#include <stdlib.h> /* exit() */
+
+#include "automount.h"
+
+static void null(const char *msg, ...)
+{
+}
+
+void (*info)(const char* msg, ...) = null;
+void (*notice)(const char* msg, ...) = null;
+void (*warn)(const char* msg, ...) = null;
+void (*error)(const char* msg, ...) = null;
+void (*crit)(const char* msg, ...) = null;
+void (*debug)(const char* msg, ...) = null;
+
+static void syslog_debug(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_DEBUG, msg, ap);
+ va_end(ap);
+}
+
+static void syslog_info(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_INFO, msg, ap);
+ va_end(ap);
+}
+
+static void syslog_notice(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_NOTICE, msg, ap);
+ va_end(ap);
+}
+
+static void syslog_warn(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_WARNING, msg, ap);
+ va_end(ap);
+}
+
+static void syslog_err(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_ERR, msg, ap);
+ va_end(ap);
+}
+
+static void syslog_crit(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ syslog(LOG_CRIT, msg, ap);
+ va_end(ap);
+}
+
+static void to_stderr(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ vfprintf(stderr, msg, ap);
+ fputc('\n',stderr);
+ va_end(ap);
+}
+
+void log_to_syslog()
+{
+ int nullfd;
+
+ openlog("automount", LOG_PID, LOG_DAEMON);
+ if (do_debug) debug = syslog_debug;
+ if (do_verbose || do_debug) {
+ info = syslog_info;
+ notice = syslog_notice;
+ warn = syslog_warn;
+ }
+ error = syslog_err;
+ crit = syslog_crit;
+
+ /* Redirect all our file descriptors to /dev/null */
+ nullfd = open("/dev/null", O_RDWR);
+ if (nullfd < 0) {
+ crit("cannot open /dev/null: %m");
+ exit(1);
+ }
+ if (dup2(nullfd, STDIN_FILENO) < 0 ||
+ dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
+ crit("redirecting file descriptors failed: %m");
+ exit(1);
+ }
+ if (nullfd > 2) close(nullfd);
+}
+
+void log_to_stderr()
+{
+ if (do_debug) debug = to_stderr;
+ if (do_verbose || do_debug) {
+ info = to_stderr;
+ notice = to_stderr;
+ warn = to_stderr;
+ }
+ error = to_stderr;
+ crit = to_stderr;
+}
diff -urpN autofs-4.1.4-fg/modules/lookup_yp.c autofs-4.1.4-syslog/modules/lookup_yp.c
--- autofs-4.1.4-fg/modules/lookup_yp.c 2005-02-10 07:59:59.000000000 -0300
+++ autofs-4.1.4-syslog/modules/lookup_yp.c 2006-02-12 10:22:03.000000000 -0300
@@ -69,7 +69,7 @@ int lookup_init(const char *mapfmt, int
/* This should, but doesn't, take a const char ** */
err = yp_get_default_domain((char **) &ctxt->domainname);
if (err) {
- crit(MODPREFIX "map %s: %s\n", ctxt->mapname,
+ crit(MODPREFIX "map %s: %s", ctxt->mapname,
yperr_string(err));
return 1;
}
diff -urpN autofs-4.1.4-fg/modules/mount_bind.c autofs-4.1.4-syslog/modules/mount_bind.c
--- autofs-4.1.4-fg/modules/mount_bind.c 2005-01-10 10:28:29.000000000 -0300
+++ autofs-4.1.4-syslog/modules/mount_bind.c 2006-02-12 11:08:06.000000000 -0300
@@ -59,7 +59,7 @@ int mount_init(void **context)
if (lstat(tmp1, &st1) == -1)
goto out;
- err = spawnl(LOG_DEBUG,
+ err = spawnl(debug,
PATH_MOUNT, PATH_MOUNT, "-n", "--bind", tmp1, tmp2, NULL);
if (err == 0 &&
@@ -69,7 +69,7 @@ int mount_init(void **context)
}
debug(MODPREFIX "bind_works = %d\n", bind_works);
- spawnl(LOG_DEBUG,
+ spawnl(debug,
PATH_UMOUNT, PATH_UMOUNT, "-n", tmp2, NULL);
out:
@@ -131,7 +131,7 @@ int mount_mount(const char *root, const
"calling mount --bind " SLOPPY " -o %s %s %s",
options, what, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "--bind",
SLOPPYOPT "-o", options,
what, fullpath, NULL);
diff -urpN autofs-4.1.4-fg/modules/mount_changer.c autofs-4.1.4-syslog/modules/mount_changer.c
--- autofs-4.1.4-fg/modules/mount_changer.c 2005-01-09 06:16:43.000000000 -0300
+++ autofs-4.1.4-syslog/modules/mount_changer.c 2006-02-12 11:09:46.000000000 -0300
@@ -68,7 +68,7 @@ int mount_mount(const char *root, const
debug(MODPREFIX "calling umount %s", what);
- err = spawnll(LOG_DEBUG,
+ err = spawnll(debug,
PATH_UMOUNT, PATH_UMOUNT, what, NULL);
if (err) {
error(MODPREFIX "umount of %s failed (all may be unmounted)",
@@ -98,14 +98,14 @@ int mount_mount(const char *root, const
debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
fstype, options, what, fullpath);
- err = spawnll(LOG_DEBUG,
+ err = spawnll(debug,
PATH_MOUNT, PATH_MOUNT, "-t", fstype,
SLOPPYOPT "-o", options, what, fullpath, NULL);
} else {
debug(MODPREFIX "calling mount -t %s %s %s",
fstype, what, fullpath);
- err = spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
+ err = spawnll(debug, PATH_MOUNT, PATH_MOUNT,
"-t", fstype, what, fullpath, NULL);
}
diff -urpN autofs-4.1.4-fg/modules/mount_ext2.c autofs-4.1.4-syslog/modules/mount_ext2.c
--- autofs-4.1.4-fg/modules/mount_ext2.c 2005-01-10 10:28:29.000000000 -0300
+++ autofs-4.1.4-syslog/modules/mount_ext2.c 2006-02-12 11:10:21.000000000 -0300
@@ -93,10 +93,10 @@ int mount_mount(const char *root, const
#endif
if (ro) {
debug(MODPREFIX "calling %s -n %s", fsck_prog, what);
- err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-n", what, NULL);
+ err = spawnl(debug, fsck_prog, fsck_prog, "-n", what, NULL);
} else {
debug(MODPREFIX "calling %s -p %s", fsck_prog, what);
- err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-p", what, NULL);
+ err = spawnl(debug, fsck_prog, fsck_prog, "-p", what, NULL);
}
if (err & ~6) {
@@ -108,13 +108,13 @@ int mount_mount(const char *root, const
if (options) {
debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
fstype, options, what, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t", fstype,
SLOPPYOPT "-o", options, what, fullpath, NULL);
} else {
debug(MODPREFIX "calling mount -t %s %s %s",
fstype, what, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t", fstype,
what, fullpath, NULL);
}
diff -urpN autofs-4.1.4-fg/modules/mount_generic.c autofs-4.1.4-syslog/modules/mount_generic.c
--- autofs-4.1.4-fg/modules/mount_generic.c 2005-01-10 10:28:29.000000000 -0300
+++ autofs-4.1.4-syslog/modules/mount_generic.c 2006-02-12 11:07:28.000000000 -0300
@@ -77,13 +77,13 @@ int mount_mount(const char *root, const
debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
fstype, options, what, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t", fstype,
SLOPPYOPT "-o", options, what, fullpath, NULL);
} else {
debug(MODPREFIX "calling mount -t %s %s %s",
fstype, what, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t", fstype,
what, fullpath, NULL);
}
diff -urpN autofs-4.1.4-fg/modules/mount_nfs.c autofs-4.1.4-syslog/modules/mount_nfs.c
--- autofs-4.1.4-fg/modules/mount_nfs.c 2005-04-05 08:42:42.000000000 -0400
+++ autofs-4.1.4-syslog/modules/mount_nfs.c 2006-02-12 11:09:09.000000000 -0300
@@ -449,14 +449,14 @@ int mount_mount(const char *root, const
debug(MODPREFIX "calling mount -t nfs " SLOPPY
" -o %s %s %s", nfsoptions, whatstr, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t",
"nfs", SLOPPYOPT "-o", nfsoptions,
whatstr, fullpath, NULL);
} else {
debug(MODPREFIX "calling mount -t nfs %s %s",
whatstr, fullpath);
- err = spawnll(LOG_NOTICE,
+ err = spawnll(notice,
PATH_MOUNT, PATH_MOUNT, "-t",
"nfs", whatstr, fullpath, NULL);
}

54
filesystem/autofs/autofs-5.0.5-heimdal.patch

@ -0,0 +1,54 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../autofs/autofs-5.0.5-heimdal.patch
# Copyright (C) 2011 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Description: Fix to build against heimdal
Origin: Gentoo Linux
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
--- autofs-5.0.5/modules/cyrus-sasl.c.orig 2011-03-08 12:17:15.342696284 +0100
+++ autofs-5.0.5/modules/cyrus-sasl.c 2011-03-08 12:28:46.326696273 +0100
@@ -64,6 +64,15 @@
#endif
#endif
+/**
+ * The type of a principal is different for MIT Krb5 and Heimdal.
+ * These macros are provided by Heimdal, and introduced here for MIT.
+ */
+#ifndef krb5_realm_length
+#define krb5_realm_length(r) ((r).length)
+#define krb5_realm_data(r) ((r).data)
+#endif
+
/*
* Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
* environment variable so that the library knows where to find it.
@@ -451,11 +460,11 @@
/* setup a principal for the ticket granting service */
ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
+ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
+ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
0);
if (ret) {
error(logopt,

11
filesystem/autofs/autofs.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: package/.../autofs/autofs.conf # Filename: package/.../autofs/autofs.conf
# Copyright (C) 2006 The OpenSDE Project # Copyright (C) 2006 - 2011 The OpenSDE Project
# #
# More information can be found in the files COPYING and README. # More information can be found in the files COPYING and README.
# #
@ -12,6 +12,15 @@
# GNU General Public License can be found in the file COPYING. # GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END --- # --- SDE-COPYRIGHT-NOTE-END ---
pkg_autofs_prepatch() {
# apply offical upstream patches defined in the autofs.desc
for x in `match_source_file -p "autofs-.*\.patch"` ; do
echo "Applying patch ${x##*/} ..."
patch -p1 < $x
done
}
hook_add prepatch 5 'pkg_autofs_prepatch'
if pkginstalled openldap; then if pkginstalled openldap; then
var_append GCC_WRAPPER_APPEND ' ' "-I$root$( pkgprefix includedir openldap )" var_append GCC_WRAPPER_APPEND ' ' "-I$root$( pkgprefix includedir openldap )"
fi fi

76
filesystem/autofs/autofs.desc

@ -1,9 +1,8 @@
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- [COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY] [COPY]
[COPY] Filename: package/.../autofs/autofs.desc [COPY] Filename: package/.../autofs/autofs.desc
[COPY] Copyright (C) 2006 The OpenSDE Project [COPY] Copyright (C) 2006 - 2011 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY] Copyright (C) 1998 - 2003 Clifford Wolf [COPY] Copyright (C) 1998 - 2003 Clifford Wolf
[COPY] [COPY]
@ -30,8 +29,75 @@
[L] GPL [L] GPL
[S] Stable [S] Stable
[V] 4.1.4 [V] 5.0.5
[P] X -----5---9 189.700 [P] X -----5---9 189.700
[D] 3470657420 autofs-4.1.4.tar.bz2 ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/ [D] 1091114260 autofs-5.0.5.tar.bz2 ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
# official upstream patches (do not change the patch order!)
[D] 662897962 autofs-5.0.5-fix-included-map-read-fail-handling.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2149942329 autofs-5.0.5-refactor-ldap-sasl-bind.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3360356049 autofs-5.0.4-add-mount-wait-parameter.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2615305130 autofs-5.0.5-special-case-cifs-escapes.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 85853831 autofs-5.0.5-fix-libxml2-workaround-configure.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 956741246 autofs-5.0.5-more-code-analysis-corrections.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2880558723 autofs-5.0.5-fix-backwards-ifndef-INET6.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2381068053 autofs-5.0.5-fix-stale-init-for-file-map-instance.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3528278183 autofs-5.0.5-fix-ext4-fsck-at-mount.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1563603600 autofs-5.0.5-dont-use-master_lex_destroy-to-clear-parse-buffer.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 372792882 autofs-5.0.5-make-documentation-for-set-log-priority-clearer.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3118442835 autofs-5.0.5-fix-timeout-in-connect_nb.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2424040408 autofs-5.0.5-fix-pidof-init-script-usage.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2752021271 autofs-5.0.5-check-for-path-mount-location-in-generic-module.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2627986410 autofs-5.0.5-dont-fail-mount-on-access-fail.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2535988540 autofs-5.0.5-fix-rpc-large-export-list.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2958639385 autofs-5.0.5-fix-memory-leak-on-reload.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2797970831 autofs-5.0.5-update-kernel-patches-2.6.18-and-2.6.19.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3036194479 autofs-5.0.5-dont-connect-at-ldap-lookup-module-init.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2467902893 autofs-5.0.5-fix-random-selection-option.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1604462840 autofs-5.0.5-fix-disable-timeout.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3372846750 autofs-5.0.5-fix-strdup-return-value-check.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2494478513 autofs-5.0.5-fix-reconnect-get-base-dn.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3601192804 autofs-5.0.5-add-sasl-mutex-callbacks.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3871965832 autofs-5.0.5-fix-get-qdn-fail.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1313641823 autofs-5.0.5-fix-ampersand-escape-in-auto-smb.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1991382147 autofs-5.0.5-add-locality-as-valid-ldap-master-map-attribute.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2814570444 autofs-5.0.5-add-locality-as-valid-ldap-master-map-attribute-fix.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1061424031 autofs-5.0.5-make-nfs4-default-for-redhat-replicated-selection.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3177478445 autofs-5.0.5-add-simple-bind-auth.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 4137047629 autofs-5.0.5-fix-master-map-source-server-unavialable-handling.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3130824367 autofs-5.0.5-add-autofs_ldap_auth_conf-man-page.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1067295311 autofs-5.0.5-fix-random-selection-for-host-on-different-network.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1505517800 autofs-5.0.5-make-redhat-init-script-more-lsb-compliant.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 198736063 autofs-5.0.5-dont-hold-lock-for-simple-mounts.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1076351852 autofs-5.0.5-fix-remount-locking.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 882381289 autofs-5.0.5-fix-wildcard-map-entry-match.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3636010042 autofs-5.0.5-fix-parse_sun-module-init.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1582481428 autofs-5.0.5-dont-check-null-cache-on-expire.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 575175418 autofs-5.0.5-fix-null-cache-race.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2639412582 autofs-5.0.5-fix-cache_init-on-source-re-read.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2911990657 autofs-5.0.5-mapent-becomes-negative-during-lookup.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 351882507 autofs-5.0.5-check-each-dc-server.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3642754369 autofs-5.0.5-fix-negative-cache-included-map-lookup.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3375276298 autofs-5.0.5-remove-state-machine-timed-wait.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 4250510786 autofs-5.0.5-remove-extra-read-master-map-call.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 4247400993 autofs-5.0.5-fix-fix-cache_init-on-source-re-read.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 564390305 autofs-5.0.5-fix-error-handing-in-do_mount_indirect.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1087554597 autofs-5.0.5-expire-thread-use-pending-mutex.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3764988753 autofs-5.0.5-include-krb5-library.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2503156510 autofs-5.0.5-make-verbose-mode-a-little-less-verbose.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1839757006 autofs-5.0.5-remove-ERR_remove_state-openssl-call.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 444779221 autofs-5.0.5-fix-restart.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 690863449 autofs-5.0.5-fix-status-privilege-error.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1456080361 autofs-5.0.4-always-read-file-maps-mount-lookup-map-read-fix.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2320254723 autofs-5.0.5-fix-direct-map-not-updating-on-reread.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1514710979 autofs-5.0.5-add-external-bind-method.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1162536645 autofs-5.0.5-fix-add-simple-bind-auth.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 427215215 autofs-5.0.5-add-dump-maps-option.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 621871159 autofs-5.0.5-fix-submount-shutdown-wait.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2166041940 autofs-5.0.5-use-weight-only-for-server-selection.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3738805456 autofs-5.0.5-fix-isspace-wild-card-substition.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 3097526683 autofs-5.0.5-auto-adjust-ldap-page-size.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1541803560 autofs-5.0.5-fix-prune-cache-valid-check.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 4253261006 autofs-5.0.5-fix-mountd-vers-retry.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 2029122048 autofs-5.0.5-fix-expire-race.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
[D] 1387371055 autofs-5.0.5-add-lsb-force-reload-and-try-restart.patch ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/

Loading…
Cancel
Save