Remove old patches

epel8
Daniel Vrátil 9 years ago
parent ecd504ef84
commit b15aa27df8

@ -1,87 +0,0 @@
From cc161d7a748ec23c621a6cef6f99dcbc88049fc5 Mon Sep 17 00:00:00 2001
From: Martin Klapetek <mklapetek@kde.org>
Date: Fri, 16 Oct 2015 12:42:52 -0400
Subject: [PATCH 3/4] Prefix the kwallet-pam output properly
KWallet4 uses the same prefix, so this makes it "kwalletd5" so it's
clear in the debug output if it comes from KWallet 4 or 5
---
src/runtime/kwalletd/main.cpp | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/runtime/kwalletd/main.cpp b/src/runtime/kwalletd/main.cpp
index fbab58d..39b5ae9 100644
--- a/src/runtime/kwalletd/main.cpp
+++ b/src/runtime/kwalletd/main.cpp
@@ -56,7 +56,7 @@ static bool isWalletEnabled()
//Waits until the PAM_MODULE sends the hash
static char *waitForHash()
{
- printf("kwalletd: Waiting for hash on %d-\n", pipefd);
+ printf("kwalletd5: Waiting for hash on %d-\n", pipefd);
int totalRead = 0;
int readBytes = 0;
int attempts = 0;
@@ -79,16 +79,16 @@ static char *waitForHash()
//Waits until startkde sends the environment variables
static int waitForEnvironment()
{
- printf("kwalletd: waitingForEnvironment on: %d\n", socketfd);
+ printf("kwalletd5: waitingForEnvironment on: %d\n", socketfd);
int s2;
socklen_t t;
struct sockaddr_un remote;
if ((s2 = accept(socketfd, (struct sockaddr *)&remote, &t)) == -1) {
- fprintf(stdout, "kwalletd: Couldn't accept incoming connection\n");
+ fprintf(stdout, "kwalletd5: Couldn't accept incoming connection\n");
return -1;
}
- printf("kwalletd: client connected\n");
+ printf("kwalletd5: client connected\n");
char str[BSIZE];
memset(str, '\0', sizeof(char) * BSIZE);
@@ -102,26 +102,26 @@ static int waitForEnvironment()
putenv(strdup(str));
}
}
- printf("kwalletd: client disconnected\n");
+ printf("kwalletd5: client disconnected\n");
close(socketfd);
return 1;
}
char* checkPamModule(int argc, char **argv)
{
- printf("Checking for pam module\n");
+ printf("kwalletd5: Checking for pam module\n");
char *hash = NULL;
int x = 1;
for (; x < argc; ++x) {
if (strcmp(argv[x], "--pam-login") != 0) {
continue;
}
- printf("Got pam-login\n");
+ printf("kwalletd5: Got pam-login param\n");
argv[x] = NULL;
x++;
//We need at least 2 extra arguments after --pam-login
if (x + 1 > argc) {
- printf("Invalid arguments (less than needed)\n");
+ printf("kwalletd5: Invalid arguments (less than needed)\n");
return NULL;
}
@@ -143,7 +143,7 @@ char* checkPamModule(int argc, char **argv)
hash = waitForHash();
if (hash == NULL || waitForEnvironment() == -1) {
- printf("Hash or environment not received\n");
+ printf("kwalletd5: Hash or environment not received\n");
free(hash);
return NULL;
}
--
2.5.0

@ -1,47 +0,0 @@
From f1e6b9d168281196010c44af2eae4587c1d2d088 Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter@kde.org>
Date: Wed, 21 Oct 2015 07:38:48 +0200
Subject: [PATCH 4/4] initialize socket size with correct value
to quote man 2 accept:
> The addrlen argument is a value-result argument: the caller must
> initialize it to contain the size (in bytes) of the structure pointed
> to by addr; on return it will contain the actual size of the peer
> address.
If addrlen is not correct we may get EINVAL on trying to connect to the
environment socket which in turn results in a broken environment of the
daemon when started through pam as it will inherit the DM environment.
This doesn't have to happen, it does however reproducibly with nvidia-352
on Kubuntu 15.10. Why or how nvidia plays into this is not entirely clear,
best bet is that it simply is a coincidence where nvidia would have
something allocated in the memory beforehand and since the addrlen
stack variable was not explicitly initialized to anything it would could
potentially be negative (EINVAL condition) or wrong such that it meets
an internal error check within accept().
CHANGELOG: Fixed KWallet configuration file warnings on login
FIXED-IN: 5.16
BUG: 351805
REVIEW: 125717
---
src/runtime/kwalletd/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/runtime/kwalletd/main.cpp b/src/runtime/kwalletd/main.cpp
index 39b5ae9..e790afe 100644
--- a/src/runtime/kwalletd/main.cpp
+++ b/src/runtime/kwalletd/main.cpp
@@ -82,8 +82,8 @@ static int waitForEnvironment()
printf("kwalletd5: waitingForEnvironment on: %d\n", socketfd);
int s2;
- socklen_t t;
struct sockaddr_un remote;
+ socklen_t t = sizeof(remote);
if ((s2 = accept(socketfd, (struct sockaddr *)&remote, &t)) == -1) {
fprintf(stdout, "kwalletd5: Couldn't accept incoming connection\n");
return -1;
--
2.5.0
Loading…
Cancel
Save