Date: Mon, 10 Feb 2020 02:44:29 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357715 - head/usr.sbin/cron/cron Message-ID: <202002100244.01A2iTfF037635@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Feb 10 02:44:29 2020 New Revision: 357715 URL: https://svnweb.freebsd.org/changeset/base/357715 Log: 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. Modified: head/usr.sbin/cron/cron/do_command.c Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Mon Feb 10 02:40:23 2020 (r357714) +++ head/usr.sbin/cron/cron/do_command.c Mon Feb 10 02:44:29 2020 (r357715) @@ -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) @@ -638,42 +631,4 @@ wait_on_child(PID_T childpid, const char *name) { Debug(DPROC, ("\n")) 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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002100244.01A2iTfF037635>