Cleanup -Weverything in conf.c
This commit is contained in:
parent
ec3f986071
commit
cd60a5d236
|
|
@ -9,13 +9,13 @@ extern int priv_mode,no_unnamed,logging,grab_enabled,ver_enabled;
|
|||
extern int homedir_restricted;
|
||||
extern uid_t run_uid;
|
||||
extern gid_t run_gid;
|
||||
extern unsigned int maxthcallowed;
|
||||
extern int maxthcallowed;
|
||||
extern unsigned short udp_port,packetsize;
|
||||
extern time_t retry_timeout,session_timeout,stat_cache_timeout;
|
||||
extern char *logname,*tlogname,*readme_file,*dumpname;
|
||||
extern char *home_dir,*pidlogname;
|
||||
extern char *listen_on;
|
||||
extern unsigned int dir_cache_limit, stat_cache_limit,fp_cache_limit;
|
||||
extern int dir_cache_limit, stat_cache_limit,fp_cache_limit;
|
||||
extern char *tmp_dir;
|
||||
extern mode_t upload_umask, system_umask;
|
||||
void load_configuration (const char * conffile);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ int use_directory_mtime =
|
|||
#else
|
||||
1;
|
||||
#endif
|
||||
unsigned int maxthcallowed = 0;
|
||||
int maxthcallowed = 0;
|
||||
unsigned short packetsize = DEFAULT_SPACE;
|
||||
time_t retry_timeout = 3;
|
||||
time_t session_timeout = 60;
|
||||
|
|
@ -58,11 +58,11 @@ char *listen_on = NULL;
|
|||
int homedir_restricted = 1;
|
||||
int permit_passwordless_owners = 0;
|
||||
char *readme_file = NULL;
|
||||
unsigned int dir_cache_limit = DEFAULT_DIRLISTCACHE_SIZE;
|
||||
unsigned int stat_cache_limit = DEFAULT_DIRSTATCACHE_SIZE;
|
||||
int dir_cache_limit = DEFAULT_DIRLISTCACHE_SIZE;
|
||||
int fp_cache_limit= DEFAULT_FPCACHE_SIZE;
|
||||
int stat_cache_limit = DEFAULT_DIRSTATCACHE_SIZE;
|
||||
mode_t upload_umask = 0033;
|
||||
mode_t system_umask = 0077;
|
||||
unsigned int fp_cache_limit= DEFAULT_FPCACHE_SIZE;
|
||||
|
||||
static void log_set (int flag, int neg)
|
||||
{
|
||||
|
|
@ -180,10 +180,10 @@ static void read_configuration (const char * name)
|
|||
q = r;
|
||||
} while (*q);
|
||||
} else if(strcasecmp(p, "port") == 0) {
|
||||
udp_port = atoi(q);
|
||||
udp_port = (unsigned short) atoi(q);
|
||||
}
|
||||
else if(strcasecmp(p, "packetsize") == 0) {
|
||||
packetsize = atoi(q);
|
||||
packetsize = (unsigned short) atoi(q);
|
||||
}
|
||||
else if(strcasecmp(p, "filecache") == 0) {
|
||||
fp_cache_limit = atoi(q);
|
||||
|
|
@ -214,14 +214,14 @@ static void read_configuration (const char * name)
|
|||
else maxthcallowed = atoi(q);
|
||||
} else if(strcasecmp(p, "setuid") == 0) {
|
||||
if(strcasecmp(q, "off") == 0) run_uid = 0;
|
||||
else run_uid = atoi(q);
|
||||
else run_uid = (uid_t) atoi(q);
|
||||
} else if(strcasecmp(p, "setgid") == 0) {
|
||||
if(strcasecmp(q, "off") == 0) run_gid = 0;
|
||||
else run_gid = atoi(q);
|
||||
else run_gid = (gid_t) atoi(q);
|
||||
} else if(strcasecmp(p, "umask") == 0) {
|
||||
upload_umask = strtol(q,NULL,8);
|
||||
upload_umask = (mode_t) strtol(q,NULL,8);
|
||||
} else if(strcasecmp(p, "serverumask") == 0) {
|
||||
system_umask = strtol(q,NULL,8);
|
||||
system_umask = (mode_t) strtol(q,NULL,8);
|
||||
} else if(strcasecmp(p, "daemonize") == 0) {
|
||||
daemonize = get_boolean(q);
|
||||
} else if(strcasecmp(p, "debug") == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user