Set default user secrets file in parse_config

This commit is contained in:
wbaumann 2012-01-14 19:13:05 +00:00
parent 02d7da7cb7
commit 0b8d2dc7ef
2 changed files with 5 additions and 5 deletions

View File

@ -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:

View File

@ -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;