[PATCH xserver 1/2] meson: Enable SUN-DES-1 auth code

Jon Turney jon.turney at dronecode.org.uk
Mon Jan 22 15:27:27 UTC 2018


On 19/01/2018 11:37, Jon Turney wrote:
> On 18/01/2018 21:27, Adam Jackson wrote:
>> On Wed, 2018-01-17 at 19:02 +0000, Jon Turney wrote:
>>> On 08/01/2018 20:50, Adam Jackson wrote:
>>>> ---
>>>>    include/meson.build | 1 +
>>>>    meson_options.txt   | 1 +
>>>>    os/meson.build      | 4 ++++
>>>>    3 files changed, 6 insertions(+)
>>>
>>> After this, I needed something like the attached.
>>
>> Eep, indeed you would. But I think we should actually prefer tirpc if
>> it's available, glibc's rpc code has been deprecated for years and I
>> believe the next Fedora release is going to try removing the headers
>> for it again.
> 
> I guess XTRANS_SECURE_RPC_FLAGS will also need adjusting to express that 
> preference

I took a brief look at this: as far as I can tell, the only users of 
XTRANS_SECURE_RPC_FLAGS are xserver, xhost and xdm.

Of these, the only problem seems to be xdm, which uses getsecretkey(), 
which doesn't seem to be currently provided by libtirpc.

This is not something I can easily test, so I think I'll leave it alone :)

> I'll see if I can revise this patch to prefer tirpc.

Revised patch attached.
-------------- next part --------------
From c4ac359e152eb8ea13f1c6d5894950563ab60b6b Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney at dronecode.org.uk>
Date: Wed, 17 Jan 2018 13:43:47 +0000
Subject: [PATCH xserver] meson: Use and prefer tirpc for Secure RPC
 authentication

---
 os/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/os/meson.build b/os/meson.build
index 54124d32a..ff3a4615b 100644
--- a/os/meson.build
+++ b/os/meson.build
@@ -54,7 +54,11 @@ if get_option('xdmcp')
     srcs_os += 'xdmcp.c'
 endif
 
+rpc_dep = []
 if get_option('secure-rpc')
+    # prefer libtirpc (if available), otherwise assume RPC functions are
+    # provided by libc.
+    rpc_dep = dependency('libtirpc', required: false)
     srcs_os += 'rpcauth.c'
 endif
 
@@ -73,6 +77,7 @@ libxserver_os = static_library('libxserver_os',
         common_dep,
         dl_dep,
         sha1_dep,
+        rpc_dep,
         dependency('xau')
     ],
     link_with: libxlibc,
-- 
2.15.1



More information about the xorg-devel mailing list