suid bit sshd

Dan Nelson dnelson at allantgroup.com
Fri Aug 13 08:36:12 PDT 2004


In the last episode (Aug 13), Ilker Ozupak said:
> On Friday 13 August 2004 13:49, you wrote:
> > On Fri, Aug 13, 2004 at 01:31:52PM +0300, Ilker Ozupak wrote:
> > > sshd is not installed as setuid even make.conf modified according
> > > to docs. the fallowing output is just after install[kernel|world]
> > > and mergemaster
> > >
> > > <output>
> > > [root at pascal]:/usr/src $ ls -l /usr/sbin/sshd
> > > - -r-xr-xr-x  1 root  wheel  173480 Aug 13 12:24 /usr/sbin/sshd
> > > [root at pascal]:/usr/src $ grep SUID_SSH /etc/make.conf
> > > ENABLE_SUID_SSH=        true
> >
> > That controls whether /usr/bin/ssh gets a setuid bit or not.  You're
> > looking at the wrong binary.
>
> it is not setuid
> 
> [root at pascal]:~ $ ls -l /usr/bin/ssh
> - -r-xr-xr-x  2 root  wheel  95260 Aug 13 12:24 /usr/bin/ssh

That's because rev 1.19 of secure/usr.bin/ssh/Makefile accidentally
removed the install code that checks for ENABLE_SUID_SSH.  Apply this
patch and it will work again:

Index: /usr/src/secure/usr.bin/ssh/Makefile
===================================================================
RCS file: /home/ncvs/src/secure/usr.bin/ssh/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- /usr/src/secure/usr.bin/ssh/Makefile	26 Feb 2004 11:26:46 -0000	1.28
+++ /usr/src/secure/usr.bin/ssh/Makefile	2 Jun 2004 06:39:33 -0000
@@ -2,6 +2,9 @@
 #
 
 PROG=	ssh
+.if defined(ENABLE_SUID_SSH)
+BINMODE=4555
+.endif
 CFLAGS+=-I${SSHDIR}
 LINKS=	${BINDIR}/ssh ${BINDIR}/slogin
 MAN=	ssh.1 ssh_config.5

 
-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-current mailing list