httpd: add -u user[:grp] support
This commit is contained in:
parent
01c27fc5ac
commit
de59c0f58f
12 changed files with 117 additions and 139 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue