Accepting request 447476 from X11:windowmanagers

1

OBS-URL: https://build.opensuse.org/request/show/447476
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/i3lock?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2017-01-10 09:44:04 +00:00 committed by Git OBS Bridge
commit dd02719682
5 changed files with 39 additions and 23 deletions

View File

@ -3,10 +3,10 @@ Date: Sat Feb 15 14:20:27 2014 +0100
add the option to use unix2_chkpwd instead of needing setgid shadow
Index: i3lock-2.7/Makefile
Index: i3lock-2.8/Makefile
===================================================================
--- i3lock-2.7.orig/Makefile
+++ i3lock-2.7/Makefile
--- i3lock-2.8.orig/Makefile
+++ i3lock-2.8/Makefile
@@ -14,7 +14,11 @@ CFLAGS += -Wall
CPPFLAGS += -D_GNU_SOURCE
CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
@ -19,12 +19,12 @@ Index: i3lock-2.7/Makefile
LIBS += -lev
LIBS += -lm
Index: i3lock-2.7/i3lock.c
Index: i3lock-2.8/i3lock.c
===================================================================
--- i3lock-2.7.orig/i3lock.c
+++ i3lock-2.7/i3lock.c
@@ -19,7 +19,9 @@
#include <xcb/dpms.h>
--- i3lock-2.8.orig/i3lock.c
+++ i3lock-2.8/i3lock.c
@@ -18,7 +18,9 @@
#include <xcb/xkb.h>
#include <err.h>
#include <assert.h>
+#ifndef USE_UNIX2_CHKPWD
@ -33,7 +33,7 @@ Index: i3lock-2.7/i3lock.c
#include <getopt.h>
#include <string.h>
#include <ev.h>
@@ -30,6 +32,13 @@
@@ -29,6 +31,13 @@
#include <cairo.h>
#include <cairo/cairo-xcb.h>
@ -47,7 +47,7 @@ Index: i3lock-2.7/i3lock.c
#include "i3lock.h"
#include "xcb.h"
#include "cursors.h"
@@ -51,7 +60,9 @@ int inactivity_timeout = 30;
@@ -49,7 +58,9 @@ int inactivity_timeout = 30;
uint32_t last_resolution[2];
xcb_window_t win;
static xcb_cursor_t cursor;
@ -57,8 +57,8 @@ Index: i3lock-2.7/i3lock.c
int input_position = 0;
/* Holds the password you enter (in UTF-8). */
static char password[512];
@@ -266,6 +277,62 @@ static void input_done(void) {
pam_state = STATE_PAM_VERIFY;
@@ -235,6 +246,62 @@ static void input_done(void) {
unlock_state = STATE_STARTED;
redraw_screen();
+#ifdef USE_UNIX2_CHKPWD
@ -120,7 +120,7 @@ Index: i3lock-2.7/i3lock.c
if (pam_authenticate(pam_handle, 0) == PAM_SUCCESS) {
DEBUG("successfully authenticated\n");
clear_password_memory();
@@ -282,7 +349,7 @@ static void input_done(void) {
@@ -248,7 +315,7 @@ static void input_done(void) {
exit(0);
}
@ -129,7 +129,7 @@ Index: i3lock-2.7/i3lock.c
if (debug_mode)
fprintf(stderr, "Authentication failure\n");
@@ -591,6 +658,7 @@ void handle_screen_resize(void) {
@@ -579,6 +646,7 @@ void handle_screen_resize(void) {
redraw_screen();
}
@ -137,7 +137,7 @@ Index: i3lock-2.7/i3lock.c
/*
* Callback function for PAM. We only react on password request callbacks.
*
@@ -621,6 +689,7 @@ static int conv_callback(int num_msg, co
@@ -609,6 +677,7 @@ static int conv_callback(int num_msg, co
return 0;
}
@ -145,7 +145,7 @@ Index: i3lock-2.7/i3lock.c
/*
* This callback is only a dummy, see xcb_prepare_cb and xcb_check_cb.
@@ -768,8 +837,10 @@ int main(int argc, char *argv[]) {
@@ -764,8 +833,10 @@ int main(int argc, char *argv[]) {
struct passwd *pw;
char *username;
char *image_path = NULL;
@ -156,14 +156,16 @@ Index: i3lock-2.7/i3lock.c
int curs_choice = CURS_NONE;
int o;
int optind = 0;
@@ -866,10 +937,12 @@ int main(int argc, char *argv[]) {
@@ -862,12 +933,14 @@ int main(int argc, char *argv[]) {
* the unlock indicator upon keypresses. */
srand(time(NULL));
+#ifndef USE_UNIX2_CHKPWD
/* Initialize PAM */
ret = pam_start("i3lock", username, &conv, &pam_handle);
if (ret != PAM_SUCCESS)
if ((ret = pam_start("i3lock", username, &conv, &pam_handle)) != PAM_SUCCESS)
errx(EXIT_FAILURE, "PAM: %s", pam_strerror(pam_handle, ret));
if ((ret = pam_set_item(pam_handle, PAM_TTY, getenv("DISPLAY"))) != PAM_SUCCESS)
errx(EXIT_FAILURE, "PAM: %s", pam_strerror(pam_handle, ret));
+#endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6882183ed0eca439e3ad1ae3e9d48b4d0a0b6f075e3850b46bf84aec97538fe2
size 19490

3
i3lock-2.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:028fc0f74df10826514d5a4ed38f6895935d1f5d47ca9fcffc64b076aaf6e2f4
size 19884

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Sun Dec 18 19:05:55 UTC 2016 - mimi.vx@gmail.com
- update to 2.8
- refresh i3lock-2.5-use-unix2_chkpwd.diff
* Remove DPMS support in favor of a wrapper script and xset
* Indicate that the --inactivity-timeout option takes an argument
* fix pam_securetty: set PAM_TTY to getenv("DISPLAY")
* Eat XKB_KEY_Delete and XKB_KEY_KP_Delete
* Show unlock indicator if password was entered during PAM verification
* Allow CTRL+J as enter and CTRL+H as backspace
* Flush xcb connection after opening fullscreen window
* Add support for `xss-lock --transfer-sleep-lock'
-------------------------------------------------------------------
Tue Apr 26 12:25:06 UTC 2016 - mimi.vx@gmail.com

View File

@ -21,7 +21,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: i3lock
Version: 2.7
Version: 2.8
Release: 0
Summary: Screen Locker for the i3 Window Manager
License: BSD-3-Clause