Create a directory. We must go through a subsidiary program to
force our real uid to be the uucp owner before invoking the setuid
/* Make sure the directory does not exist, since we will otherwise
get the wrong errno value. */
if (stat (zdir
, &s
) == 0)
/* /bin/mkdir will create the directory with mode 777, so we set our
umask to get the mode we want. */
(void) umask ((~ imode
) & (S_IRWXU
| S_IRWXG
| S_IRWXO
));
azargs
[0] = UUDIR_PROGRAM
;
ipid
= ixsspawn (azargs
, aidescs
, FALSE
, FALSE
, (const char *) NULL
,
TRUE
, FALSE
, (const char *) NULL
,
(const char *) NULL
, (const char *) NULL
);
if (ixswait ((unsigned long) ipid
, (const char *) NULL
) != 0)
/* Make up an errno value. */