forked from pool/nfs-utils
patches from git. This adds a new binary nfsidmap, with man page. Also: build with libmount enabled to correctly handle /etc/mtab being linked to /proc/self/mounts. (bnc#681106) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=54
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From c4c6126f05713afe46c0e99647d7a07dd1fc2ebb Mon Sep 17 00:00:00 2001
|
|
From: Masatake YAMATO <yamato@redhat.com>
|
|
Date: Tue, 12 Jul 2011 10:00:01 -0400
|
|
Subject: [PATCH] exportfs: closing fd associated with /proc/fs/nfsd/export_features
|
|
|
|
The fd associated with /proc/fs/nfsd/export_features opened in
|
|
get_export_features is not closed.
|
|
|
|
Acked-by: J. Bruce Fields <bfields@redhat.com>
|
|
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
|
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
---
|
|
support/nfs/exports.c | 5 +++--
|
|
1 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
|
|
index c250383..c96500f 100644
|
|
--- a/support/nfs/exports.c
|
|
+++ b/support/nfs/exports.c
|
|
@@ -784,8 +784,9 @@ struct export_features *get_export_features(void)
|
|
fd = open(path, O_RDONLY);
|
|
if (fd == -1)
|
|
goto good;
|
|
- fd = read(fd, buf, 50);
|
|
- if (fd == -1)
|
|
+ c = read(fd, buf, 50);
|
|
+ close(fd);
|
|
+ if (c == -1)
|
|
goto err;
|
|
c = sscanf(buf, "%x %x", &ef.flags, &ef.secinfo_flags);
|
|
if (c != 2)
|
|
--
|
|
1.7.3.4
|
|
|