ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Alexey V. Vissarionov" <gremlin@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] UID_MIN/GID_MIN 500 -> 1000
Date: Fri, 21 Apr 2023 15:59:46 +0300
Message-ID: <20230421125946.GC3677@altlinux.org> (raw)
In-Reply-To: <ZEJ83xr1YmZiV3r7@example.org>

Good ${greeting_time}!

On 2023-04-21 14:09:03 +0200, Alexey Gladkov wrote:

 >>> Это показывает что код кривой и эти значения надо читать
 >>> из 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 не достаточно.
 > Как правильно в скриптах получать эти значения ?

% printf '%u\n' 12345
12345
% printf '%u\n' 012345
5349
% printf '%u\n' 0x12345
74565

Но если задача состоит в проверке пользователя на системность,
лучше смотреть, есть ли его шелл в /etc/shells, и является ли
он владельцем своего ${HOME}.


-- 
Alexey V. Vissarionov
gremlin ПРИ altlinux ТЧК org; +vii-cmiii-ccxxix-lxxix-xlii
GPG: 0D92F19E1C0DC36E27F61A29CD17E2B43D879005 @ hkp://keys.gnupg.net


  parent reply	other threads:[~2023-04-21 12:59 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
2023-04-21 12:36         ` Vladislav Zavjalov
2023-04-21 12:59         ` Alexey V. Vissarionov [this message]
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=20230421125946.GC3677@altlinux.org \
    --to=gremlin@altlinux.org \
    --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