Research
Skip Research Menus
Research MenuSecurity Enhanced Linux What's New Frequently Asked Questions Background Documents License Download Participating Mail List Archives Remaining Work Contributors Related Work Press Releases Information Assurance Research NIARL In-house Research Areas Mathematical Sciences Program Sabbaticals Computer & Information Sciences Research Technology Transfer Advanced Computing Advanced Mathematics Communications & Networking Information Processing Microelectronics Other Technologies Technology Fact Sheets Publications Related Links |
SELinux Mailing ListRe: Fix file descriptor leak
From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Thu, 30 Mar 2006 14:50:53 -0500
Ok, merged the following internally. Waiting for sourceforge to come back. Index: libsemanage/src/semanage_store.c RCS file: /nfshome/pal/CVS/selinux-usr/libsemanage/src/semanage_store.c,v retrieving revision 1.44 diff -u -p -r1.44 semanage_store.c --- libsemanage/src/semanage_store.c 8 Mar 2006 16:42:21 -0000 1.44 +++ libsemanage/src/semanage_store.c 30 Mar 2006 19:26:50 -0000 @@ -1159,6 +1159,12 @@ static int semanage_get_lock(semanage_ha ERR(sh, "Could not open direct %s at %s.", lock_name, lock_file); return -1; } + if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { + ERR(sh, "Could not set close-on-exec for %s at %s.", lock_name, lock_file); + close(fd); + return -1; + } + if (sh->timeout == 0) { /* return immediately */ origtime.tv_sec = 0; -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.Received on Thu 30 Mar 2006 - 14:46:15 EST |
|
Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009 |