File:  [Research Unix] / researchv10no / cmd / setlog.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/*
 * run a command with login name changed
 */

#include <stdio.h>

main(argc, argv)
int argc;
char **argv;
{

	if (argc < 3) {
		fprintf(stderr, "usage: %s username command\n", argv[0]);
		exit(1);
	}
	if (setlogname(argv[1]) < 0) {
		perror("setlogname");
		exit(1);
	}
	execvp(argv[2], &argv[2]);
	perror(argv[2]);
	exit(1);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.