xorg-xauth: don't use link(2)
Fixes this (in kernel log): <36>[11541.952845] type=1400 audit(1538521396.943:198): avc: denied { link } for pid=11593 comm="xauth" name=".Xauthority-n" dev="dm-0" ino=123147 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=0
This commit is contained in:
parent
4c826b8f9f
commit
5ec27d5cdc
@ -3,7 +3,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
||||
TERMUX_PKG_HOMEPAGE=https://xorg.freedesktop.org/
|
||||
TERMUX_PKG_DESCRIPTION="X.Org authorization settings program"
|
||||
TERMUX_PKG_VERSION=1.0.10
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_REVISION=6
|
||||
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/app/xauth-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=5afe42ce3cdf4f60520d1658d2b17face45c74050f39af45dccdc95e73fafc4d
|
||||
TERMUX_PKG_DEPENDS="libxmu"
|
||||
|
20
x11-packages/xorg-xauth/xauth-1.0.10_process.c.patch
Normal file
20
x11-packages/xorg-xauth/xauth-1.0.10_process.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -uNr xauth-1.0.10/process.c xauth-1.0.10.mod/process.c
|
||||
--- xauth-1.0.10/process.c 2017-01-29 23:00:12.000000000 +0200
|
||||
+++ xauth-1.0.10.mod/process.c 2018-10-03 02:07:13.062110327 +0300
|
||||
@@ -891,15 +891,10 @@
|
||||
ProgramName, temp_name);
|
||||
} else {
|
||||
(void) unlink (xauth_filename);
|
||||
-#if defined(WIN32) || defined(__UNIXOS2__)
|
||||
if (rename(temp_name, xauth_filename) == -1)
|
||||
-#else
|
||||
- /* Attempt to rename() if link() fails, since this may be on a FS that does not support hard links */
|
||||
- if (link (temp_name, xauth_filename) == -1 && rename(temp_name, xauth_filename) == -1)
|
||||
-#endif
|
||||
{
|
||||
fprintf (stderr,
|
||||
- "%s: unable to link authority file %s, use %s\n",
|
||||
+ "%s: unable to link/rename authority file %s, use %s\n",
|
||||
ProgramName, xauth_filename, temp_name);
|
||||
} else {
|
||||
(void) unlink (temp_name);
|
Loading…
x
Reference in New Issue
Block a user