summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-11-01 20:18:23 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-11-02 00:02:44 +0100
commita97f6203967b801d666ac686cdb7c76a7dfe55a9 (patch)
treed0e24cc267548c1179d9b14d785cd4a52739c1b3 /src/responder
parent31d97bce8f113276bf73c7d4349f720cd5edbcb8 (diff)
downloadsssd-a97f6203967b801d666ac686cdb7c76a7dfe55a9.tar.gz
sssd-a97f6203967b801d666ac686cdb7c76a7dfe55a9.tar.xz
sssd-a97f6203967b801d666ac686cdb7c76a7dfe55a9.zip
PAM: Do not leak fd after SELinux context file is written
https://fedorahosted.org/sssd/ticket/1619 We don't close the fd when we write the selinux login file in the pam responder. This results in a fd leak.
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/pam/pamsrv_cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 2b20544d1..bb0d8db38 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -443,6 +443,7 @@ static errno_t write_selinux_login_file(const char *username, char *string)
} else {
ret = EOK;
}
+ close(fd);
fd = -1;
done: