Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] fix mis-recognization of system users with git-shell as normal user
@ 2023-07-28  2:07 sgn
  2023-07-28 15:48 ` [PR PATCH] [Merged]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: sgn @ 2023-07-28  2:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages lightdm-minimum-uid-1000
https://github.com/void-linux/void-packages/pull/45290

fix mis-recognization of system users with git-shell as normal user
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/45290.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lightdm-minimum-uid-1000-45290.patch --]
[-- Type: text/x-diff, Size: 4474 bytes --]

From 44975b4ada872ad2c1795389e9ebc1a7d0ef42bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 28 Jul 2023 08:59:08 +0700
Subject: [PATCH 1/3] accountsservice: disable user-heuristics

The user heuristics was invented specifically for Fedora,
to catch its one off migration.

In Void Linux, user uid is always 1000+, with this heuristics on,
AccountsService may incorrectly guess some system users as normal user,
thus show in login screen.
---
 srcpkgs/accountsservice/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/accountsservice/template b/srcpkgs/accountsservice/template
index 804d57e9e4217..f298248158312 100644
--- a/srcpkgs/accountsservice/template
+++ b/srcpkgs/accountsservice/template
@@ -1,10 +1,10 @@
 # Template file for 'accountsservice'
 pkgname=accountsservice
 version=0.6.55
-revision=1
+revision=2
 build_style=meson
 build_helper="gir"
-configure_args="-Dsystemdsystemunitdir=no
+configure_args="-Dsystemdsystemunitdir=no -Duser_heuristics=false
  $(vopt_bool gir introspection) $(vopt_bool elogind elogind)"
 hostmakedepends="glib-devel pkg-config polkit gettext"
 makedepends="polkit-devel $(vopt_if elogind elogind-devel)"

From 2a74dae077f1879aafe8e2225fdad0a077dba07e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 28 Jul 2023 09:00:43 +0700
Subject: [PATCH 2/3] git: no longer register git-shell as user's shell

It was never intended to be used as a shell for normal users
---
 srcpkgs/git/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/git/template b/srcpkgs/git/template
index 65b72ea703e13..56803028aabb0 100644
--- a/srcpkgs/git/template
+++ b/srcpkgs/git/template
@@ -1,7 +1,7 @@
 # Template file for 'git'
 pkgname=git
 version=2.41.0
-revision=1
+revision=2
 hostmakedepends="asciidoc gettext perl pkg-config tk xmlto"
 makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
 # Required by https://
@@ -16,7 +16,6 @@ changelog="https://raw.githubusercontent.com/git/git/master/Documentation/RelNot
 distfiles="https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"
 checksum=e748bafd424cfe80b212cbc6f1bbccc3a47d4862fb1eb7988877750478568040
 replaces="git-perl>=0"
-register_shell=/usr/bin/git-shell
 python_version=3
 
 subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret git-netrc

From ac4750df3bcf97dabdc578d55e9c7c2847f100fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 28 Jul 2023 09:04:30 +0700
Subject: [PATCH 3/3] lightdm: increase minimum uid to 1000

---
 .../lightdm/patches/minimum-uid-is-1000.patch | 21 +++++++++++++++++++
 srcpkgs/lightdm/template                      |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/lightdm/patches/minimum-uid-is-1000.patch

diff --git a/srcpkgs/lightdm/patches/minimum-uid-is-1000.patch b/srcpkgs/lightdm/patches/minimum-uid-is-1000.patch
new file mode 100644
index 0000000000000..027fecbcd6e7d
--- /dev/null
+++ b/srcpkgs/lightdm/patches/minimum-uid-is-1000.patch
@@ -0,0 +1,21 @@
+--- a/common/user-list.c
++++ b/common/user-list.c
+@@ -331,7 +331,7 @@ load_passwd_file (CommonUserList *user_l
+     if (error && !g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+         g_warning ("Failed to load configuration from %s: %s", USER_CONFIG_FILE, error->message);
+ 
+-    gint minimum_uid = 500;
++    gint minimum_uid = 1000;
+     if (g_key_file_has_key (config, "UserList", "minimum-uid", NULL))
+         minimum_uid = g_key_file_get_integer (config, "UserList", "minimum-uid", NULL);
+ 
+--- a/data/users.conf
++++ b/data/users.conf
+@@ -9,6 +9,6 @@
+ # hidden-shells = Shells that indicate a user cannot login
+ #
+ [UserList]
+-minimum-uid=500
++minimum-uid=1000
+ hidden-users=nobody nobody4 noaccess
+ hidden-shells=/bin/false /usr/sbin/nologin /sbin/nologin
diff --git a/srcpkgs/lightdm/template b/srcpkgs/lightdm/template
index 5a0db355bf73e..d1129af789c82 100644
--- a/srcpkgs/lightdm/template
+++ b/srcpkgs/lightdm/template
@@ -1,7 +1,7 @@
 # Template file for 'lightdm'
 pkgname=lightdm
 version=1.32.0
-revision=3
+revision=4
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--sbindir=/usr/bin --with-greeter-session=lightdm-gtk-greeter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: fix mis-recognization of system users with git-shell as normal user
  2023-07-28  2:07 [PR PATCH] fix mis-recognization of system users with git-shell as normal user sgn
@ 2023-07-28 15:48 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2023-07-28 15:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

There's a merged pull request on the void-packages repository

fix mis-recognization of system users with git-shell as normal user
https://github.com/void-linux/void-packages/pull/45290

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-28 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28  2:07 [PR PATCH] fix mis-recognization of system users with git-shell as normal user sgn
2023-07-28 15:48 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).