1/* unknwn.c 2 Check remote.unknown shell script. */ 3 4#include "uucp.h" 5 6#include "uudefs.h" 7#include "sysdep.h" 8#include "system.h" 9 10#include <errno.h> 11 12/* Run the remote.unknown shell script. If it succeeds, we return 13 FALSE because that means that the system is not permitted to log 14 in. If the execution fails, we return TRUE. */ 15 16boolean 17fsysdep_unknown_caller (zscript, zsystem) 18 const char *zscript; 19 const char *zsystem; 20{ 21 const char *azargs[3]; 22 int aidescs[3]; 23 pid_t ipid; 24 25 azargs[0] = zscript; 26 azargs[1] = zsystem; 27 azargs[2] = NULL; 28 29 aidescs[0] = SPAWN_NULL; 30 aidescs[1] = SPAWN_NULL; 31 aidescs[2] = SPAWN_NULL; 32 33 ipid = ixsspawn (azargs, aidescs, TRUE, TRUE, (const char *) NULL, FALSE, 34 TRUE, (const char *) NULL, (const char *) NULL, 35 (const char *) NULL); 36 if (ipid < 0) 37 { 38 ulog (LOG_ERROR, "ixsspawn: %s", strerror (errno)); 39 return FALSE; 40 } 41 42 return ixswait ((unsigned long) ipid, (const char *) NULL) != 0; 43} 44