-/* cu.c 4.3 81/12/16 */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)cu.c 5.2 (Berkeley) %G%";
+#endif not lint
#include "tip.h"
}
setbuf(stdout, NULL);
loginit();
- setuid(getuid());
- setgid(getgid());
+ gid = getgid();
+ egid = getegid();
+ uid = getuid();
+ euid = geteuid();
+ setregid(egid, gid);
+ setreuid(euid, uid);
vinit();
+ setparity("none");
boolean(value(VERBOSE)) = 0;
if (HW)
ttysetup(speed(BR));
if (connect()) {
printf("Connect failed\n");
+ setreuid(uid, euid);
+ setregid(gid, egid);
delock(uucplock);
exit(1);
}