From 1709a13c7cb961fd242b5d8aa192b4de9d78ba53 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Mon, 10 Feb 2020 02:44:29 +0000 Subject: [PATCH] cron(8): rip out do_univ This was an old Dynix hack, the function is a NOP on FreeBSD. We have no need to retain this; Dynix was discontinued long ago. --- usr.sbin/cron/cron/do_command.c | 47 +-------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c index 8d759dda031b..214baf2133ed 100644 --- a/usr.sbin/cron/cron/do_command.c +++ b/usr.sbin/cron/cron/do_command.c @@ -38,8 +38,7 @@ static const char rcsid[] = #endif -static void child_process(entry *, user *), - do_univ(user *); +static void child_process(entry *, user *); static WAIT_T wait_on_child(PID_T, const char *); @@ -278,12 +277,6 @@ child_process(e, u) close(stdin_pipe[READ_PIPE]); close(stdout_pipe[WRITE_PIPE]); - /* set our login universe. Do this in the grandchild - * so that the child can invoke /usr/lib/sendmail - * without surprises. - */ - do_univ(u); - environ = NULL; # if defined(LOGIN_CAP) @@ -639,41 +632,3 @@ wait_on_child(PID_T childpid, const char *name) { return waiter; } - - -static void -do_univ(u) - user *u; -{ -#if defined(sequent) -/* Dynix (Sequent) hack to put the user associated with - * the passed user structure into the ATT universe if - * necessary. We have to dig the gecos info out of - * the user's password entry to see if the magic - * "universe(att)" string is present. - */ - - struct passwd *p; - char *s; - int i; - - p = getpwuid(u->uid); - (void) endpwent(); - - if (p == NULL) - return; - - s = p->pw_gecos; - - for (i = 0; i < 4; i++) - { - if ((s = strchr(s, ',')) == NULL) - return; - s++; - } - if (strcmp(s, "universe(att)")) - return; - - (void) universe(U_ATT); -#endif -}