search for: _sc_getpw_r_size_max

Displaying 3 results from an estimated 3 matches for "_sc_getpw_r_size_max".

Did you mean: _sc_getgr_r_size_max
2016 Dec 28
2
Help with httpd userdir recovery
...dirent.h> int main(int argc, char *argv[]) { struct passwd pwd; struct passwd *result; char *buf; size_t bufsize; int s; if (argc != 3) { fprintf(stderr, "Usage: %s username directory\n", argv[0]); exit(EXIT_FAILURE); } bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) /* Value was indeterminate */ bufsize = 16384; /* Should be more than enough */ buf = malloc(bufsize); if (buf == NULL) { perror("malloc"); exit(EXIT_FAILURE); } s = getpwnam_r(argv[1], &pwd, buf, bufsize...
2016 Dec 28
0
Help with httpd userdir recovery
...sswd pwd; > struct passwd *result; > char *buf; > size_t bufsize; > int s; > > if (argc != 3) { > fprintf(stderr, "Usage: %s username directory\n", argv[0]); > exit(EXIT_FAILURE); > } > > bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); > if (bufsize == -1) /* Value was indeterminate */ > bufsize = 16384; /* Should be more than enough */ > > buf = malloc(bufsize); > if (buf == NULL) { > perror("malloc"); > exit(EXIT_FAILURE); > } >...
2016 Dec 28
4
Help with httpd userdir recovery
On 12/27/2016 07:06 PM, John Fawcett wrote: > On 12/28/2016 12:34 AM, Robert Moskowitz wrote: >> >> On 12/27/2016 05:44 PM, John Fawcett wrote: >>> That error should be caused by having MultiViews options but incorrect >>> permissions (711 instead of 755) on the directory. >> I just did chmod -R 755 /home/rgm/public_html and no change in behavior. >>