httpd: add -u user[:grp] support
This commit is contained in:
@ -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