diff --git a/ChangeLog b/ChangeLog index c6835ff..5f040bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ ChangeLog for davfs2 Store process persona in args. * mount_davfs.c, parse_config, new_args: Set default user config file in parse_config. + * mount_davfs.c, parse_config, new_args: + Set default user secrets file in parse_config. 2012-01-12 Werner Baumann (werner.baumann@onlinehome.de) * dav_coda.c, dav_fuse.c: diff --git a/src/mount_davfs.c b/src/mount_davfs.c index aa163fb..19153f2 100644 --- a/src/mount_davfs.c +++ b/src/mount_davfs.c @@ -1087,6 +1087,9 @@ parse_config(dav_args *args) args->servercert = f; } + if (!args->privileged && !args->secrets) + args->secrets = ne_concat(args->home, "/.", PACKAGE, "/", DAV_SECRETS, + NULL); if (args->secrets && *args->secrets == '~') { int p = 1; if (*(args->secrets + p) == '/') @@ -1767,11 +1770,6 @@ new_args(void) args->path = NULL; args->servercert = NULL; - if (getuid() != 0) { - args->secrets = ne_concat(user_dir, "/", DAV_SECRETS, NULL); - } else { - args->secrets = NULL; - } args->username = NULL; args->cl_username = NULL; args->password = NULL;