| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
.. to override the default /etc/adjtime path.
Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
There are some uname26 binaries flying around. Let's make it available
everywhere.
Internal SUSE references: fate313476, sr226509
CC: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Assumption is there are not many who need this tool. Whom ever they
might be the recommendation is to use the command from old util-linux
release. Second reason to removal is difficulty to test hardware
specific command when none of the active project members does not seem to
have such. Basically the command has reached dead end what comes to
maintainability of it.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
clock_gettime() needs -lrt, so let's keep this stuff
outside libcommon.la
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* systemd (since v209) uses only one library (when compiled
without --enable-compat-libs)
* all systemd build-sys stuff is merged into HAVE_SYSTEMD
(automake) and HAVE_LIBSYSTEMD (C macro) now
* all is controlled by --with-systemd, default is to automatically
check for systemd libs
* no more --enable-socket-activation and --enable-journald
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
This adds a timer and a service for systemd that runs
fstrim -a once a day.
The Persistent=true option used will only work on systemd 212
or newer.
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
| |
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
|
|
|
|
|
|
|
| |
Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined
in some systems's sys/mount.h.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* read /proc/self/mountinfo to get filesystems
* ignore net and pseudo filesystems
* ignore unaccessible filesystems (over mounted by another FS)
* read disk sysfs queue/discard_granularity to detect is discard support
* call FITRIM ioctl
* silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY
(for example vfat) errors
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier uptime determination, which was done with sysinfo(2), had one
second resolution, which made time stamps to be rounded unstable way
depending on when a dmesg command was executed. In practical terms; the
command below was supposed not to differ but it did.
$ diff -q <(dmesg --ctime) <(sleep 0.5 ; dmesg --ctime)
[kzak@redhat.com: - add -lrt to Makemodule.am,
- fallback to sysinfo() based boot time
- use #ifdef]
CC: Kay Sievers <kay@vrfy.org>
References: https://lkml.org/lkml/2013/6/30/37
Buglink: https://github.com/karelzak/util-linux/issues/24
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
[kzak@redhat.com: - cleanup coding style,
- use path_exist()]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The behaviour mimics chroot.
Possibly it would have been nicer to to query the password database in
the new namepace and run the shell of the user there, but it's hard to
do correctly. getpwuid() might need to load nss plugins, and the arch
in the new namespace might be different (in case of NEWNS mounts), or
the hostname might be different, etc. So in general it's not possible
to do it reliably.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new command can set no_new_privs, uid, gid, groups, securebits,
inheritable caps, the cap bounding set, securebits, and selinux and
apparmor labels.
[kerolasa@iki.fi: a lot of small adjustment making the command to be good
fit to util-linux project]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by unshare, nsenter is a simple wrapper around setns that
allows running a new process in the context of an existing process.
Full paths may be specified to the namespace arguments so that
namespace file descriptors may be used wherever they reside in the
filesystem.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
|
|
|
|
|
|
| |
The functionality will be replaced with nsenter from Eric W.
Biederman.
This reverts commit 4bbe8099390d528018890efa914e268de3c4b44b.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to the unshare syscall, there exists the setns syscall, which
allows processes to migrate to the namepsaces of other processes. Add this
functionality into the unshare command, as they operate in a fairly simmilar
fashion.
Note: There was discussion of adding a path based namespace argument to unshare
in the origional discussion thread, but I opted to leave that out as it didn't
seem to fit in nicely with the current argument pattern. I figure we can always
add that in later if we need to
[kzak@redhat.com: - fix optional arguments
- do not call unshare if no flag specified
- use O_CLOEXEC
- codding style cleanup]
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
It is difficult to think think tunelp command being in use a lot.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the limit values are not dynamic. Like in kernel these values
are #defined.
[kzak@redhat.com: - use better names for functions,
- add ipcutils.{c,h}
- read also shmmax from /proc]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blkdiscard is used to discard device sectors. This is useful for
solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
fstrim this command is used directly on the block device.
blkkdiscard uses BLKDISCARD ioctl or BLKSECDISCARD ioctl for the secure
discard.
All data in the discarded region on the device will be lost!
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
|
|
|
|
|
|
|
| |
This was only attempt as alternative implementation, unfortunately
pushed publicly... sorry.
This reverts commit c84ed54cefdcaa07f3d1f40a65434c9d4277da08.
|
|
|
|
|
|
|
|
|
|
|
| |
Add to fstrim(8) code to support new discard BLKDISCARD and
BLKSECDISCARD ioctls for block devices. The new command is only
symlink to fstrim(8) as the both utils share some code and the basic
ideas.
Based on patch from Lukas Czerner <lczerner@redhat.com>.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The man page is almost exact copy of mount-deprecated/umount.8. This
version mentions long options, and has the options in same order as
they are mentioned in usage() output. Rest of the minor changes make
groff slightly nicer e.g. use .PP instead of empty line for paragraph
marker.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
The global variable $(LDADD) is always used if program_LDADD is
not specified. Let's use $LDADD everywhere to avoid exceptions for
people who need to specify global $LDADD.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|