ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Gladkov <legion@altlinux.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] UID_MIN/GID_MIN 500 -> 1000
Date: Fri, 21 Apr 2023 14:09:03 +0200
Message-ID: <ZEJ83xr1YmZiV3r7@example.org> (raw)
In-Reply-To: <20230421113851.24ecadd9@sem-nb2>

On Fri, Apr 21, 2023 at 11:38:51AM +0300, Mikhail Efremov wrote:
> On Fri, 21 Apr 2023 00:26:11 +0300 Alexey Shabalin wrote:
> > чт, 20 апр. 2023 г., 21:51 Vladimir D. Seleznev <vseleznv@altlinux.org>:
> > 
> > > On Thu, Apr 20, 2023 at 02:15:19PM +0300, Mikhail Efremov wrote:  
> > > > Hello!
> > > >
> > > > Есть мысль увеличить UID_MIN/GID_MIN по умолчанию до 1000, в апстриме и
> > > > во всех других дистрибутивах это давно уже сделано. Системных
> > > > пользователей все больше и лучше иметь для них пространство UID с
> > > > запасом.
> > > > Единственной проблемой мне видится то, что нужно сохранить текущие
> > > > значения в /etc/login.defs при обновлении, переход пользователей
> > > > в системные может привести к неизвестным побочным эффектам. Если
> > > > login.defs редактировался, то проблемы нет, он noreplace и будет создан
> > > > login.defs.rpmnew. А вот если не редактировался, то значения
> > > > UID_MIN/GID_MIN все равно надо бы сохранить старые. Мне в голову
> > > > приходит только сохранять в файл в /tmp при обновлении (в %pre) и
> > > > восстанавливать в %post. Если у кого есть идеи как это сделать
> > > > лучше/проще, то с удовольствием выслушаю.  
> > >
> > > Are you sure you can find all the hardcoded stuff?
> > >
> > >
> > > https://git.altlinux.org/gears/m/make-initrd.git?p=make-initrd.git;a=blob;f=make-initrd/features/system-glibc/bin/system-glibc-pwgr#l14
> > >
> > > https://git.altlinux.org/gears/m/make-initrd.git?p=make-initrd.git;a=blob;f=make-initrd/external/busybox/upstream/libbb/getopt32.c#l90  
> > 
> > 
> > Это показывает что код кривой и эти значения надо читать из login.def
> 
> Да, это значение и сейчас можно легко поменять в конфиге, не надо его
> хардкодить.

Это делается, потому что на самом деле это не так просто как кажется.

Numbers (both regular and long) may be either decimal values, octal values
(precede the value with 0) or hexadecimal values (precede the value with
0x). The maximum value of the regular and long numeric parameters is
machine-dependent.

Очевидно grep не достаточно.

Как правильно в скриптах получать эти значения ?

-- 
Rgrds, legion



  reply	other threads:[~2023-04-21 12:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 11:15 Mikhail Efremov
2023-04-20 13:30 ` Alexey Shabalin
2023-04-21 12:54   ` Alexey V. Vissarionov
2023-04-26 10:29     ` Dmitry V. Levin
2023-04-26 12:09       ` Alexey Shabalin
2023-04-28  5:24       ` Alexey V. Vissarionov
2023-04-20 16:23 ` Leonid Krivoshein
2023-04-20 16:30   ` Ivan A. Melnikov
2023-04-20 16:39     ` Mikhail Efremov
2023-04-20 16:47     ` Ruslandh
2023-04-21  8:41       ` Mikhail Efremov
2023-04-20 18:51 ` Vladimir D. Seleznev
2023-04-21  8:38     ` Mikhail Efremov
2023-04-21 12:09       ` Alexey Gladkov [this message]
2023-04-21 12:36         ` Vladislav Zavjalov
2023-04-21 12:59         ` Alexey V. Vissarionov
2023-04-20 21:43 ` Dmitry V. Levin
2023-04-21  8:37   ` Mikhail Efremov
2023-04-21  9:17     ` Sergey V Turchin
2023-04-21 12:50 ` Alexey V. Vissarionov
2023-04-25 16:43   ` Mikhail Efremov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEJ83xr1YmZiV3r7@example.org \
    --to=legion@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git