blob: 1dc491d556f9418390d56f79f161cfca88a9537c (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Configure checks for chown; add missing shields in code.
Upstream status: not yet presented upstream.
--- readline-7.0/histfile.c.orig 2016-12-06 20:04:10.058901731 +0100
+++ readline-7.0/histfile.c 2016-12-06 20:05:09.220083801 +0100
@@ -610,8 +610,10 @@
user is running this, it's a no-op. If the shell is running after sudo
with a shared history file, we don't want to leave the history file
owned by root. */
+#if HAVE_CHOWN
if (rv == 0 && exists)
r = chown (filename, finfo.st_uid, finfo.st_gid);
+#endif
xfree (filename);
FREE (tempname);
@@ -757,8 +759,10 @@
user is running this, it's a no-op. If the shell is running after sudo
with a shared history file, we don't want to leave the history file
owned by root. */
+#if HAVE_CHOWN
if (rv == 0 && exists)
mode = chown (histname, finfo.st_uid, finfo.st_gid);
+#endif
FREE (histname);
FREE (tempname);
|