Don't use a-flag in fscanf
This commit is contained in:
parent
014dd388cc
commit
f62e22ba6b
10
ChangeLog
10
ChangeLog
@ -1,6 +1,16 @@
|
||||
ChangeLog for davfs2
|
||||
--------------------
|
||||
|
||||
2012-01-31 Werner Baumann (werner.baumann@onlinehome.de)
|
||||
* mount_davfs.c, mount_davfs.h, webdav.c:
|
||||
Read ca_cert in mount_davfs.c.
|
||||
* mount_davfs.c, parse_commandline, parse_config:
|
||||
Redo: Canonicalize conf in parse_cmdline.
|
||||
* mount_davfs.c, get_options, new_args, check_fstab:
|
||||
Fix defaults for mopts.
|
||||
* umount_davfs.c:
|
||||
Don't use a-flag in fscanf.
|
||||
|
||||
2012-01-28 Werner Baumann (werner.baumann@onlinehome.de)
|
||||
* mount_davfs.c, check_dirs:
|
||||
Use stat instead of access.
|
||||
|
@ -63,8 +63,7 @@
|
||||
#include "xstrndup.h"
|
||||
#include "xvasprintf.h"
|
||||
|
||||
#include <ne_alloc.h>
|
||||
#include <ne_string.h>
|
||||
#include <ne_ssl.h>
|
||||
#include <ne_xml.h>
|
||||
|
||||
#include "defaults.h"
|
||||
|
@ -61,6 +61,8 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <ne_ssl.h>
|
||||
|
||||
#include "defaults.h"
|
||||
#include "mount_davfs.h"
|
||||
#include "cache.h"
|
||||
|
@ -51,6 +51,8 @@
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <ne_ssl.h>
|
||||
|
||||
#include "defaults.h"
|
||||
#include "mount_davfs.h"
|
||||
#include "cache.h"
|
||||
|
@ -57,6 +57,8 @@
|
||||
#include "xalloc.h"
|
||||
#include "xvasprintf.h"
|
||||
|
||||
#include <ne_ssl.h>
|
||||
|
||||
#include "defaults.h"
|
||||
#include "mount_davfs.h"
|
||||
#include "cache.h"
|
||||
|
@ -685,6 +685,7 @@ check_fstab(const dav_args *args)
|
||||
dav_args *n_args = new_args();
|
||||
n_args->uid = args->uid;
|
||||
n_args->gid = args->gid;
|
||||
n_args->mopts = DAV_USER_MOPTS;
|
||||
|
||||
FILE *fstab = setmntent(_PATH_MNTTAB, "r");
|
||||
if (!fstab)
|
||||
@ -1603,8 +1604,6 @@ get_options(dav_args *args, char *option)
|
||||
[END] = NULL
|
||||
};
|
||||
|
||||
if (args->privileged)
|
||||
args->mopts = DAV_MOPTS;
|
||||
args->fsuid = args->uid;
|
||||
args->fsgid = args->gid;
|
||||
|
||||
@ -1732,7 +1731,7 @@ new_args(void)
|
||||
dav_args *args = (dav_args *) xcalloc(1, sizeof(dav_args));
|
||||
|
||||
args->netdev = DAV_NETDEV;
|
||||
args->mopts = DAV_USER_MOPTS;
|
||||
args->mopts = DAV_MOPTS;
|
||||
|
||||
args->p_port = DAV_DEFAULT_PROXY_PORT;
|
||||
args->useproxy = DAV_USE_PROXY;
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include "xalloc.h"
|
||||
#include "xvasprintf.h"
|
||||
|
||||
#include <ne_string.h>
|
||||
|
||||
#include "defaults.h"
|
||||
#include "canonicalize.h"
|
||||
|
||||
@ -148,7 +146,7 @@ main(int argc, char *argv[])
|
||||
|
||||
char pid[32];
|
||||
FILE *file = fopen(pidfile, "r");
|
||||
if (!file || fscanf(file, "%30[0-9]", pid) != 1 || !pid) {
|
||||
if (!file || fscanf(file, "%30[0-9]", pid) < 1) {
|
||||
error(0, 0,
|
||||
_("\n"
|
||||
" can't read PID from file %s;\n"
|
||||
|
Loading…
Reference in New Issue
Block a user