summaryrefslogtreecommitdiff
path: root/source/n/popa3d
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/popa3d')
-rw-r--r--source/n/popa3d/popa3d-1.0.2-crypt.diff50
-rwxr-xr-xsource/n/popa3d/popa3d.SlackBuild7
2 files changed, 55 insertions, 2 deletions
diff --git a/source/n/popa3d/popa3d-1.0.2-crypt.diff b/source/n/popa3d/popa3d-1.0.2-crypt.diff
new file mode 100644
index 00000000..c6c006c7
--- /dev/null
+++ b/source/n/popa3d/popa3d-1.0.2-crypt.diff
@@ -0,0 +1,50 @@
+--- Owl/packages/popa3d/popa3d/auth_passwd.c 2002/03/20 17:08:45 1.1
++++ Owl/packages/popa3d/popa3d/auth_passwd.c 2012/08/15 09:06:39 1.2
+@@ -26,9 +26,11 @@ struct passwd *auth_userpass(char *user,
+ if (!pw || !*pw->pw_passwd ||
+ *pw->pw_passwd == '*' || *pw->pw_passwd == '!')
+ crypt(pass, AUTH_DUMMY_SALT);
+- else
+- if (!strcmp(crypt(pass, pw->pw_passwd), pw->pw_passwd))
+- result = pw;
++ else {
++ char *hash = crypt(pass, pw->pw_passwd);
++ if (hash && !strcmp(hash, pw->pw_passwd))
++ result = pw;
++ }
+
+ if (pw)
+ memset(pw->pw_passwd, 0, strlen(pw->pw_passwd));
+--- Owl/packages/popa3d/popa3d/auth_shadow.c 2006/03/05 13:18:32 1.2
++++ Owl/packages/popa3d/popa3d/auth_shadow.c 2012/08/15 09:06:39 1.3
+@@ -52,9 +52,11 @@ struct passwd *auth_userpass(char *user,
+ if (!(spw = getspnam(user)) || !pw || !*spw->sp_pwdp ||
+ *spw->sp_pwdp == '*' || *spw->sp_pwdp == '!')
+ crypt(pass, AUTH_DUMMY_SALT);
+- else
+- if (!strcmp(crypt(pass, spw->sp_pwdp), spw->sp_pwdp))
+- result = 1;
++ else {
++ char *hash = crypt(pass, spw->sp_pwdp);
++ if (hash && !strcmp(hash, spw->sp_pwdp))
++ result = 1;
++ }
+ write(channel[1], &result, 1);
+ exit(0);
+ }
+--- Owl/packages/popa3d/popa3d/virtual.c 2006/03/07 03:30:15 1.3
++++ Owl/packages/popa3d/popa3d/virtual.c 2012/08/15 09:06:39 1.4
+@@ -175,8 +175,11 @@ struct passwd *virtual_userpass(char *us
+ endpwent();
+
+ result = NULL;
+- if (!strcmp(crypt(pass, passwd), passwd) && !fail)
+- result = pw;
++ {
++ char *computed_hash = crypt(pass, passwd);
++ if (computed_hash && !strcmp(computed_hash, passwd) && !fail)
++ result = pw;
++ }
+
+ memset(auth, 0, sizeof(auth));
+
diff --git a/source/n/popa3d/popa3d.SlackBuild b/source/n/popa3d/popa3d.SlackBuild
index 7f6713cd..3767fae6 100755
--- a/source/n/popa3d/popa3d.SlackBuild
+++ b/source/n/popa3d/popa3d.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=1.0.2
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -45,7 +45,10 @@ cd $TMP
rm -rf popa3d-$VERSION
tar xvf $CWD/popa3d-$VERSION.tar.gz || exit 1
cd popa3d-$VERSION || exit 1
+
zcat $CWD/popa3d.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $CWD/popa3d-1.0.2-crypt.diff.gz | patch -p4 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \