From owner-cvs-src@FreeBSD.ORG Tue Oct 24 08:48:01 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E44A16A519; Tue, 24 Oct 2006 08:48:01 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3230143D53; Tue, 24 Oct 2006 08:47:53 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id F2A705F9C; Tue, 24 Oct 2006 12:47:51 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id D02265FA9; Tue, 24 Oct 2006 12:47:51 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k9O8lr2Q065260; Tue, 24 Oct 2006 12:47:53 +0400 (MSD) (envelope-from ru) Date: Tue, 24 Oct 2006 12:47:53 +0400 From: Ruslan Ermilov To: Maxim Sobolev Message-ID: <20061024084753.GA65029@rambler-co.ru> References: <200610240818.k9O8IATH022313@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <200610240818.k9O8IATH022313@repoman.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Robert Watson , cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.bin/su su.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2006 08:48:01 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 24, 2006 at 08:18:10AM +0000, Maxim Sobolev wrote: > sobomax 2006-10-24 08:18:10 UTC >=20 > FreeBSD src repository >=20 > Modified files: > usr.bin/su su.c=20 > Log: > Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su = on > system that don't have audit framefork compiled into kernel or ia32 bin= ary > on amd64 system will result in SIGSYS. There is one place in su.c itself > where it tries to check for errno !=3D ENOSYS, but it has been a nop si= nce su > does not catch SIGSYS anyway. There are few other places in libbsm, > where attempt to invoke audit syscal would result in SIGSYS if no audit > support is present in the kernel, so that the only reliable method for > now is to disable SIGSYS completely in the case when BSM is compiled in. > =20 > In the long run, both direct invocation of audit-related syscalls and > libbsm should be made more intellegent to handle the case when BSM is n= ot > compiled into the kernel gracefully. > =20 > MFC after: 3 days > (provided re@ approval) > =20 > Revision Changes Path > 1.82 +2 -0 src/usr.bin/su/su.c >=20 I don't have "options AUDIT" compiled into my amd64/i386 kernels, and "truss su" shows this (on amd64): : geteuid() =3D 0 (0x0) : getauid(0x7fffffffe4fc) ERR#78 'Function not imp= lemented' The audit_syscalls.c is always compiled in: : # grep audit_syscalls /sys/conf/files : security/audit/audit_syscalls.c standard And in the "#else /* !AUDIT *" case, it just returns ENOSYS: : int : getauid(struct thread *td, struct getauid_args *uap) : { :=20 : return (ENOSYS); : } How that could result in SIGSYS, I don't get it? Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --jI8keyz6grp/JLjh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFPdM5qRfpzJluFF4RAkncAKCU0bf8uZGwxXnomefaiF+gtv0ubACfff/G VKNsre53Wp4HSBfJe23Zihc= =MCC4 -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--