Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 402154 Details for
Bug 547968
net-misc/hylafaxplus version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
working patch
hylafax-cryptglibc.patch (text/plain), 2.82 KB, created by
Oliver Jaksch
on 2015-04-28 11:25:42 UTC
(
hide
)
Description:
working patch
Filename:
MIME Type:
Creator:
Oliver Jaksch
Created:
2015-04-28 11:25:42 UTC
Size:
2.82 KB
patch
obsolete
>diff -urN hylafax-5.5.6.orig/hfaxd/Login.c++ hylafax-5.5.6/hfaxd/Login.c++ >--- hylafax-5.5.6.orig/hfaxd/Login.c++ 2015-04-22 22:04:44.000000000 +0200 >+++ hylafax-5.5.6/hfaxd/Login.c++ 2015-04-28 09:40:55.557593865 +0200 >@@ -30,9 +30,6 @@ > #include <ctype.h> > #include <fcntl.h> > #include <pwd.h> >-#if HAS_CRYPT_H >-#include <crypt.h> >-#endif > > void > HylaFAXServer::loginRefused(const char* why) >@@ -443,7 +440,7 @@ > * Check hosts.hfaxd first, then PAM, and last, LDAP > */ > if (pass[0] != '\0') { >- char* ep = crypt(pass, passWd); >+ const char* ep = Sys::crypt(pass, passWd); > if ((ep && strcmp(ep, passWd) == 0) || > pamCheck(the_user, pass) || > ldapCheck(the_user, pass)) { >@@ -526,7 +523,7 @@ > { > fxAssert(IS(LOGGEDIN), "ADMIN command permitted when not logged in"); > // NB: null adminWd is permitted >- char* ep = crypt(pass, adminWd); >+ const char* ep = Sys::crypt(pass, adminWd); > if ((!ep || strcmp(ep, adminWd) != 0) && !pamIsAdmin()) { > if (++adminAttempts >= maxAdminAttempts) { > reply(530, "Password incorrect (closing connection)."); >diff -urN hylafax-5.5.6.orig/hfaxd/SNPPServer.c++ hylafax-5.5.6/hfaxd/SNPPServer.c++ >--- hylafax-5.5.6.orig/hfaxd/SNPPServer.c++.org 2015-04-22 22:04:44.000000000 +0200 >+++ hylafax-5.5.6/hfaxd/SNPPServer.c++ 2015-04-28 09:43:39.941592019 +0200 >@@ -36,9 +36,6 @@ > #include "RE.h" > > #include <ctype.h> >-#if HAS_CRYPT_H >-#include <crypt.h> >-#endif > > extern "C" { > #include <netdb.h> >@@ -1004,7 +1001,7 @@ > if (checkUser(loginID)) { > if (passWd != "") { > if (pass[0] != '\0') { >- char* ep = crypt(pass, passWd); >+ const char* ep = Sys::crypt(pass, passWd); > if ((ep && streq(ep, passWd)) || > pamCheck(the_user, pass)) { > // log-in successful >diff -urN hylafax-5.5.6.orig/hfaxd/User.c++ hylafax-5.5.6/hfaxd/User.c++ >--- hylafax-5.5.6.orig/hfaxd/User.c++ 2015-04-28 09:44:37.676131453 +0200 >+++ hylafax-5.5.6/hfaxd/User.c++ 2015-04-28 09:45:05.005966447 +0200 >@@ -30,9 +30,6 @@ > > #include <ctype.h> > #include <pwd.h> >-#if HAS_CRYPT_H >-#include <crypt.h> >-#endif > #include <math.h> > > #ifndef CHAR_BIT >@@ -374,7 +371,7 @@ > #else > to64(&salt[0], random(), 2); > #endif >- result = crypt(pass, salt); >+ result = Sys::crypt(pass, salt); > return (true); > } > >diff -urN hylafax-5.5.6.orig/util/Sys.h hylafax-5.5.6/util/Sys.h >--- hylafax-5.5.6.orig/util/Sys.h 2015-04-28 09:46:37.843007850 +0200 >+++ hylafax-5.5.6/util/Sys.h 2015-04-28 09:48:31.614154196 +0200 >@@ -44,6 +44,10 @@ > #include <osfcn.h> > #endif > >+#if HAS_CRYPT_H >+#include <crypt.h> >+#endif >+ > /* > * Wrapper functions for C library calls. > * >@@ -140,5 +144,8 @@ > { return ::fopen(filename, mode); } > > static int getOpenMax(); >+ >+ static const char* crypt(const char* key, const char* salt) >+ { const char* enc = ::crypt(key, salt); return enc ? enc : ""; } > }; > #endif /* _Sys_ */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 547968
:
402142
|
402144
| 402154