Skip to content
Snippets Groups Projects
Commit 05e2da26 authored by Kamil Dudka's avatar Kamil Dudka
Browse files

config.c: do not pre-check if (un)compresscmd is executable

The execlp/execvp calls that execute them search for executables
in $PATH, which access(..., X_OK) does not support.  This commit
makes it possible to specify the (un)compress commands by their
base name only in case they are available in $PATH.

Closes #122
parent a5bb422a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1433,13 +1433,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
RAISE_ERROR();
}
 
if (access(newlog->compress_prog, X_OK)) {
message(MESS_ERROR,
"%s:%d compression program %s is not an executable file\n",
configFile, lineNum, newlog->compress_prog);
RAISE_ERROR();
}
message(MESS_DEBUG, "compress_prog is now %s\n",
newlog->compress_prog);
 
Loading
Loading
@@ -1465,13 +1458,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
RAISE_ERROR();
}
 
if (access(newlog->uncompress_prog, X_OK)) {
message(MESS_ERROR,
"%s:%d uncompression program %s is not an executable file\n",
configFile, lineNum, newlog->uncompress_prog);
RAISE_ERROR();
}
message(MESS_DEBUG, "uncompress_prog is now %s\n",
newlog->uncompress_prog);
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment