patch-src_mount_davfs_c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. $Id$
  2. --- davfs2-1.3.3.orig/src/mount_davfs.c 2008-06-30 20:29:42.000000000 +0200
  3. +++ davfs2-1.3.3/src/mount_davfs.c 2008-12-08 00:20:01.000000000 +0100
  4. @@ -23,12 +23,10 @@
  5. #include "config.h"
  6. -#include <argz.h>
  7. #include <ctype.h>
  8. #include <errno.h>
  9. #include <error.h>
  10. #include <fcntl.h>
  11. -#include <fstab.h>
  12. #include <getopt.h>
  13. #include <grp.h>
  14. #include <limits.h>
  15. @@ -602,15 +600,18 @@ static char *check_double_mounts(dav_arg
  16. free to choose them. They should be configured in davfs2.conf anyway. */
  17. static void check_fstab(const dav_args *args) {
  18. +#if 0
  19. dav_args *n_args = new_args();
  20. n_args->mopts = DAV_USER_MOPTS;
  21. setfsent();
  22. struct fstab *ft = getfsfile(mpoint);
  23. if (ft == NULL)
  24. +#endif
  25. error(EXIT_FAILURE, 0, _("no entry for %s found in %s"), url,
  26. - _PATH_FSTAB);
  27. + "/etc/fstab");
  28. +#if 0
  29. if (strcmp(url, ft->fs_spec) != 0) {
  30. char *fstab_url = decode_octal(ft->fs_spec);
  31. if (strcmp(url, fstab_url) != 0)
  32. @@ -642,6 +643,7 @@ static void check_fstab(const dav_args *
  33. endfsent();
  34. delete_args(n_args);
  35. +#endif
  36. }
  37. @@ -661,7 +663,7 @@ static void check_mountpoint(dav_args *a
  38. struct passwd *pw;
  39. if (*mpoint != '/') {
  40. - char *mp = canonicalize_file_name(mpoint);
  41. + char *mp = realpath(mpoint, NULL);
  42. if (mp == NULL)
  43. error(EXIT_FAILURE, 0,
  44. _("can't evaluate path of mount point %s"), mpoint);
  45. @@ -1754,6 +1756,7 @@ static dav_args *new_args(void) {
  46. static void log_dbg_config(char *argv[], dav_args *args) {
  47. + /*
  48. size_t len;
  49. char * cmdline;
  50. if (argz_create(argv, &cmdline, &len) == 0) {
  51. @@ -1761,6 +1764,7 @@ static void log_dbg_config(char *argv[],
  52. syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), cmdline);
  53. free(cmdline);
  54. }
  55. + */
  56. syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
  57. "Configuration:");