Go to file
Érico Nogueira 0a002b6179 lib/pwdutils: use assert to check correct usage.
Since these functions are only used internally, we can make sure they
are being used correctly, and assert() helps in catching remaining
issues. Usage of each changed function has been reviewed:

For xgetpwnam:

- chsh(1) only calls it if a username has been set
- login(1) only calls it if username has been set and is not empty
- su(1) always initializes new_user to "root"
- unshare(1) calls get_user with optarg, so always set as well

For xgetgrnam:

- unshare(1) calls get_group with optarg

For xgetpwuid:

- chsh(1) passes a stack allocated struct for struct passwd

Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
2021-07-29 09:58:19 -03:00
.github/workflows github: fix asciidoctror dependence 2021-03-29 18:56:12 +02:00
Documentation Merge branch 'next' 2021-06-02 12:33:07 +02:00
bash-completion rename: add --all and --last parameters 2021-07-15 00:15:55 -04:00
config build-sys: gtkdoc-fixxref v1.27 requires module option 2018-02-01 13:23:40 +01:00
disk-utils blockdev: use snprintf() rather than sprintf() 2021-07-27 12:51:43 +02:00
include login: add callback for close_range() 2021-07-15 12:51:39 +02:00
lib lib/pwdutils: use assert to check correct usage. 2021-07-29 09:58:19 -03:00
libblkid libblkid: use snprintf() rather than sprintf() 2021-07-27 13:29:05 +02:00
libfdisk libfdisk: (dos) support partition and MBR overlap 2021-07-27 11:40:32 +02:00
libmount Merge branch 'meson_verity' of https://github.com/bluca/util-linux 2021-07-14 12:19:49 +02:00
libsmartcols libsmartcols: use snprintf() rather than sprintf() 2021-07-27 13:28:52 +02:00
libuuid libuuid: check errno after strto..() 2021-06-21 15:06:40 +02:00
login-utils vipw: use snprintf() rather than sprintf() 2021-07-27 13:30:14 +02:00
m4 build-sys: use $LIBS rather than LDFLAGS 2021-06-18 17:21:13 +02:00
man-common fix whitespace issue in ducumentation 2021-05-10 15:53:50 +02:00
misc-utils logger: use xgetlogin from pwdutils. 2021-07-29 09:58:19 -03:00
po Fix typo 2021-07-22 19:03:54 +03:00
po-man build-sys: fix po-man/ make check 2021-05-13 12:21:56 +02:00
schedutils uclampset: Fix left over optind++ 2021-06-08 15:56:00 +02:00
sys-utils readprofile: use snprintf() rather than sprintf() 2021-07-27 13:31:57 +02:00
term-utils wall: use xgetlogin. 2021-07-29 09:58:19 -03:00
tests Merge branch 'rename-all' of https://github.com/utoddl/util-linux 2021-07-27 14:14:51 +02:00
text-utils more: use snprintf() rather than sprintf() 2021-07-27 13:31:18 +02:00
tools tools/git-version-gen: use NEWS as a fallback 2021-07-14 15:57:00 +02:00
.editorconfig add .editorconfig 2016-01-25 00:12:14 +01:00
.gitignore build-sys: add .stamp to gitignore 2021-04-23 10:39:35 +02:00
.travis-functions.sh travis: cleanup before autogen 2021-04-09 08:02:10 +02:00
.travis.yml travis: remove old ubuntu 2021-01-26 15:25:54 +01:00
AUTHORS docs: add uclampset to AUTHORS file 2021-06-01 10:32:35 +02:00
COPYING docs: corrections to FSF license files, and postal address 2012-02-24 14:13:35 +01:00
ChangeLog docs: Correct ChangeLog URL to history log. 2020-05-11 09:48:43 +02:00
Makefile.am build-sys: make re-use of generated man-pages more robust 2021-06-04 11:46:55 +02:00
NEWS build-sys: release++ (v2.37) 2021-06-01 09:52:10 +02:00
README docs: add hint about make install-strip and link to Documentation/ 2020-10-06 15:35:09 +02:00
README.licensing docs: add GPLv3 text 2019-11-08 11:10:54 +01:00
autogen.sh build-sys: make autogen.sh output more user friendly 2021-06-09 16:09:16 +02:00
configure.ac hardlink: remove pcre2posix.h support 2021-07-14 17:51:07 +02:00
meson.build hardlink: remove pcre2posix.h support 2021-07-14 17:51:07 +02:00
meson_options.txt meson: add irq utils 2021-03-25 12:12:11 +01:00
util-linux.doap docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00

