/*
* Copyright (c) 1998, by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
/*
* safechown changes the owner ship of src to uid. If the mode parameter
* does not equal -1 changes the mode of src as well.
*
* return -1 on failure and 0 on success.
*/
int
{
int fd;
return (-1);
return (-1);
}
/* Make sure non directories are not hard links */
return (-1);
}
return (-1);
}
/* Make sure file is not a symlink */
return (-1);
}
/* we should probably get the primary group id for uid here */
return (-1);
}
if (mode != -1) {
return (-1);
}
}
return (0);
}
#ifdef TEST
void
{
exit(1);
}
{
int opt;
switch (opt) {
case 'm':
break;
case 'u':
break;
default:
}
}
perror("safechown");
exit(1);
}
return (0);
}
#endif /* TEST */