httpd: add -u user[:grp] support
This commit is contained in:
1 parent
01c27fc5ac
commit
de59c0f58f
12 files changed
+117
-139
No files matched your search
@@ -15,6 +15,7 @@
|
||||
/* Like strncpy but make sure the resulting string is always 0 terminated. */
|
||||
char * safe_strncpy(char *dst, const char *src, size_t size)
|
||||
{
|
||||
dst[size-1] = '\0';
|
||||
return strncpy(dst, src, size-1);
|
||||
if (!size) return dst;
|
||||
dst[--size] = '\0';
|
||||
return strncpy(dst, src, size);
|
||||
}
|
||||
Reference in new issue
Block a user