|
|
close (fd); | close (fd); |
continue; | continue; |
} | } |
#ifdef SO_PEERCRED |
|
/* |
|
* Don't allow shadow queries to non-root users |
|
* It is CRITICAL that this code occurs AFTER reading the key |
|
* to avoid clientside sigpipe issues |
|
*/ |
|
if ((req.type == GETSPBYNAME || req.type == GETSP) && caller.uid != 0) |
|
{ |
|
nsvs_log (LOG_DEBUG, "%s: pid %d unauthorized for type %d", |
|
__FUNCTION__, caller.pid, req.type); |
|
write_wt (fd, ¬found, sizeof (notfound), WRITE_TIMEOUT); |
|
close (fd); |
|
continue; |
|
} |
|
#endif |
|
/* Checks passed; run query, then build & send response */ | /* Checks passed; run query, then build & send response */ |
if (run_query (req.type, keybuf, th_num)) | if (run_query (req.type, keybuf, th_num)) |
{ | { |