README

				  util-linux

		util-linux is a random collection of Linux utilities

     Note: for the years 2006-2010 this project was named "util-linux-ng".

COMPILE & INSTALL:

      See Documentation/howto-compilation.txt.

MAILING LIST:

      E-MAIL:  util-linux@vger.kernel.org
      URL:     http://vger.kernel.org/vger-lists.html#util-linux
      ARCHIVE: https://lore.kernel.org/util-linux/

      The mailing list will reject email messages that contain:
       - more than 100K characters
       - html
       - spam phrases/keywords
      See: http://vger.kernel.org/majordomo-info.html#taboo

IRC CHANNEL:

      #util-linux at freenode.net:

      irc://chat.freenode.net/util-linux

      The IRC channel and Mailing list are for developers and project
      maintainers. For end users it is recommended to utilize the
      distribution's support system.

BUG REPORTING:

      E-MAIL: util-linux@vger.kernel.org
      Web:    https://github.com/karelzak/util-linux/issues

      This project has no resources to provide support for distribution specific
      issues. For end users it is recommended to utilize the distribution's
      support system.

NLS (PO TRANSLATIONS):

      PO files are maintained by:
	  http://translationproject.org/domain/util-linux.html

VERSION SCHEMA:

      Standard releases:
	  <major>.<minor>[.<maint>]
	     major = fatal and deep changes
	     minor = typical release with new features
	     maint = maintenance releases; bug fixes only

      Development releases:
	 <major>.<minor>-rc<N>

SOURCE CODE:

 Download archive:
	  https://www.kernel.org/pub/linux/utils/util-linux/

 See also:
     Documentation/howto-contribute.txt
     Documentation/howto-build-sys.txt
     Documentation/howto-pull-request.txt

 SCM (Source Code Management) Repository:

    Primary repository:
	  git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git

    Backup repository:
	  git clone git://github.com/karelzak/util-linux.git

    Web interfaces:
	  http://git.kernel.org/cgit/utils/util-linux/util-linux.git
	  https://github.com/karelzak/util-linux

      Note: the GitHub repository may contain temporary development branches too.

      The kernel.org repository contains master (current development) and stable/*
      (maintenance) branches only. All master or stable/* changes are always pushed
      to both repositories at the same time.

    Repository Branches: 'git branch -a'
	  master branch
	   - current development
	   - the source for stable releases when deemed ready.
	   - day-to-day status is: 'it works for me'. This means that its
	     normal state is useful but not well tested.
	   - long-term development or invasive changes in active development are
	     forked into separate 'topic' branches from the tip of 'master'.

	  stable/ branches
	   - public releases
	   - branch name: stable/v<major>.<minor>.
	   - created from the 'master' branch after two or more release
	     candidates and the final public release. This means that the stable
	     releases are committed, tagged, and reachable in 'master'.
	   - these branches then become forked development branches. This means
	     that any changes made to them diverge from the 'master' branch.
	   - maintenance releases are part of, and belong to, their respective
	     stable branch. As such, they are tags(<major>.<minor>.<maint>) and
	     not branches of their own. They are not part of, visible in, or
	     have anything to do with the 'master' development branch. In git
	     terminology: maintenance releases are not reachable from 'master'.
	   - when initially cloned (as with the 'git clone' command given above)
	     these branches are created as 'remote tracking branches' and are
	     only visible by using the -a or -r options to 'git branch'. To
	     create a local branch use the desired tag with this command:
	     'git checkout -b v2.29.2 v2.29.2'

    Tags: 'git tag'
	   - a new tag object is created for every release.
	   - tag name: v<version>.
	   - all tags are signed by the maintainer's PGP key.

    Known Bugs:
	- don't use tag v2.13.1 (created and published by mistake),
	  use v2.13.1-REAL instead.

WORKFLOW EXAMPLE:

 1) development (branch: <master>)

 2) master release (tags: v2.29-rc1, v2.29-rc2, v2.29, branch: <master>)

 3) development (work on v2.30, branch: <master>)

 4) fork -- create a new branch <stable/v2.29> based on tag v2.29

     4a) new patches or cherry-pick patches from <master> (branch: <stable/v2.29>)

     4b) stable release (tag: v2.29.1, branch: <stable/v2.29>)

     4c) more patches; another release (tag: v2.29.2, branch: <stable/v2.29>)

 5) master release v2.30 (branch: <master>)
    ...

where 3) and 4) happen simultaneously.