diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2018-08-15 18:33:34 +0300 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2018-08-15 18:34:42 +0300 |
commit | e9f8f67257b2e4bce52ecd5c9ff8abebfa48c1b1 (patch) | |
tree | 06c886988976ab44086861fdbf25080a58a7110c /sys-auth/pam_p11 | |
parent | sys-fs/mdadm: Bump to version 4.1_rc2. Removed old. (diff) | |
download | gentoo-e9f8f67257b2e4bce52ecd5c9ff8abebfa48c1b1.tar.gz gentoo-e9f8f67257b2e4bce52ecd5c9ff8abebfa48c1b1.tar.bz2 gentoo-e9f8f67257b2e4bce52ecd5c9ff8abebfa48c1b1.zip |
sys-auth/pam_p11: fix unsigned comparison
Closes: https://bugs.gentoo.org/show_bug.cgi?id=663678
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'sys-auth/pam_p11')
-rw-r--r-- | sys-auth/pam_p11/files/pam_p11-0.2.0-build.patch | 26 | ||||
-rw-r--r-- | sys-auth/pam_p11/pam_p11-0.2.0.ebuild | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sys-auth/pam_p11/files/pam_p11-0.2.0-build.patch b/sys-auth/pam_p11/files/pam_p11-0.2.0-build.patch new file mode 100644 index 000000000000..813499acd3a7 --- /dev/null +++ b/sys-auth/pam_p11/files/pam_p11-0.2.0-build.patch @@ -0,0 +1,26 @@ +From 659a6eb5434039c27b41a9d06edc64923e5042b9 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Wed, 15 Aug 2018 18:30:51 +0300 +Subject: [PATCH] build: pam_p11: unsigned comparison + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + src/pam_p11.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pam_p11.c b/src/pam_p11.c +index 960c164..1cf6cb2 100644 +--- a/src/pam_p11.c ++++ b/src/pam_p11.c +@@ -553,7 +553,7 @@ static int randomize(pam_handle_t *pamh, unsigned char *r, unsigned int r_len) + { + int ok = 0; + int fd = open("/dev/urandom", O_RDONLY); +- if (0 <= fd && read(fd, r, r_len) == r_len) { ++ if (0 <= fd && read(fd, r, r_len) == (ssize_t)r_len) { + ok = 1; + } else { + pam_syslog(pamh, LOG_CRIT, "Error reading from /dev/urandom: %s", +-- +2.16.4 + diff --git a/sys-auth/pam_p11/pam_p11-0.2.0.ebuild b/sys-auth/pam_p11/pam_p11-0.2.0.ebuild index 5719fc04d4c4..d409179e1396 100644 --- a/sys-auth/pam_p11/pam_p11-0.2.0.ebuild +++ b/sys-auth/pam_p11/pam_p11-0.2.0.ebuild @@ -20,6 +20,10 @@ RDEPEND="virtual/pam DEPEND="${RDEPEND} virtual/pkgconfig" +PATCHES=( + "${FILESDIR}/${P}-build.patch" +) + src_configure() { econf --with-pamdir="$(getpam_mod_dir)" } |