Browse Source

Add calls to setusercontext() and login_get*(). We basically call

setusercontext() in most places where previously we did a setlogin().
Add default login.conf file and put root in the "daemon" login class.
OPENBSD_2_8
millert 24 years ago
parent
commit
768a4c7996
3 changed files with 46 additions and 2 deletions
  1. +2
    -1
      src/etc/Makefile
  2. +43
    -0
      src/etc/login.conf
  3. +1
    -1
      src/etc/master.passwd

+ 2
- 1
src/etc/Makefile View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.114 2000/07/18 18:46:05 deraadt Exp $
# $OpenBSD: Makefile,v 1.115 2000/08/20 18:42:36 millert Exp $
TZDIR= /usr/share/zoneinfo TZDIR= /usr/share/zoneinfo
LOCALTIME= US/Pacific LOCALTIME= US/Pacific
@ -67,6 +67,7 @@ distribution-etc-root-var: distrib-dirs
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
${INSTALL} -c -o root -g wheel -m 600 hosts.equiv ${DESTDIR}/etc ${INSTALL} -c -o root -g wheel -m 600 hosts.equiv ${DESTDIR}/etc
${INSTALL} -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root ${INSTALL} -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
${INSTALL} -c -o root -g wheel -m 644 login.conf ${DESTDIR}/etc
${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc ${INSTALL} -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd pwd_mkdb -p -d ${DESTDIR}/etc /etc/master.passwd
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \


+ 43
- 0
src/etc/login.conf View File

@ -0,0 +1,43 @@
# $OpenBSD: login.conf,v 1.1 2000/08/20 18:42:36 millert Exp $
#
# Sample login.conf file. See login.conf(5) for details.
#
#
# Standard default entry.
# Any value changed in the daemon class should be reset in default
# class.
#
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin:\
:umask=022:\
:datasize-max=64M:\
:datasize-cur=16M:\
:maxproc-max=128:\
:maxproc-cur=64:\
:openfiles-cur=64:\
:stacksize-cur=2M:
#
# Settings used by /etc/rc and root
# This must be set properly for daemons started as root by inetd as well.
# Be sure reset these values back to system defaults in the default class!
#
daemon:\
:ignorenologin:\
:datasize=infinity:\
:maxproc=infinity:\
:openfiles-cur=128:\
:stacksize-cur=8M:\
:tc=default:
#
# Staff have fewer restrictions and can login even when nologins are set.
#
staff:\
:datasize-cur=64M:\
:datasize-max=infinity:\
:ignorenologin:\
:requirehome@:\
:tc=default:

+ 1
- 1
src/etc/master.passwd View File

@ -1,4 +1,4 @@
root::0:0::0:0:Charlie &:/root:/bin/csh
root:daemon:0:0::0:0:Charlie &:/root:/bin/csh
daemon:*:1:1::0:0:The devil himself:/root:/sbin/nologin daemon:*:1:1::0:0:The devil himself:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/operator:/sbin/nologin operator:*:2:5::0:0:System &:/operator:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/sbin/nologin bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/sbin/nologin


Loading…
Cancel
Save