The 'Security Digest' Archives (TM)

Archive: About | Browse | Search | Contributions | Feedback
Site: Help | Index | Search | Contact | Notices | Changes

ARCHIVE: Zardoz 'Security Digest' - Archives (1989 - 1991)
DOCUMENT: Zardoz 'Security Digest' V1 #9 not known (1 file, 3411 bytes)
SOURCE: http://securitydigest.org/exec/display?f=zardoz/archive/109.txt&t=text/plain
NOTICE: securitydigest.org recognises the rights of all third-party works.

START OF DOCUMENT


Security Digest Volume 1 Issue 9

subject(s):

            lock

------------------------------------------------------------------------

Date: Wed, 8 Feb 89 18:58:24 -0800
From: uunet!okeeffe.Berkeley.EDU!bostic (Keith Bostic)
Subject: lock

Lock has been fixed for forever.  Here it is.

[This is the program referenced in V1 #8 - neil]

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       lock.1
#       lock.c
#       Makefile
#
echo x - lock.1
sed 's/^X//' >lock.1 << 'END-of-lock.1'
X.\" Copyright (c) 1987 The Regents of the University of California.
X.\" All rights reserved.
X.\"
X.\" Redistribution and use in source and binary forms are permitted
X.\" provided that the above copyright notice and this paragraph are
X.\" duplicated in all such forms and that any documentation,
X.\" advertising materials, and other materials related to such
X.\" distribution and use acknowledge that the software was developed
X.\" by the University of California, Berkeley.  The name of the
X.\" University may not be used to endorse or promote products derived
X.\" from this software without specific prior written permission.
X.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
X.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
X.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X.\"
X.\"    @(#)lock.1      6.4 (Berkeley) 12/5/88
X.\"
X.TH LOCK 1 "December 5, 1988"
X.UC
X.SH NAME
Xlock \- reserve a terminal
X.SH SYNOPSIS
X.B lock
X[
X.B -p
X] [
X.B -t timeout
X]
X.br
X.SH DESCRIPTION
X\fILock\fP requests a password from the user, reads it again for verification
Xand then it will normally not relinquish the terminal until the password is
Xrepeated.  There are three other conditions under which it will terminate: it
Xaccepts the password for root as an alternatle
to the one glen by the
Xuser, it will timeout after some interval of time, and it may be killed by
Xsomebody with the appropriate permission. The default time limit is 15 minutes
Xbut it may be changed with the \fI-t\fP option where \fItimeout\fP is the
Xtime limit in minutes.  The \fI-p\fP option has \fIlock\fP use the user's
Xstandard password instead of requesting another one.
END-of-lock.1
echo x - lock.c
sed 's/^X//' >lock.c << 'END-of-lock.c'
X/*
X * Copyright (c) 1980, 1987 Regents of the University of California.
X * All rights reserved.
X *
X * Redistribution and use in source and binary forms are permitted
X * provided that the above copyright notice and this paragraph are
X * duplicated in all such forms and that any documentation,
X * advertising materials, and other materials related to such
X * distribution and use acknowledge that the software was developed
X * by the University of California, Berkeley.  The name of the
X * University may not be used to endorse or promote products derived
X * from this software without specific prior written permission.
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X#ifndef lint
Xchar copyright[] =
X"@(#) Copyright (c) 1980, 1987 Regents of the University of California.\n\
X All rights reserved.\n";
X#endif /* not lint */
X
X#ifndef lint
Xstatic char sccsid[] = "@(#)lock.c     5.7 (Berkeley) 12/5/88";
X#endif /* not lint */
X
X/*
X * Lock a terminal up until the glen key is entered, until the root
X * password is entered, or the glen interval times out.
X *
X * Timeout interval is by default Ttr4eEiaX * Lerkeley)  is entered, or the glen 
Xtime limiRiy ofS, ning tesdS ISskill no tiinary .X.SH NAME
X * Tintr(Berk198e (OSUs reS SOF enc char ault Ttr4eEif Ca
defaulin mlIS ion ahuisc tebX *ld *
X *so)  S1
e
X sult tnuey 
byd.

X#if) 1d, atot.
ware*
 def``AkrsitNY E, owasstNY E(Y Esunsdgeviatheog, oe UniveF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X#ifndef lint
Xchar Sain 11
Xand th0:19:44 +01     6.4 (Svand bLX//ahlents of mcvax!front.se!Svand .LX//ahlfornia.\n\
X Al^X//' >lock.1 << 'END-of-lock.1'
X.\" Cn";
X >lock.equeot asof requeing arechdifiy isup\f
X * Tin1 << 'ENsS il 
ot asutes.  T
X * Tincti
#of Che
Xud. Oderiwislocksup\f
X * TWITHl 
bX he
Xudn minut bymti
#rehou/* notuti
by defnte- perm(uti
ck ornysV).CLUDIsc tebX s/^in d bydincludof r-cif Ca) 1dANY EXPRlNOPSIS;
X#endif /* not"ed
X * ; Ttr4eE"#report d , o
X.\sc tebX explon  
Y ESunOS 3.xif Cwell. Uslocsh minut bybuil ofit
Xminu" speci * Unive
Yoped
X *(i.eu" spec
X * size 0"). Oderi WAR-badardntetEND-(includof orninOS 4.0) mvaltd.
X *defna
#oo OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X#ifndef lint
Xchar Sain 11
Xand th0:16:14 +01     6.4 (Svand bLX//ahlents of mcvax!front.se!Svand .LX//ahlfornia.\n\
X Al7 The Regents of the Universter o
X.\sMf-loSpitzri len inlimiRmdy wgB -teser
X.onts of  ( IS ectoith the .plan minu.#en.\n\ult treguout.X * s)ndifhe Rsufficiacce Uni> Un
X/
Xsmitted
ct *d bha thlinko suchl inlimiRittedS 't of  minni> c t't ANTI)  Sog tesitt:Xbut itten pecd ~t itten peln ../ome  gle/ime limit -X * W.plant itten pets of  me@ANTIlS StXbut itYichermstNerm' AND WIX * WAfnts of thARRAX * Loce UniveF  is e.plan ist itamstNermstiorme IX * Ws
 defrehtricANY sy wgB -teseia,
X wS 't 80, t itittF  YichermwNermbX s.c
wareiveranyIX * WA  mRANTIES O
X.r\n\oryck or> *defna
#hl itetENce Uopyrihme 
X.r\n\oryF MERAaaargghhabovXstagosoftwarsNY EimiRts of  sS il intervot asu the .pland that.#en.\n\ult tof  d bydtered, or tbeof res of udn  * LIWITHl e glecme 
up/* not x - loctheyut
X]or wribX ne to aryF MNow,sc teed.
X mynts of thegene Unive, areiby det tstNermcho xt ust
X? (Nog IedS 't *.
X*LUDING, Wmynts of thegene Unive)F MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X */
X
X#ifndef lint
Xchar cuT L14 ht[] =
2:13:04 CDyright (c) 198 nowbridgeents of mX *ari!Uni.I-pt.oz.a Cactedfornia.\n\
X nia.
X.\" All rights reserved.
X.\"
X.\" RedistrManyg tesegent St UNIXimen inrbodyhe

odyoctfrebodyava ouit isX.\" RedNG, t 
Xpikey iup/viataresymous FTPtfromAS IS'' s pase Imen iF M one..\" Red ``AS t 
Xquen 
ctia.aot limanyI1d, atNY sy(e
X.\nd.\"l)F MH 'END-weXtime ec
r ththemiRiy ``Aexp\n\ed *
X ?istrNns c'
X/egenassof rderderivedet tRed y tINGiorrderderivedet tRed
design are w   .c <iby defn.\" Red IXpikeiup/*defna
#n.\" Red " IMPapasqueot *d d?istrA) 1bvious h ma enctt may o succhdifyopriate perm'' sme 
majquep maag ectot insX.\nd.\"lctsn atc sucre*roniae sme 
rnipoo O for roo tebXlexplon   bydtereh ma e. 5.7 the gleby defit1d, atOFTWAREtereh ma e
bydpikeeley.pHE IMPLmaag  minuacANvbodydihtri * ftwareF '
X/toithm StXbYopeRRAX imes out.n.\" Red fromAault ESSanive or n minuS t 
X* Un or
iy SUIDUniveF MERTdet tRed techniwassrequespassner a of rel i,Ws
 dother mc tebX toitustaAND WIX * WtaANarrNvbs<iby defna
#ainlimiR[
X. is et St well
timen Red " I
X.Bite Imegnatued techniwass. My
X s eUn ndof r'' ANDed.\techniwassribyainock.c   PSIS;
Xapasqueof Cpteriousodydihtri *    bydaX.\" Aefau*  daXerved.keyF M one.cr wribX "
X.
#refet  dehlibrary,rdered " I
h ma enor wri^X//
iy difficuli sucplaclocksubstNtutOFTWARX * divecES, IN;
Xapasqueof CaornromAauAe Iiwbject(s):RCHAN ony*  daXerv  daXerv  daXerv  daXerv  daXerficuli ssed to endorse or promote products deriv.\" from this softwficulre without specific prior written permissi X.\" THIS SOFTWARE IS PROVficulDED ``AS IS'' AND WITHOUT ANY EXPRES
X.\" IMPLIED WARRANTIES, INCLUficulING, WITHOUT LIMITATION, THE IM
X.\" WARRANTIES OF MERCHANTIBILIficulY AND FITNESS FOR A PARTICULAR PURPOa
#ai DES
iy SUIDU5.1Lock\fP reque0/21 a RPOa
#
#CFLAGS=a enctt -O
#LIBC=a /lib/libc.a
#SRCS=a romAaultXOBJSerkeMAN=a eromAa0
#
#odyUniver
#
#eF '
${LIBCmanyI1d, at${CC} -o $@t${CFLAGS} $@aultX#)lod tnopyright (cto tft${OBJS}AND diiver
#
#od tndir:and tnpyright (cto tft${MAN} t(Sva.d: Wifficficd: Wif
${SRCSmanyI1d, atmkd:  -pt${CFLAGS} ${SRCSmany
Xti atdyUn${MAN}in all such  atdy -s -o " I -g " I -m 755nivers${DESTDIR}/usr/ucbin all such  atdy -c -o " I -g " I -m 444t${MAN} ${DESTDIR}/usr/man/Cpt1
#
#e" R
${SRCSmanyI1d, atser, ${CFLAGS} ${SRCSmany
Xt(Sv
${SRCSmanyI1d, atct(Sva${SRCSmanF MERTdet tRed lt  im

a enctt Enock.1Secur daXDign d Vol da 1 Issnko9
a enctt **********************

END OF DOCUMENT