summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Tilmann Bubeck <tilmann@bubecks.de>2014-06-24 00:22:54 +0200
committerDr. Tilmann Bubeck <tilmann@bubecks.de>2014-06-24 00:22:54 +0200
commit047f92a85796fca563d9345d6c4798b64be77cff (patch)
tree2b3a3009075a7b1e4faf66c1a97e694bcdf3c5ad
parent12e63de4e0b3a45fad15863a66723609b068e668 (diff)
downloadxorg-app-xauth-047f92a85796fca563d9345d6c4798b64be77cff.tar.gz
Fix for xauth failing on ENOSPC (= disk full)
If xauth must store its XAUTHORITY file on a file system which is full, it will be unable to write the changes. This condition was not detected and therefore often the whole XAUTHORITY file was cleared. Here is the fix. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=21260 Signed-off-by: Dr. Tilmann Bubeck <tilmann@bubecks.de>
-rw-r--r--process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/process.c b/process.c
index b44858a..5b12c92 100644
--- a/process.c
+++ b/process.c
@@ -844,7 +844,10 @@ write_auth_file(char *tmp_nam)
}
}
- (void) fclose (fp);
+ if (fclose(fp)) {
+ return -1;
+ }
+
return 0;
}