1 Star 0 Fork 9

kylinsecos/lightdm

forked from src-openEuler/lightdm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lightdm-1.25.1-disable_dmrc.patch 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
douyan 提交于 2020-07-09 15:30 . Package init
From 15722c7b2cb41dbe612d6b4c51c3dba11f5fe4c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Thu, 18 Jan 2018 17:40:50 +0100
Subject: [PATCH 1/2] configure: Add option to disable writing dmrc files
---
configure.ac | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/configure.ac b/configure.ac
index 711db441..3a20c84f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,8 +170,18 @@ AC_MSG_CHECKING(whether to build tests)
AC_ARG_ENABLE(tests,
AS_HELP_STRING([--disable-tests], [Disable tests building]),
[], [enable_tests="yes"])
+AC_MSG_RESULT([$enable_tests])
AM_CONDITIONAL(COMPILE_TESTS, test x"$enable_tests" != "xno")
+AC_MSG_CHECKING(whether to enable writing dmrc files)
+AC_ARG_ENABLE(dmrc,
+ AS_HELP_STRING([--disable-dmrc], [Disable writing .dmrc in user home]),
+ [], [enable_dmrc="yes"])
+AC_MSG_RESULT([$enable_dmrc])
+if test x"$enable_dmrc" != "xno"; then
+ AC_DEFINE([WRITE_DMRC], [1], [Enable writing .dmrc in user home])
+fi
+
dnl ###########################################################################
dnl Configurable values
dnl ###########################################################################
@@ -264,4 +274,5 @@ echo "
liblightdm-qt5: $compile_liblightdm_qt5
libaudit support: $use_libaudit
Enable tests: $enable_tests
+ Write .dmrc files: $enable_dmrc
"
From 1072c1b0fe917358c4bdb9ee8bb23fd3c19e349c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Thu, 18 Jan 2018 17:41:30 +0100
Subject: [PATCH 2/2] dmrc: Implement new configuration option
---
common/dmrc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/dmrc.c b/common/dmrc.c
index 9b92a52b..795ec2aa 100644
--- a/common/dmrc.c
+++ b/common/dmrc.c
@@ -13,6 +13,7 @@
#include <string.h>
#include <unistd.h>
+#include "config.h"
#include "dmrc.h"
#include "configuration.h"
#include "privileges.h"
@@ -54,6 +55,7 @@ dmrc_save (GKeyFile *dmrc_file, CommonUser *user)
gsize length;
g_autofree gchar *data = g_key_file_to_data (dmrc_file, &length, NULL);
+#ifdef WRITE_DMRC
/* Update the users .dmrc */
g_autofree gchar *path = g_build_filename (common_user_get_home_directory (user), ".dmrc", NULL);
@@ -65,6 +67,7 @@ dmrc_save (GKeyFile *dmrc_file, CommonUser *user)
g_file_set_contents (path, data, length, NULL);
if (drop_privileges)
privileges_reclaim ();
+#endif
/* Update the .dmrc cache */
g_autofree gchar *cache_dir = config_get_string (config_get_instance (), "LightDM", "cache-directory");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kylinsecos_admin/lightdm.git
git@gitee.com:kylinsecos_admin/lightdm.git
kylinsecos_admin
lightdm
lightdm
master

搜索帮助