Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hill Ma
Adélie Package Tree
Commits
3ab7801c
Verified
Commit
3ab7801c
authored
7 years ago
by
Anna Wilcox
Browse files
Options
Downloads
Patches
Plain Diff
user/kscreenlocker: new package
parent
5c6964cb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
user/kscreenlocker/APKBUILD
+51
-0
51 additions, 0 deletions
user/kscreenlocker/APKBUILD
user/kscreenlocker/kscreenlocker-5.8.5-stop-using-getpass.patch
+71
-0
71 additions, 0 deletions
...screenlocker/kscreenlocker-5.8.5-stop-using-getpass.patch
with
122 additions
and
0 deletions
user/kscreenlocker/APKBUILD
0 → 100644
+
51
−
0
View file @
3ab7801c
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname
=
kscreenlocker
pkgver
=
5.8.7
pkgrel
=
0
pkgdesc
=
"Secure X11 screen locker"
url
=
"https://www.kde.org/"
arch
=
"all"
license
=
"LGPL-2.1"
options
=
"!check"
# requires loginctl
depends
=
""
depends_dev
=
"qt5-qtbase-dev qt5-qtdeclarative-dev kcrash-dev kdeclarative-dev
kglobalaccel-dev ki18n-dev kidletime-dev kcmutils-dev solid-dev
knotifications-dev ktextwidgets-dev kwindowsystem-dev kxmlgui-dev
kwayland-dev libxi-dev libxcursor-dev"
makedepends
=
"
$depends_dev
cmake extra-cmake-modules python3 gettext-dev
libx11-dev libxext-dev libxcb-dev linux-pam-dev"
install
=
""
subpackages
=
"
$pkgname
-dev
$pkgname
-lang"
source
=
"http://download.kde.org/stable/plasma/
$pkgver
/kscreenlocker-
$pkgver
.tar.xz
kscreenlocker-5.8.5-stop-using-getpass.patch"
builddir
=
"
$srcdir
/kscreenlocker-
$pkgver
"
build
()
{
cd
"
$builddir
"
if
[
"
$CBUILD
"
!=
"
$CHOST
"
]
;
then
CMAKE_CROSSOPTS
=
"-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake
\
-DCMAKE_INSTALL_PREFIX
=
/usr
\
-DCMAKE_INSTALL_LIBDIR
=
lib
\
-DBUILD_SHARED_LIBS
=
True
\
-DCMAKE_BUILD_TYPE
=
RelWithDebugInfo
\
-DCMAKE_CXX_FLAGS
=
"
$CXXFLAGS
"
\
-DCMAKE_C_FLAGS
=
"
$CFLAGS
"
\
${
CMAKE_CROSSOPTS
}
make
}
check
()
{
cd
"
$builddir
"
CTEST_OUTPUT_ON_FAILURE
=
TRUE ctest
}
package
()
{
cd
"
$builddir
"
make
DESTDIR
=
"
$pkgdir
"
install
}
sha512sums
=
"cee66e85efaafd5629c9e2b1eea1522cff960d7b9922be7b6d5f767c231fcb762cf80585d5528fdb5fc3684881bf2fa4a59da3136a1d23341ceb218da3f69e11 kscreenlocker-5.8.7.tar.xz
44bbf365555668f7ef2f354a06d08b4b83c556f6e78ead028acd727363c287cfecc2e3eb4d0bb137feb2939da0fa21db694af6b10f8a3878d7071ad4e3b8d4e8 kscreenlocker-5.8.5-stop-using-getpass.patch"
This diff is collapsed.
Click to expand it.
user/kscreenlocker/kscreenlocker-5.8.5-stop-using-getpass.patch
0 → 100644
+
71
−
0
View file @
3ab7801c
--- kscreenlocker-5.8.5/kcheckpass/kcheckpass.c.old 2016-12-27 11:25:36.000000000 +0000
+++ kscreenlocker-5.8.5/kcheckpass/kcheckpass.c 2017-01-31 04:32:44.858227055 +0000
@@ -56,6 +56,7 @@
#include <stdlib.h>
#include <errno.h>
#include <time.h>
+#include <termios.h>
#include <config-kscreenlocker.h>
#if HAVE_SYS_PRCTL_H
@@ -75,9 +76,41 @@
static int havetty, sfd = -1, nullpass;
static char *
+better_getpass (void)
+{
+ char *password = NULL, *nl;
+ size_t buf_len = 0;
+ ssize_t pass_len;
+ struct termios ti;
+
+ tcgetattr(STDIN_FILENO, &ti);
+ ti.c_lflag &= ~ECHO;
+ tcsetattr(STDIN_FILENO, TCSANOW, &ti);
+
+ pass_len = getdelim(&password, &buf_len, '\n', stdin);
+
+ if (pass_len < 0) {
+ free(password);
+ return NULL;
+ }
+
+ ti.c_lflag |= ECHO;
+ tcsetattr(STDIN_FILENO, TCSANOW, &ti);
+
+ /* Do not include the \n at the end */
+ nl = strchr(password, '\n');
+ if (nl) {
+ *nl = '\0';
+ }
+
+ return password;
+}
+
+
+static char *
conv_legacy (ConvRequest what, const char *prompt)
{
- char *p, *p2;
+ char *p2;
int len;
char buf[1024];
@@ -99,13 +132,10 @@
return strdup(buf);
case ConvGetHidden:
if (havetty) {
-#ifdef HAVE_GETPASSPHRASE
- p = getpassphrase(prompt ? prompt : "Password: ");
-#else
- p = getpass(prompt ? prompt : "Password: ");
-#endif
- p2 = strdup(p);
- memset(p, 0, strlen(p));
+ fputs(prompt ? prompt : "Password: ", stdout);
+ fflush(stdout);
+ p2 = better_getpass();
+ printf("\n");
return p2;
} else {
if (prompt)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment