OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

625 lines
19 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../autofs/3-syslog.patch
  5. # Copyright (C) 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. add -s --stderr option which makes automounter send all log output to stderr
  17. adapted from: http://lkml.org/lkml/2004/10/7/217 by Denis Vlasenko
  18. diff -urpN autofs-4.1.4-fg/daemon/automount.c autofs-4.1.4-syslog/daemon/automount.c
  19. --- autofs-4.1.4-fg/daemon/automount.c 2006-02-12 10:21:38.000000000 -0300
  20. +++ autofs-4.1.4-syslog/daemon/automount.c 2006-02-12 10:22:03.000000000 -0300
  21. @@ -39,7 +39,7 @@
  22. #include <linux/auto_fs4.h>
  23. #ifndef NDEBUG
  24. -#define assert(x) do { if (!(x)) { syslog(LOG_CRIT, __FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
  25. +#define assert(x) do { if (!(x)) { crit(__FILE__ ":%d: assertion failed: " #x, __LINE__); } } while(0)
  26. #else
  27. #define assert(x) do { } while(0)
  28. #endif
  29. @@ -62,6 +62,8 @@ int do_verbose = 0; /* Verbose feedback
  30. int do_debug = 0; /* Enable full debug output */
  31. int daemonize = 1; /* Shall we daemonize? */
  32. +int log_stderr; /* Use stderr instead of syslog? */
  33. +
  34. sigset_t ready_sigs; /* signals only accepted in ST_READY */
  35. sigset_t lock_sigs; /* signals blocked for locking */
  36. sigset_t sigchld_mask;
  37. @@ -160,7 +162,7 @@ static int umount_ent(const char *root,
  38. umount_ok = 1;
  39. if (umount_ok || is_smbfs) {
  40. - rv = spawnll(LOG_DEBUG,
  41. + rv = spawnll(debug,
  42. PATH_UMOUNT, PATH_UMOUNT, path_buf, NULL);
  43. }
  44. }
  45. @@ -314,13 +316,13 @@ static int do_umount_autofs(void)
  46. struct stat st;
  47. int ret;
  48. - rv = spawnll(LOG_DEBUG,
  49. + rv = spawnll(debug,
  50. PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
  51. if (rv & MTAB_NOTUPDATED) {
  52. info("umount %s succeeded: "
  53. "mtab not updated, retrying to clean\n",
  54. ap.path);
  55. - rv = spawnll(LOG_DEBUG,
  56. + rv = spawnll(debug,
  57. PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
  58. }
  59. ret = stat(ap.path, &st);
  60. @@ -450,7 +452,7 @@ static int mount_autofs(char *path)
  61. }
  62. our_name[len] = '\0';
  63. - if (spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
  64. + if (spawnll(debug, PATH_MOUNT, PATH_MOUNT,
  65. "-t", "autofs", "-o", options, our_name, path, NULL) != 0) {
  66. crit("failed to mount autofs path %s", ap.path);
  67. rmdir_path(ap.path);
  68. @@ -542,7 +544,7 @@ static int send_fail(unsigned int wait_q
  69. return 0;
  70. debug("send_fail: token=%d\n", wait_queue_token);
  71. if (ioctl(ap.ioctlfd, AUTOFS_IOC_FAIL, wait_queue_token) < 0) {
  72. - syslog(LOG_ERR, "AUTOFS_IOC_FAIL: %m");
  73. + error("AUTOFS_IOC_FAIL: %m");
  74. return 1;
  75. }
  76. return 0;
  77. @@ -948,7 +950,7 @@ static int get_pkt(int fd, union autofs_
  78. if (poll(fds, 2, -1) == -1) {
  79. if (errno == EINTR)
  80. continue;
  81. - syslog(LOG_ERR, "get_pkt: poll failed: %m");
  82. + error("get_pkt: poll failed: %s", strerror(errno));
  83. return -1;
  84. }
  85. @@ -1277,7 +1279,6 @@ static void become_daemon(void)
  86. {
  87. FILE *pidfp;
  88. pid_t pid;
  89. - int nullfd;
  90. /* Don't BUSY any directories unnecessarily */
  91. chdir("/");
  92. @@ -1293,9 +1294,12 @@ static void become_daemon(void)
  93. exit(1);
  94. }
  95. }
  96. -
  97. - /* Open syslog */
  98. - openlog("automount", LOG_PID, LOG_DAEMON);
  99. + /* Initialize logging subsystem */
  100. + if(!log_stderr) {
  101. + log_to_syslog();
  102. + } else {
  103. + log_to_stderr();
  104. + }
  105. /* Initialize global data */
  106. my_pid = getpid();
  107. @@ -1317,26 +1321,14 @@ static void become_daemon(void)
  108. }
  109. my_pgrp = getpgrp();
  110. - /* Redirect all our file descriptors to /dev/null */
  111. - if ((nullfd = open("/dev/null", O_RDWR)) < 0) {
  112. - crit("cannot open /dev/null: %m");
  113. - exit(1);
  114. - }
  115. -
  116. - if (dup2(nullfd, STDIN_FILENO) < 0 ||
  117. - dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
  118. - crit("redirecting file descriptors failed: %m");
  119. - exit(1);
  120. - }
  121. - if (nullfd > 2) close(nullfd);
  122. -
  123. /* Write pid file if requested */
  124. if (pid_file) {
  125. if ((pidfp = fopen(pid_file, "wt"))) {
  126. fprintf(pidfp, "%lu\n", (unsigned long) my_pid);
  127. fclose(pidfp);
  128. } else {
  129. - warn("failed to write pid file %s: %m", pid_file);
  130. + warn("failed to write pid file %s: %s", pid_file,
  131. + strerror(errno));
  132. pid_file = NULL;
  133. }
  134. }
  135. @@ -1386,6 +1378,7 @@ static void usage(void)
  136. " -p --pid-file f write process id to file f\n"
  137. " -t --timeout n auto-unmount in n seconds (0-disable)\n"
  138. " -f --foreground do not daemonize\n"
  139. + " -s --stderr log to stderr instead of syslog\n"
  140. " -v --verbose be verbose\n"
  141. " -d --debug be even more verbose\n"
  142. " -V --version print version and exit\n"
  143. @@ -1680,6 +1673,7 @@ int main(int argc, char *argv[])
  144. {"pid-file", 1, 0, 'p'},
  145. {"timeout", 1, 0, 't'},
  146. {"foreground", 0, 0, 'f'},
  147. + {"stderr", 0, 0, 's'},
  148. {"verbose", 0, 0, 'v'},
  149. {"debug", 0, 0, 'd'},
  150. {"version", 0, 0, 'V'},
  151. @@ -1697,7 +1691,7 @@ int main(int argc, char *argv[])
  152. ap.dir_created = 0; /* We haven't created the main directory yet */
  153. opterr = 0;
  154. - while ((opt = getopt_long(argc, argv, "+hp:t:fvdVg", long_options, NULL)) != EOF) {
  155. + while ((opt = getopt_long(argc, argv, "+hp:t:fsvdVg", long_options, NULL)) != EOF) {
  156. switch (opt) {
  157. case 'h':
  158. usage();
  159. @@ -1715,6 +1709,10 @@ int main(int argc, char *argv[])
  160. daemonize = 0;
  161. break;
  162. + case 's':
  163. + log_stderr = 1;
  164. + break;
  165. +
  166. case 'v':
  167. do_verbose = 1;
  168. break;
  169. @@ -1739,7 +1737,7 @@ int main(int argc, char *argv[])
  170. }
  171. if (geteuid() != 0) {
  172. - fprintf(stderr, "%s: This program must be run by root.\n", program);
  173. + fprintf(stderr, "%s: This program must be run by root\n", program);
  174. exit(1);
  175. }
  176. @@ -1766,9 +1764,9 @@ int main(int argc, char *argv[])
  177. #ifdef DEBUG
  178. if (mapargc) {
  179. int i;
  180. - syslog(LOG_DEBUG, "Map argc = %d", mapargc);
  181. + debug("Map argc = %d", mapargc);
  182. for (i = 0; i < mapargc; i++)
  183. - syslog(LOG_DEBUG, "Map argv[%d] = %s", i, mapargv[i]);
  184. + debug("Map argv[%d] = %s", i, mapargv[i]);
  185. }
  186. #endif
  187. diff -urpN autofs-4.1.4-fg/daemon/spawn.c autofs-4.1.4-syslog/daemon/spawn.c
  188. --- autofs-4.1.4-fg/daemon/spawn.c 2005-02-10 09:56:53.000000000 -0300
  189. +++ autofs-4.1.4-syslog/daemon/spawn.c 2006-02-12 10:22:03.000000000 -0300
  190. @@ -199,7 +199,7 @@ out:
  191. #define ERRBUFSIZ 2047 /* Max length of error string excl \0 */
  192. -static int do_spawn(int logpri, int use_lock, const char *prog, const char *const *argv)
  193. +static int do_spawn(logger* log, int use_lock, const char *prog, const char *const *argv)
  194. {
  195. pid_t f;
  196. int status, pipefd[2];
  197. @@ -260,7 +260,7 @@ static int do_spawn(int logpri, int use_
  198. while (errp && (p = memchr(sp, '\n', errp))) {
  199. *p++ = '\0';
  200. if (sp[0]) /* Don't output empty lines */
  201. - syslog(logpri, ">> %s", sp);
  202. + log(">> %s", sp);
  203. errp -= (p - sp);
  204. sp = p;
  205. }
  206. @@ -271,7 +271,7 @@ static int do_spawn(int logpri, int use_
  207. if (errp >= ERRBUFSIZ) {
  208. /* Line too long, split */
  209. errbuf[errp] = '\0';
  210. - syslog(logpri, ">> %s", errbuf);
  211. + log(">> %s", errbuf);
  212. errp = 0;
  213. }
  214. }
  215. @@ -281,7 +281,7 @@ static int do_spawn(int logpri, int use_
  216. if (errp > 0) {
  217. /* End of file without \n */
  218. errbuf[errp] = '\0';
  219. - syslog(logpri, ">> %s", errbuf);
  220. + log(">> %s", errbuf);
  221. }
  222. if (waitpid(f, &status, 0) != f)
  223. @@ -296,12 +296,12 @@ static int do_spawn(int logpri, int use_
  224. }
  225. }
  226. -int spawnv(int logpri, const char *prog, const char *const *argv)
  227. +int spawnv(logger* log, const char *prog, const char *const *argv)
  228. {
  229. - return do_spawn(logpri, 0, prog, argv);
  230. + return do_spawn(log, 0, prog, argv);
  231. }
  232. -int spawnl(int logpri, const char *prog, ...)
  233. +int spawnl(logger* log, const char *prog, ...)
  234. {
  235. va_list arg;
  236. int argc;
  237. @@ -319,10 +319,10 @@ int spawnl(int logpri, const char *prog,
  238. while ((*p++ = va_arg(arg, char *)));
  239. va_end(arg);
  240. - return do_spawn(logpri, 0, prog, (const char **) argv);
  241. + return do_spawn(log, 0, prog, (const char **) argv);
  242. }
  243. -int spawnll(int logpri, const char *prog, ...)
  244. +int spawnll(logger* log, const char *prog, ...)
  245. {
  246. va_list arg;
  247. int argc;
  248. @@ -340,5 +340,5 @@ int spawnll(int logpri, const char *prog
  249. while ((*p++ = va_arg(arg, char *)));
  250. va_end(arg);
  251. - return do_spawn(logpri, 1, prog, (const char **) argv);
  252. + return do_spawn(log, 1, prog, (const char **) argv);
  253. }
  254. diff -urpN autofs-4.1.4-fg/include/automount.h autofs-4.1.4-syslog/include/automount.h
  255. --- autofs-4.1.4-fg/include/automount.h 2005-01-26 10:03:02.000000000 -0300
  256. +++ autofs-4.1.4-syslog/include/automount.h 2006-02-12 10:22:03.000000000 -0300
  257. @@ -117,13 +117,30 @@ struct autofs_point {
  258. extern struct autofs_point ap;
  259. + /* log notification */
  260. +
  261. +extern int do_verbose;
  262. +extern int do_debug;
  263. +
  264. +typedef void logger(const char* msg, ...);
  265. +
  266. +extern void (*info)(const char* msg, ...);
  267. +extern void (*notice)(const char* msg, ...);
  268. +extern void (*warn)(const char* msg, ...);
  269. +extern void (*error)(const char* msg, ...);
  270. +extern void (*crit)(const char* msg, ...);
  271. +extern void (*debug)(const char* msg, ...);
  272. +
  273. +void log_to_syslog();
  274. +void log_to_stderr();
  275. +
  276. /* Standard function used by daemon or modules */
  277. int aquire_lock(void);
  278. void release_lock(void);
  279. -int spawnll(int logpri, const char *prog, ...);
  280. -int spawnl(int logpri, const char *prog, ...);
  281. -int spawnv(int logpri, const char *prog, const char *const *argv);
  282. +int spawnll(logger *log, const char *prog, ...);
  283. +int spawnl(logger *log, const char *prog, ...);
  284. +int spawnv(logger *log, const char *prog, const char *const *argv);
  285. void reset_signals(void);
  286. void ignore_signals(void);
  287. void discard_pending(int sig);
  288. @@ -282,25 +299,6 @@ int is_mounted(const char *table, const
  289. int has_fstab_option(const char *path, const char *opt);
  290. int allow_owner_mount(const char *);
  291. -/* log notification */
  292. -extern int do_verbose;
  293. -extern int do_debug;
  294. -
  295. -#define info(msg, args...) \
  296. -if (do_verbose || do_debug) \
  297. - syslog(LOG_INFO, msg, ##args);
  298. -
  299. -#define warn(msg, args...) \
  300. -if (do_verbose || do_debug) \
  301. - syslog(LOG_WARNING, msg, ##args);
  302. -
  303. -#define error(msg, args...) syslog(LOG_ERR, msg, ##args);
  304. -
  305. -#define crit(msg, args...) syslog(LOG_CRIT, msg, ##args);
  306. -
  307. -#define debug(msg, args...) \
  308. -if (do_debug) \
  309. - syslog(LOG_DEBUG, msg, ##args);
  310. #endif
  311. diff -urpN autofs-4.1.4-fg/lib/Makefile autofs-4.1.4-syslog/lib/Makefile
  312. --- autofs-4.1.4-fg/lib/Makefile 2005-01-09 06:16:43.000000000 -0300
  313. +++ autofs-4.1.4-syslog/lib/Makefile 2006-02-12 11:06:37.000000000 -0300
  314. @@ -12,7 +12,7 @@ RANLIB = /usr/bin/ranlib
  315. SRCS = cache.c listmount.c cat_path.c rpc_subs.c mounts.c lock.c
  316. RPCS = mount.h mount_clnt.c mount_xdr.c
  317. OBJS = cache.o mount_clnt.o mount_xdr.o listmount.o \
  318. - cat_path.o rpc_subs.o mounts.o lock.o
  319. + cat_path.o rpc_subs.o mounts.o lock.o log.o
  320. LIB = autofs.a
  321. @@ -48,6 +48,10 @@ listmount.o: listmount.c
  322. $(CC) $(CFLAGS) -o listmount.o -c listmount.c
  323. $(STRIP) listmount.o
  324. +log.o: log.c
  325. + $(CC) $(CFLAGS) -o log.o -c log.c
  326. + $(STRIP) log.o
  327. +
  328. install: all
  329. clean:
  330. diff -urpN autofs-4.1.4-fg/lib/log.c autofs-4.1.4-syslog/lib/log.c
  331. --- autofs-4.1.4-fg/lib/log.c 1969-12-31 21:00:00.000000000 -0300
  332. +++ autofs-4.1.4-syslog/lib/log.c 2006-02-12 10:22:03.000000000 -0300
  333. @@ -0,0 +1,116 @@
  334. +#include <stdarg.h>
  335. +#include <stdio.h>
  336. +#include <syslog.h>
  337. +#include <unistd.h>
  338. +#include <fcntl.h> /* open() */
  339. +#include <stdlib.h> /* exit() */
  340. +
  341. +#include "automount.h"
  342. +
  343. +static void null(const char *msg, ...)
  344. +{
  345. +}
  346. +
  347. +void (*info)(const char* msg, ...) = null;
  348. +void (*notice)(const char* msg, ...) = null;
  349. +void (*warn)(const char* msg, ...) = null;
  350. +void (*error)(const char* msg, ...) = null;
  351. +void (*crit)(const char* msg, ...) = null;
  352. +void (*debug)(const char* msg, ...) = null;
  353. +
  354. +static void syslog_debug(const char *msg, ...)
  355. +{
  356. + va_list ap;
  357. + va_start(ap, msg);
  358. + syslog(LOG_DEBUG, msg, ap);
  359. + va_end(ap);
  360. +}
  361. +
  362. +static void syslog_info(const char *msg, ...)
  363. +{
  364. + va_list ap;
  365. + va_start(ap, msg);
  366. + syslog(LOG_INFO, msg, ap);
  367. + va_end(ap);
  368. +}
  369. +
  370. +static void syslog_notice(const char *msg, ...)
  371. +{
  372. + va_list ap;
  373. + va_start(ap, msg);
  374. + syslog(LOG_NOTICE, msg, ap);
  375. + va_end(ap);
  376. +}
  377. +
  378. +static void syslog_warn(const char *msg, ...)
  379. +{
  380. + va_list ap;
  381. + va_start(ap, msg);
  382. + syslog(LOG_WARNING, msg, ap);
  383. + va_end(ap);
  384. +}
  385. +
  386. +static void syslog_err(const char *msg, ...)
  387. +{
  388. + va_list ap;
  389. + va_start(ap, msg);
  390. + syslog(LOG_ERR, msg, ap);
  391. + va_end(ap);
  392. +}
  393. +
  394. +static void syslog_crit(const char *msg, ...)
  395. +{
  396. + va_list ap;
  397. + va_start(ap, msg);
  398. + syslog(LOG_CRIT, msg, ap);
  399. + va_end(ap);
  400. +}
  401. +
  402. +static void to_stderr(const char *msg, ...)
  403. +{
  404. + va_list ap;
  405. + va_start(ap, msg);
  406. + vfprintf(stderr, msg, ap);
  407. + fputc('\n',stderr);
  408. + va_end(ap);
  409. +}
  410. +
  411. +void log_to_syslog()
  412. +{
  413. + int nullfd;
  414. +
  415. + openlog("automount", LOG_PID, LOG_DAEMON);
  416. + if (do_debug) debug = syslog_debug;
  417. + if (do_verbose || do_debug) {
  418. + info = syslog_info;
  419. + notice = syslog_notice;
  420. + warn = syslog_warn;
  421. + }
  422. + error = syslog_err;
  423. + crit = syslog_crit;
  424. +
  425. + /* Redirect all our file descriptors to /dev/null */
  426. + nullfd = open("/dev/null", O_RDWR);
  427. + if (nullfd < 0) {
  428. + crit("cannot open /dev/null: %m");
  429. + exit(1);
  430. + }
  431. + if (dup2(nullfd, STDIN_FILENO) < 0 ||
  432. + dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
  433. + crit("redirecting file descriptors failed: %m");
  434. + exit(1);
  435. + }
  436. + if (nullfd > 2) close(nullfd);
  437. +}
  438. +
  439. +void log_to_stderr()
  440. +{
  441. + if (do_debug) debug = to_stderr;
  442. + if (do_verbose || do_debug) {
  443. + info = to_stderr;
  444. + notice = to_stderr;
  445. + warn = to_stderr;
  446. + }
  447. + error = to_stderr;
  448. + crit = to_stderr;
  449. +}
  450. diff -urpN autofs-4.1.4-fg/modules/lookup_yp.c autofs-4.1.4-syslog/modules/lookup_yp.c
  451. --- autofs-4.1.4-fg/modules/lookup_yp.c 2005-02-10 07:59:59.000000000 -0300
  452. +++ autofs-4.1.4-syslog/modules/lookup_yp.c 2006-02-12 10:22:03.000000000 -0300
  453. @@ -69,7 +69,7 @@ int lookup_init(const char *mapfmt, int
  454. /* This should, but doesn't, take a const char ** */
  455. err = yp_get_default_domain((char **) &ctxt->domainname);
  456. if (err) {
  457. - crit(MODPREFIX "map %s: %s\n", ctxt->mapname,
  458. + crit(MODPREFIX "map %s: %s", ctxt->mapname,
  459. yperr_string(err));
  460. return 1;
  461. }
  462. diff -urpN autofs-4.1.4-fg/modules/mount_bind.c autofs-4.1.4-syslog/modules/mount_bind.c
  463. --- autofs-4.1.4-fg/modules/mount_bind.c 2005-01-10 10:28:29.000000000 -0300
  464. +++ autofs-4.1.4-syslog/modules/mount_bind.c 2006-02-12 11:08:06.000000000 -0300
  465. @@ -59,7 +59,7 @@ int mount_init(void **context)
  466. if (lstat(tmp1, &st1) == -1)
  467. goto out;
  468. - err = spawnl(LOG_DEBUG,
  469. + err = spawnl(debug,
  470. PATH_MOUNT, PATH_MOUNT, "-n", "--bind", tmp1, tmp2, NULL);
  471. if (err == 0 &&
  472. @@ -69,7 +69,7 @@ int mount_init(void **context)
  473. }
  474. debug(MODPREFIX "bind_works = %d\n", bind_works);
  475. - spawnl(LOG_DEBUG,
  476. + spawnl(debug,
  477. PATH_UMOUNT, PATH_UMOUNT, "-n", tmp2, NULL);
  478. out:
  479. @@ -131,7 +131,7 @@ int mount_mount(const char *root, const
  480. "calling mount --bind " SLOPPY " -o %s %s %s",
  481. options, what, fullpath);
  482. - err = spawnll(LOG_NOTICE,
  483. + err = spawnll(notice,
  484. PATH_MOUNT, PATH_MOUNT, "--bind",
  485. SLOPPYOPT "-o", options,
  486. what, fullpath, NULL);
  487. diff -urpN autofs-4.1.4-fg/modules/mount_changer.c autofs-4.1.4-syslog/modules/mount_changer.c
  488. --- autofs-4.1.4-fg/modules/mount_changer.c 2005-01-09 06:16:43.000000000 -0300
  489. +++ autofs-4.1.4-syslog/modules/mount_changer.c 2006-02-12 11:09:46.000000000 -0300
  490. @@ -68,7 +68,7 @@ int mount_mount(const char *root, const
  491. debug(MODPREFIX "calling umount %s", what);
  492. - err = spawnll(LOG_DEBUG,
  493. + err = spawnll(debug,
  494. PATH_UMOUNT, PATH_UMOUNT, what, NULL);
  495. if (err) {
  496. error(MODPREFIX "umount of %s failed (all may be unmounted)",
  497. @@ -98,14 +98,14 @@ int mount_mount(const char *root, const
  498. debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
  499. fstype, options, what, fullpath);
  500. - err = spawnll(LOG_DEBUG,
  501. + err = spawnll(debug,
  502. PATH_MOUNT, PATH_MOUNT, "-t", fstype,
  503. SLOPPYOPT "-o", options, what, fullpath, NULL);
  504. } else {
  505. debug(MODPREFIX "calling mount -t %s %s %s",
  506. fstype, what, fullpath);
  507. - err = spawnll(LOG_DEBUG, PATH_MOUNT, PATH_MOUNT,
  508. + err = spawnll(debug, PATH_MOUNT, PATH_MOUNT,
  509. "-t", fstype, what, fullpath, NULL);
  510. }
  511. diff -urpN autofs-4.1.4-fg/modules/mount_ext2.c autofs-4.1.4-syslog/modules/mount_ext2.c
  512. --- autofs-4.1.4-fg/modules/mount_ext2.c 2005-01-10 10:28:29.000000000 -0300
  513. +++ autofs-4.1.4-syslog/modules/mount_ext2.c 2006-02-12 11:10:21.000000000 -0300
  514. @@ -93,10 +93,10 @@ int mount_mount(const char *root, const
  515. #endif
  516. if (ro) {
  517. debug(MODPREFIX "calling %s -n %s", fsck_prog, what);
  518. - err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-n", what, NULL);
  519. + err = spawnl(debug, fsck_prog, fsck_prog, "-n", what, NULL);
  520. } else {
  521. debug(MODPREFIX "calling %s -p %s", fsck_prog, what);
  522. - err = spawnl(LOG_DEBUG, fsck_prog, fsck_prog, "-p", what, NULL);
  523. + err = spawnl(debug, fsck_prog, fsck_prog, "-p", what, NULL);
  524. }
  525. if (err & ~6) {
  526. @@ -108,13 +108,13 @@ int mount_mount(const char *root, const
  527. if (options) {
  528. debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
  529. fstype, options, what, fullpath);
  530. - err = spawnll(LOG_NOTICE,
  531. + err = spawnll(notice,
  532. PATH_MOUNT, PATH_MOUNT, "-t", fstype,
  533. SLOPPYOPT "-o", options, what, fullpath, NULL);
  534. } else {
  535. debug(MODPREFIX "calling mount -t %s %s %s",
  536. fstype, what, fullpath);
  537. - err = spawnll(LOG_NOTICE,
  538. + err = spawnll(notice,
  539. PATH_MOUNT, PATH_MOUNT, "-t", fstype,
  540. what, fullpath, NULL);
  541. }
  542. diff -urpN autofs-4.1.4-fg/modules/mount_generic.c autofs-4.1.4-syslog/modules/mount_generic.c
  543. --- autofs-4.1.4-fg/modules/mount_generic.c 2005-01-10 10:28:29.000000000 -0300
  544. +++ autofs-4.1.4-syslog/modules/mount_generic.c 2006-02-12 11:07:28.000000000 -0300
  545. @@ -77,13 +77,13 @@ int mount_mount(const char *root, const
  546. debug(MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
  547. fstype, options, what, fullpath);
  548. - err = spawnll(LOG_NOTICE,
  549. + err = spawnll(notice,
  550. PATH_MOUNT, PATH_MOUNT, "-t", fstype,
  551. SLOPPYOPT "-o", options, what, fullpath, NULL);
  552. } else {
  553. debug(MODPREFIX "calling mount -t %s %s %s",
  554. fstype, what, fullpath);
  555. - err = spawnll(LOG_NOTICE,
  556. + err = spawnll(notice,
  557. PATH_MOUNT, PATH_MOUNT, "-t", fstype,
  558. what, fullpath, NULL);
  559. }
  560. diff -urpN autofs-4.1.4-fg/modules/mount_nfs.c autofs-4.1.4-syslog/modules/mount_nfs.c
  561. --- autofs-4.1.4-fg/modules/mount_nfs.c 2005-04-05 08:42:42.000000000 -0400
  562. +++ autofs-4.1.4-syslog/modules/mount_nfs.c 2006-02-12 11:09:09.000000000 -0300
  563. @@ -449,14 +449,14 @@ int mount_mount(const char *root, const
  564. debug(MODPREFIX "calling mount -t nfs " SLOPPY
  565. " -o %s %s %s", nfsoptions, whatstr, fullpath);
  566. - err = spawnll(LOG_NOTICE,
  567. + err = spawnll(notice,
  568. PATH_MOUNT, PATH_MOUNT, "-t",
  569. "nfs", SLOPPYOPT "-o", nfsoptions,
  570. whatstr, fullpath, NULL);
  571. } else {
  572. debug(MODPREFIX "calling mount -t nfs %s %s",
  573. whatstr, fullpath);
  574. - err = spawnll(LOG_NOTICE,
  575. + err = spawnll(notice,
  576. PATH_MOUNT, PATH_MOUNT, "-t",
  577. "nfs", whatstr, fullpath, NULL);
  578. }