diff --git a/libfuse-lite/fusermount.c b/libfuse-lite/fusermount.c index 1bede1b5..43db8e16 100644 --- a/libfuse-lite/fusermount.c +++ b/libfuse-lite/fusermount.c @@ -40,6 +40,9 @@ static const char *progname = "ntfs-3g-mount"; static int user_allow_other = 0; static int mount_max = 1000; +int drop_privs(void); +int restore_privs(void); + static const char *get_user_name(void) { struct passwd *pw = getpwuid(getuid()); diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c index d7359eb8..0057fb3f 100644 --- a/libntfs-3g/index.c +++ b/libntfs-3g/index.c @@ -1763,7 +1763,7 @@ out: * * Return 0 on success or -1 on error with errno set to the error code. */ -int ntfs_index_rm(ntfs_index_context *icx) +static int ntfs_index_rm(ntfs_index_context *icx) { INDEX_HEADER *ih; int err, ret = STATUS_OK; diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index 9fd2a098..683e61f3 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -1728,7 +1728,7 @@ static int strappend(char **dest, const char *append) return 0; } -static int bogus_option_value(char *val, char *s) +static int bogus_option_value(char *val, const char *s) { if (val) { ntfs_log_error("'%s' option shouldn't have value.\n", s); @@ -1737,7 +1737,7 @@ static int bogus_option_value(char *val, char *s) return 0; } -static int missing_option_value(char *val, char *s) +static int missing_option_value(char *val, const char *s) { if (!val) { ntfs_log_error("'%s' option should have a value.\n", s); @@ -1901,12 +1901,11 @@ static char *parse_mount_options(const char *orig_opts) if (default_permissions && strappend(&ret, "default_permissions,")) goto err_exit; - s = "noatime,"; - if (ctx->atime == ATIME_RELATIVE) - s = "relatime,"; - else if (ctx->atime == ATIME_ENABLED) - s = "atime,"; - if (strappend(&ret, s)) + if (ctx->atime == ATIME_RELATIVE && strappend(&ret, "relatime,")) + goto err_exit; + else if (ctx->atime == ATIME_ENABLED && strappend(&ret, "atime,")) + goto err_exit; + else if (strappend(&ret, "noatime,")) goto err_exit; if (strappend(&ret, "fsname="))