[SSSD] [PATCH] mmap: Get errno when unlink fails
Lukas Slebodnik
lslebodn at redhat.com
Thu Apr 24 07:03:21 UTC 2014
On (23/04/14 20:52), Michal Židek wrote:
>Hi,
>
>I found this small bug while working on different patch.
>
>Patch is attached.
>
>Thanks,
>Michal
>From 28458f28831b76a6fef6d9a8177724e00371c567 Mon Sep 17 00:00:00 2001
>From: Michal Zidek <mzidek at redhat.com>
>Date: Wed, 23 Apr 2014 20:45:07 +0200
>Subject: [PATCH] mmap: Get errno when unlink fails
>
>---
> src/responder/nss/nsssrv_mmap_cache.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/src/responder/nss/nsssrv_mmap_cache.c b/src/responder/nss/nsssrv_mmap_cache.c
>index 3431a40..0544f63 100644
>--- a/src/responder/nss/nsssrv_mmap_cache.c
>+++ b/src/responder/nss/nsssrv_mmap_cache.c
>@@ -1241,6 +1241,7 @@ done:
> if (mc_ctx && mc_ctx->file && mc_ctx->fd != -1) {
> dret = unlink(mc_ctx->file);
> if (dret == -1) {
>+ dret = errno;
> DEBUG(SSSDBG_CRIT_FAILURE,
> "Failed to rm mmap file %s: %d(%s)\n", mc_ctx->file,
> dret, strerror(dret));
>--
>1.7.11.2
>
ACK
LS
More information about the sssd-devel
mailing list