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