From owner-svn-src-all@FreeBSD.ORG Wed Jan 13 17:58:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25F5106566C; Wed, 13 Jan 2010 17:58:49 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21468FC19; Wed, 13 Jan 2010 17:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0DHwnEP080017; Wed, 13 Jan 2010 17:58:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0DHwnkK080014; Wed, 13 Jan 2010 17:58:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001131758.o0DHwnkK080014@svn.freebsd.org> From: Ed Schouten Date: Wed, 13 Jan 2010 17:58:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202194 - head/sbin/init X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 17:58:50 -0000 Author: ed Date: Wed Jan 13 17:58:49 2010 New Revision: 202194 URL: http://svn.freebsd.org/changeset/base/202194 Log: Migrate init(8) towards utmpx. According to a comment, we cannot safely remove utmpx entries here anymore. This is because the libc routines may block on file locking. In an ideal world login(1) should just remove the entries, which is why I'm disabling this code for now. If it turns out we get lots of stale entries here, we should figure out a way to deal with that. Modified: head/sbin/init/Makefile head/sbin/init/init.c Modified: head/sbin/init/Makefile ============================================================================== --- head/sbin/init/Makefile Wed Jan 13 17:56:54 2010 (r202193) +++ head/sbin/init/Makefile Wed Jan 13 17:58:49 2010 (r202194) @@ -6,8 +6,8 @@ MAN= init.8 PRECIOUSPROG= INSTALLFLAGS=-b -B.bak CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DPADD= ${LIBUTIL} ${LIBULOG} ${LIBCRYPT} -LDADD= -lutil -lulog -lcrypt +DPADD= ${LIBUTIL} ${LIBCRYPT} +LDADD= -lutil -lcrypt NO_SHARED?= YES Modified: head/sbin/init/init.c ============================================================================== --- head/sbin/init/init.c Wed Jan 13 17:56:54 2010 (r202193) +++ head/sbin/init/init.c Wed Jan 13 17:58:49 2010 (r202194) @@ -65,9 +65,9 @@ static const char rcsid[] = #include #include #include -#define _ULOG_POSIX_NAMES #include #include +#include #include #include @@ -569,10 +569,13 @@ transition(state_t s) * NB: should send a message to the session logger to avoid blocking. */ static void -clear_session_logs(session_t *sp) +clear_session_logs(session_t *sp __unused) { - ulog_logout(sp->se_device); + /* + * XXX: Use getutxline() and call pututxline() for each entry. + * Is this safe to do this here? Is it really required anyway? + */ } /*