httpd: add -u user[:grp] support

This commit is contained in:
Denis Vlasenko 2006-10-05 22:50:22 +00:00
parent 01c27fc5ac
commit de59c0f58f
12 changed files with 117 additions and 139 deletions

View file

@ -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);
}