skey moved...
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/copyleft/gpl.txt.
|
||||
#
|
||||
# Note that we fiddle with permissions of everything to make sure not to make a security hole
|
||||
#
|
||||
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import libtools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
|
||||
def setup():
|
||||
shelltools.export("SENDMAIL", "/usr/sbin/sendmail")
|
||||
shelltools.export("CFLAGS", "%s -DSKEY_HASH_DEFAULT=1" % get.CFLAGS())
|
||||
autotools.configure("--sysconfdir=/etc/skey")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
### Runtime
|
||||
for i in ["skey", "skeyinit", "skeyinfo"]:
|
||||
pisitools.dobin(i)
|
||||
|
||||
for i in ["otp-md4", "otp-sha1", "otp-md5"]:
|
||||
pisitools.dosym("skey", "/usr/bin/%s" % i)
|
||||
|
||||
pisitools.insinto("/usr/sbin", "skeyprune.pl", "skeyprune")
|
||||
pisitools.insinto("/usr/bin", "skeyaudit.sh", "skeyaudit")
|
||||
|
||||
# these must be suid root so users can generate their passwords, fperms u+s,og-r
|
||||
for i in ["skeyinit", "skeyinfo", "skeyaudit"]:
|
||||
shelltools.chmod("%s/usr/bin/%s" % (get.installDIR(), i), 4755)
|
||||
|
||||
shelltools.chmod("%s/usr/bin/skey" % get.installDIR(), 0755)
|
||||
shelltools.chmod("%s/usr/sbin/skeyprune" % get.installDIR(), 0755)
|
||||
|
||||
|
||||
### Developement
|
||||
pisitools.insinto("/usr/include", "skey.h")
|
||||
|
||||
for i in ["libskey.so.1.1.5", "libskey.so.1", "libskey.so"]:
|
||||
# dolib borks with symlinks
|
||||
# pisitools.dolib(i, destinationDirectory="/lib")
|
||||
pisitools.insinto("/lib", i)
|
||||
shelltools.chmod("%s/lib/%s" % (get.installDIR(), i), 0755)
|
||||
|
||||
#libtools.gen_usr_ldscript("libskey.so")
|
||||
pisitools.dosym("../../lib/libskey.so", "/usr/lib/libskey.so")
|
||||
|
||||
|
||||
### Config
|
||||
# only root needs to have access to these files. fperms g-rx,o-rx /etc/skey
|
||||
pisitools.dodir("/etc/skey")
|
||||
shelltools.chmod("%s/etc/skey" % get.installDIR(), 0700)
|
||||
|
||||
# skeyinit will not function if this file is not present. these permissions are applied by the skey system if missing.
|
||||
shelltools.touch("%s/etc/skey/skeykeys" % get.installDIR())
|
||||
shelltools.chmod("%s/etc/skey/skeykeys" % get.installDIR(), 0600)
|
||||
|
||||
|
||||
### Docs
|
||||
for i in ["skey.1", "skeyaudit.1", "skeyinfo.1", "skeyinit.1", "skey.3", "skeyprune.8"]:
|
||||
pisitools.doman(i)
|
||||
|
||||
pisitools.dodoc("CHANGES", "README")
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Nur skey-1.1.5-old//skeyprune.pl skey-1.1.5/skeyprune.pl
|
||||
--- skey-1.1.5-old//skeyprune.pl 2010-09-12 15:03:35.695999732 +0300
|
||||
+++ skey-1.1.5/skeyprune.pl 2010-09-12 15:06:03.817000568 +0300
|
||||
@@ -14,7 +14,7 @@
|
||||
die "Usage: $0 [days]\n" if $#ARGC > 0;
|
||||
|
||||
# Pathnames
|
||||
-$keyfile = '/etc/skeykeys';
|
||||
+$keyfile = '/etc/skey/skeykeys';
|
||||
$temp = "$keyfile.tmp$$";
|
||||
|
||||
# Quick mapping of month name -> number
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Nur skey-1.1.5-old//skeyinit.1 skey-1.1.5/skeyinit.1
|
||||
--- skey-1.1.5-old//skeyinit.1 2010-09-12 15:03:35.695999732 +0300
|
||||
+++ skey-1.1.5/skeyinit.1 2010-09-12 15:10:43.478000350 +0300
|
||||
@@ -47,7 +47,7 @@
|
||||
(default is 100).
|
||||
.It Fl t Ar hash
|
||||
Selects the hash algorithm to use.
|
||||
-Available choices are md4 (the default), md5 or sha1.
|
||||
+Available choices are md4, md5 (the default) or sha1.
|
||||
.It Ar user
|
||||
The username to be changed/added.
|
||||
By default the current user is operated on, only root may
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -Nur skey-1.1.5-old//skey.3 skey-1.1.5/skey.3
|
||||
--- skey-1.1.5-old//skey.3 2010-09-12 15:03:35.696999758 +0300
|
||||
+++ skey-1.1.5/skey.3 2010-09-12 15:12:24.658996394 +0300
|
||||
@@ -245,10 +245,8 @@
|
||||
.Bl -tag -width /usr/lib/libskey_p.a -compact
|
||||
.It Pa /usr/lib/libskey.a
|
||||
static skey library
|
||||
-.It Pa /usr/lib/libskey.so
|
||||
+.It Pa /lib/libskey.so
|
||||
dynamic skey library
|
||||
-.It Pa /usr/lib/libskey_p.a
|
||||
-static skey library compiled for profiling
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr skey 1 ,
|
||||
@@ -1,34 +0,0 @@
|
||||
--- skey-1.1.5-orig/put.c 2008-09-21 10:12:06.000000000 +0200
|
||||
+++ skey-1.1.5/put.c 2008-09-21 10:19:54.000000000 +0200
|
||||
@@ -2206,27 +2206,17 @@
|
||||
{
|
||||
int i, j;
|
||||
|
||||
- for (;;) {
|
||||
+ while (low <= high) {
|
||||
i = (low + high) / 2;
|
||||
|
||||
if ((j = strncmp(w, Wp[i], 4)) == 0)
|
||||
return i; /* Found it */
|
||||
- if (high == low + 1)
|
||||
- {
|
||||
- /* Avoid effects of integer truncation in /2 */
|
||||
- if (strncmp(w, Wp[high], 4) == 0)
|
||||
- return high;
|
||||
- else
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (low >= high)
|
||||
- return -1; /* I don't *think* this can happen... */
|
||||
if (j < 0)
|
||||
- high = i; /* Search lower half */
|
||||
+ high = i - 1; /* Search lower half */
|
||||
else
|
||||
- low = i; /* Search upper half */
|
||||
+ low = i + 1; /* Search upper half */
|
||||
}
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
static void insert(char *s, int x, int start, int length)
|
||||
@@ -1,15 +0,0 @@
|
||||
--- Makefile.in.orig 2005-08-19 18:14:48.000000000 -0400
|
||||
+++ Makefile.in 2005-08-19 18:15:45.000000000 -0400
|
||||
@@ -67,10 +67,10 @@
|
||||
${CC} -o $@ ${SKEYOBJS} ${LDFLAGS} -lskey ${LIBS}
|
||||
|
||||
skeyinit: libskey.so ${SKEYINITOBJS}
|
||||
- ${CC} -o $@ ${SKEYINITOBJS} ${LDFLAGS} -lskey ${LIBS}
|
||||
+ ${CC} -o $@ ${SKEYINITOBJS} ${LDFLAGS} -lskey ${LIBS} -Wl,-z,now
|
||||
|
||||
skeyinfo: libskey.so ${SKEYINFOOBJS}
|
||||
- ${CC} -o $@ ${SKEYINFOOBJS} ${LDFLAGS} -lskey ${LIBS}
|
||||
+ ${CC} -o $@ ${SKEYINFOOBJS} ${LDFLAGS} -lskey ${LIBS} -Wl,-z,now
|
||||
|
||||
${MANPAGES} ${SCRIPTS}::
|
||||
${FIXPATHSCMD} ${srcdir}/$@
|
||||
@@ -1,12 +0,0 @@
|
||||
--- Makefile.in 2004-02-25 10:16:15.219448392 +0000
|
||||
+++ Makefile.in 2004-02-25 10:16:39.087583762 +0000
|
||||
@@ -50,6 +50,9 @@
|
||||
|
||||
${LIBOBJS}: config.h
|
||||
|
||||
+${LIBOBJS}: %.o: %.c
|
||||
+ ${CC} ${CFLAGS} -fPIC -c $< -o $@
|
||||
+
|
||||
libskey.a: ${LIBOBJS}
|
||||
${AR} rv $@ ${LIBOBJS}
|
||||
${RANLIB} $@
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,59 +0,0 @@
|
||||
diff -Nur skey-1.1.5.orig/skey.c skey-1.1.5/skey.c
|
||||
--- skey-1.1.5.orig/skey.c 2004-11-12 23:09:02.382529123 +0100
|
||||
+++ skey-1.1.5/skey.c 2004-11-12 23:23:09.864378849 +0100
|
||||
@@ -46,6 +46,17 @@
|
||||
char passwd[SKEY_MAX_PW_LEN+1], key[SKEY_BINKEY_SIZE];
|
||||
char buf[33], *seed, *slash, *t;
|
||||
|
||||
+ /* If we were called as otp-METHOD, set algorithm based on that */
|
||||
+ if ((slash = strrchr(argv[0], '/')))
|
||||
+ slash++;
|
||||
+ else
|
||||
+ slash = argv[0];
|
||||
+ if (strncmp(slash, "otp-", 4) == 0) {
|
||||
+ slash += 4;
|
||||
+ if (skey_set_algorithm(slash) == NULL)
|
||||
+ errx(1, "Unknown hash algorithm %s", slash);
|
||||
+ }
|
||||
+
|
||||
while ((i = getopt(argc, argv, "fn:p:t:x")) != -1) {
|
||||
switch(i) {
|
||||
case 'f':
|
||||
diff -Nur skey-1.1.5.orig/skey.1 skey-1.1.5/skey.1
|
||||
--- skey-1.1.5.orig/skey.1 2004-11-12 23:09:02.375530148 +0100
|
||||
+++ skey-1.1.5/skey.1 2004-11-12 23:41:43.298268426 +0100
|
||||
@@ -6,7 +6,7 @@
|
||||
.Dt SKEY 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
-.Nm skey
|
||||
+.Nm skey, otp-md4, otp-md5, otp-sha1
|
||||
.Nd respond to an OTP challenge
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
@@ -27,13 +27,24 @@
|
||||
.Pp
|
||||
.Em S/Key
|
||||
uses 64 bits of information, transformed by the
|
||||
-.Tn MD4
|
||||
+.Tn MD5
|
||||
algorithm into 6 English words.
|
||||
The user supplies the words to authenticate himself to programs like
|
||||
.Xr login 1
|
||||
or
|
||||
.Xr ftpd 8 .
|
||||
.Pp
|
||||
+When
|
||||
+.Nm skey
|
||||
+is invoked as
|
||||
+.Nm otp-method ,
|
||||
+.Nm skey
|
||||
+will use
|
||||
+.Ar method
|
||||
+as the hash function where
|
||||
+.Ar method
|
||||
+is currently one of md4, md5, or sha1.
|
||||
+.Pp
|
||||
Example use of the
|
||||
.Em S/Key
|
||||
program
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -ruN skey-1.1.5.orig/skeyinit.c skey-1.1.5/skeyinit.c
|
||||
--- skey-1.1.5.orig/skeyinit.c 2003-11-12 21:26:49.000000000 +0000
|
||||
+++ skey-1.1.5/skeyinit.c 2003-11-12 21:28:24.000000000 +0000
|
||||
@@ -62,6 +62,11 @@
|
||||
#define SKEY_NAMELEN 4
|
||||
#endif
|
||||
|
||||
+/* #33315 */
|
||||
+#ifndef LOGIN_NAME_MAX
|
||||
+#define LOGIN_NAME_MAX 256
|
||||
+#endif
|
||||
+
|
||||
int main __P((int, char **));
|
||||
|
||||
int main(int argc, char **argv)
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Nur skey-1.1.5-old//skeyprune.pl skey-1.1.5/skeyprune.pl
|
||||
--- skey-1.1.5-old//skeyprune.pl 2010-09-12 15:07:36.778000090 +0300
|
||||
+++ skey-1.1.5/skeyprune.pl 2010-09-12 15:08:05.152998914 +0300
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
while (<OLD>) {
|
||||
# Ignore commented out entries
|
||||
- if ( ! /^#[^\s#]+\s+(MD[0-9]+\s+)?[0-9]+\s+[A-z0-9_-]+\s+[a-f0-9]+\s+(Jan|Feb|Mar|Apr|May|Ju[nl]|Aug|Sep|Oct|Nov|Dec)\s+[0-9]+,\s*[0-9]+\s+[0-9]+:[0-9]+:[0-9]+$/ ) {
|
||||
+ if ( ! /^#[^\s#]+\s+(MD[0-9]+\s+)?[0-9]+\s+[A-z0-9_-]+\s+[a-f0-9]+\s+(Jan|Feb|Mar|Apr|May|Ju[nl]|Aug|Sep|Oct|Nov|Dec)\s+[0-9]+,\s*[0-9]+\s+[0-9]+:[0-9]+:[0-9]+$/i ) {
|
||||
/((Jan|Feb|Mar|Apr|May|Ju[nl]|Aug|Sep|Oct|Nov|Dec)\s+[0-9]+,\s*[0-9]+\s+[0-9]+:[0-9]+:[0-9]+)$/;
|
||||
|
||||
# Prune out old entries if asked to
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>skey</Name>
|
||||
<Homepage>http://www.openbsd.org/faq/faq8.html#SKey</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>BSD</License>
|
||||
<IsA>app:console</IsA>
|
||||
<IsA>library</IsA>
|
||||
<Summary>Linux Port of OpenBSD Single-key Password System</Summary>
|
||||
<Description>skey is an S/Key implementation ported from OpenBSD. S/Key provides One Time Password functionality, and can be used to increase system security.</Description>
|
||||
<Archive sha1sum="d55fb286098900cdf3eb6b174a720a06c722312a" type="tarbz2">http://source.pisilinux.org/1.0/skey-1.1.5.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>cracklib-devel</Dependency>
|
||||
<Dependency>zlib-devel</Dependency>
|
||||
<Dependency>perl</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- Backports from NETBSD, shadow cracklib support etc. -->
|
||||
<Patch level="1">skey-1.1.5-gentoo.diff</Patch>
|
||||
|
||||
<!-- Glibc does not define LOGIN_NAME_MAX -->
|
||||
<Patch level="1">skey-login_name_max.diff</Patch>
|
||||
|
||||
<!-- Build enhancements -->
|
||||
<Patch>skey-1.1.5-fPIC.patch</Patch>
|
||||
<Patch>skey-1.1.5-bind-now.patch</Patch>
|
||||
|
||||
<!-- Allow invokation as otp-foo -->
|
||||
<Patch level="1">skey-1.1.5-otp.diff</Patch>
|
||||
|
||||
<!-- Fix binary search -->
|
||||
<Patch level="1">skey-1.1.5-binary-search.patch</Patch>
|
||||
|
||||
<!-- sed -i -e 's:/etc/skeykeys:/etc/skey/skeykeys:g' skeyprune.pl skeyprune.8 -->
|
||||
<Patch level="1">confdir.patch</Patch>
|
||||
|
||||
<!-- Make sure to use case insensitive check for zeroed entries
|
||||
sed -i -e 's:\(if ( ! /.*/\):\1i:g' skeyprune.pl -->
|
||||
<Patch level="1">zeroed_entries.patch</Patch>
|
||||
|
||||
<!-- sed -i 's#\(md4\) \((the default)\), \(md5\) or \(sha1.\)#\1, \3 \2 or \4#g' skeyinit.1 -->
|
||||
<Patch level="1">default_hash.patch</Patch>
|
||||
|
||||
<!-- sed -i 's:/usr\(/lib/libskey.so\):\1:;/It.*libskey_p/{N;d;}' skey.3 -->
|
||||
<Patch level="1">fix_library_info.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>skey</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>cracklib</Dependency>
|
||||
<Dependency>zlib</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc/skey</Path>
|
||||
<Path fileType="library">/lib</Path>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="executable">/usr/sbin</Path>
|
||||
<Path fileType="doc">/usr/share/doc/skey</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>skey-devel</Name>
|
||||
<PartOf>system.devel</PartOf>
|
||||
<Summary>Development files for skey</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">skey</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="header">/usr/include</Path>
|
||||
<Path fileType="man">/usr/share/man/man3</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2014-05-21</Date>
|
||||
<Version>1.1.5</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>skey</Name>
|
||||
<Summary xml:lang="tr">Linux için OpenBSD tek anahtarlı parola sistemi</Summary>
|
||||
<Description xml:lang="tr">skey, OpenBSD'den Linux'a aktarılan S/Key sistemidir. S/Key sistemi Tek Seferlik Parola özelilği ile sistem güvenliğini arttırmak için kullanılabilir.</Description>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>skey-devel</Name>
|
||||
<Summary xml:lang="tr">skey için geliştirme dosyaları</Summary>
|
||||
</Package>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user