Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5599a52
)
htparser: Allow PID-file, chuser and chroot arguments to be treated as NULL if empty.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 14 May 2021 14:06:07 +0000
(16:06 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 14 May 2021 14:06:07 +0000
(16:06 +0200)
src/htparser.c
patch
|
blob
|
blame
|
history
diff --git
a/src/htparser.c
b/src/htparser.c
index
348a940
..
b7435b9
100644
(file)
--- a/
src/htparser.c
+++ b/
src/htparser.c
@@
-621,16
+621,16
@@
int main(int argc, char **argv)
usesyslog = 1;
break;
case 'u':
- if(
(pwent = getpwnam(optarg)) == NULL
) {
+ if(
optarg[0] && ((pwent = getpwnam(optarg)) == NULL)
) {
flog(LOG_ERR, "could not find user %s", optarg);
exit(1);
}
break;
case 'r':
- root = optarg;
+ root = optarg
[0] ? optarg : NULL
;
break;
case 'p':
- pidfile = optarg;
+ pidfile = optarg
[0] ? optarg : NULL
;
break;
default:
usage(stderr);