Commit bf9cc887 authored by Jaromil's avatar Jaromil

Import from Debian jessie/main package util-linux-2.25.2


Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
See version control history.;a=log;h=2.25.2
What is here
The util-linux contains supplementary textual material, such as
readme files, release notes, licenses and so on. Common to these
files is that they contain information for contributors but
should not end up to end user installation.
PAM configuration is very distribution specific. This is reason why upstream
util-linux package does not install any PAM config files.
Expected PAM config files:
/etc/pam.d/remote - for -h command line option
/etc/pam.d/login - regular login
/etc/pam.d/su-l - for --login command line option
/etc/pam.d/su - regular su
/etc/pam.d/runuser-l - for --login command line option
/etc/pam.d/runuser - regular su
Note that runuser requires only "session" setting (and for example
"auth sufficient" dummy line).
Note that items with (!) have high priority.
- use /var/lib/hwclock/drift to store hw-clock drift numbers.
- use /etc/adjtime as read-only for UTC/LOCAL information only
- the /var/lib/hwclock/drift should be implemented backwardly compatible,
it means use the file only if exists, otherwise follow /etc/adjtime
bash completion
- Optional argument handling requires user to press backspace to get
argument completion.
- Comma separated value, e.g., --output 'value1,value2', are not
completed for users.
libmount (mount/umount)
- add options to control fstab/mtab mount options usage, something like:
--options-mode={ignore,append,prepend,replace} MNT_OMODE_{IGNORE, ...}
--options-source={fstab,mtab,disable} MNT_OMODE_{FSTAB,MTAB,NOTAB}
--options-source-force MNT_OMODE_FORCE
(all this already supported by libmount)
- (!) add SCOLS_FL_HIDDEN flag to make it possible to hide a column. Then we
can use such column in lsblk(8) to only sort lines, but do not print the column.
lsblk -o NAME --sort SIZE
- support mapping by device-mapper if argv[0] is "kpartx" or --dm option is used.
- (!) use something better than gtk-doc for libmount and libblkid (doxyden?)
- (!) add API documentation to libuuid
- consolidate newgrp(1)
* we have "su --group/--supp-group" to switch between groups, newgrp(1) in
util-linux and shadow-utils (and sg(1) alias in shadow-utils)
* the unique functionality provided by newgpr(1) is support for group
passwords [/etc/gshadow] -- do we really need this functionality?
* maybe we can mark group-passwords as deprecated, and replace sg(1) and
newgpr(1) with su(1) code. The another way is to ask fro group password in
su --group too.
* note that shadow-utils newgpr(1) provides support for syslog and audit log.
- (!) don't use internally blkid_loff_t, rather use off_t, size_t, ssize_t,
stdint.h types and so on...
- add FSSIZE value -- filesystem size (klibc requirement)
- (!) add support for dasd PT (used for example on s390)
[always check libfdisk branch at github!]
- (!) add 'I'nfo fommand to print all details about specified partition
(like offset, size, name, uuid, type, C/H/S, fstype)
- (!) add to "First sector" dialog a line with information about available
gaps (free areas) to make it more user friendly if you want to skip
any useless (small) areas between existing partitions.
(Note that libfdisk already supports freespace lists.)
- (!) add to fdisk "free space" command to print all available gaps
- add support for Apple Partition Map (see libblkid/src/partitions/mac.c)
- add "move end" command to move end of the last primary/extended partition.
This feature seems very attractive to users who resizing their disks
(for example in virtual machines).
- sfdisk rounds to cylinders is -uM (megabyte units) is specified, this is
pretty stupid feature. It has to round to sectors if -uS or -uM is specified.
- use off_t instead "long long"
- catch SIGINT (Ctrl-C) and return to main menu.
From Red Hat bugzilla #545488:
While using fdisk normally, if you accidentally pressed the wrong button (to
start a sequence of questions for some operation, e.g. 'c' to create
partition). The tool tries too hard to keep asking you for valid input. You
can't provide a blank or invalid input to get it to break out of the current
dialog sequence and get back to the main menu.
- add mllockall() and SCHED_FIFO to hwclock,
exotic requests
- add SELinux security contexts support to the 'ipcs' utility
Would be great to list the current system IPC Objects with their respective
security labels (where allowed) with something like 'ipcs -Z' - following the
way other tools reports those.
libblkid - a library to handle device identification and token extraction
Basic usage is as follows - there are two normal usage patterns:
For cases where a program wants information about multiple devices, or
expects to be doing multiple token searches, the program should
directly initialize cache file via (second parameter is cache
filename, NULL = default):
blkid_cache cache = NULL;
if (blkid_get_cache(&cache, NULL) < 0)
/* error reading the cache file, not really fatal */
Note that if no cache file exists, an empty cache struct is still
allocated. Usage of libblkid functions will use the cache to avoid
needless device scans.
The model of the blkid cache is that each device has a number of
attributes that can be associated with it. Currently the attributes
which are supported (and set) by blkid are:
TYPE filesystem type
UUID filesystem uuid
LABEL filesystem label
How to use libblkid? Normally, you either want to find a device with
a specific NAME=value token, or you want to output token(s) from a
device. To find a device that matches a following attribute, you
simply call the blkid_get_devname() function:
if ((devname = blkid_get_devname(cache, attribute_name, value))) {
/* do something with devname */
The cache parameter is optional; if it is NULL, then the blkid library
will load the default cache file, and then release the cache
before function call returns. The return value is an allocated string
which holds the resulting device name (if it is found). If the value
is NULL, then attribute_name is parsed as if it were
"<attribute_name>=<value>"; if it cannot be so parsed, then the
original attribute_name is returned in a copied allocated string.
This is a convenience to allow user programs to want to translate user
input, whether it is of the form: "/dev/hda1", "LABEL=root",
"UUID=082D-26E3", and get back a device name that it can use.
Alternatively, of course, the programmer can pass an attribute name of
"LABEL", and value of "root", if that is more convenient.
Another common usage is to retrieve the value of a specific attribute
for a particular device. This can be used to determine the filesystem
type, or label, or uuid for a particular device:
if ((value = blkid_get_tag_value(cache, attribute_name, devname))) {
/* do something with value */
If a program needs to call multiple blkid functions, then passing in a
cache value of NULL is not recommended, since the file
will be repeatedly parsed over and over again, with memory allocated
and deallocated. To initialize the blkid cache, blkid_get_cache()
function is used:
if (blkid_get_cache(&cache, NULL) < 0)
goto errout;
The second parameter of blkid_get_cache (if non-zero) is the alternate filename
of the blkid cache file (see blkid man page for more information about the
default cach file location).
Normally, programs should just pass in NULL.
If you have called blkid_get_cache(), you should call blkid_put_cache()
when you are done using the blkid library functions. This will save the
cache to the file, if you have write access to the file. It
will also free all associated devices and tags:
/* Please use this file as a template when introducing new command to
* util-linux package.
* -- remove above */
* fixme-command-name - purpose of it
* Copyright (c) 20nn Example Commercial, Inc
* Written by Your Name <>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation.
* This program is distributed in the hope that it would be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <getopt.h>
#include <stdio.h>
#include <unistd.h>
#include "c.h"
#include "closestream.h"
#include "nls.h"
static void __attribute__((__noreturn__)) usage(FILE *out)
fputs(USAGE_HEADER, out);