3 * Reads a tar file from standard input, and extracts the contents as
4 * the user specified by uid as an argument.
6 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, please see the file
11 #include <mit-copyright.h>
18 write(2, "You must be root to run sms_untar\n", 34);
23 write(2, "Usage: sms_untar uid\n", 21);
24 write(2, "sms_untar takes a tar file as standard input.\n", 46);
28 setuid(atoi(argv[1]));
29 execl("/bin/tar", "tar", "xfp", "-", 0);
30 write(2, "sms_untar: unable to exec /bin/tar\n", 35);