Commit graph

23026 commits

Author SHA1 Message Date
Lennart Poettering 49cf4170d0 util-lib: move web-related calls into web-util.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering 7ccbd1ae84 util-lib: split out syslog-related calls into syslog-util.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering d21be5ff91 detect-virt: add new --chroot switch to detect chroot() environments 2015-10-27 13:25:57 +01:00
Lennart Poettering 7f4b3c5ea3 util-lib: move running_in_chroot() into virt.[ch]
It's a very weak kind of virtualization, after all.
2015-10-27 13:25:57 +01:00
Lennart Poettering 4e731273ed util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering d4510856a0 util-lib: move is_main_thread() to process-util.[ch] 2015-10-27 13:25:57 +01:00
Lennart Poettering 430f0182b7 src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → capability-util.[ch]
The files are named too generically, so that they might conflict with
the upstream project headers. Hence, let's add a "-util" suffix, to
clarify that this are just our utility headers and not any official
upstream headers.
2015-10-27 13:25:57 +01:00
Lennart Poettering affb60b1ef util-lib: split out umask-related code to umask-util.h 2015-10-27 13:25:56 +01:00
Lennart Poettering 8752c5752f util-lib: move more locale-related calls to locale-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering b8faf2ecd5 util-lib: move status printing stuff into src/core/
It's very specific to the core, and not used elsewhere, hence move it
out of terminal-util.[ch].
2015-10-27 13:25:56 +01:00
Lennart Poettering 8b43440b7e util-lib: move string table stuff into its own string-table.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering 8fcde01280 util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering f3e2e81d53 util: move string_is_safe() to string-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering f4f15635ec util-lib: move a number of fs operations into fs-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering c8b3094de5 util-lib: split out file attribute calls to chattr-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering 89a5a90cb0 util-lib: split xattr-related calls into xattr-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering a09561746f util-lib: introduce dirent-util.[ch] for directory entry calls
Also, move a couple of more path-related functions to path-util.c.
2015-10-27 13:25:56 +01:00
Lennart Poettering 78f22b973f util-lib: split out resource limits related calls into rlimit-util.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering e929bee09a util-lib: move take_password_lock() to user-util.[ch]
Also, rename it take_etc_passwd_lock(), in order to make it more
expressive.
2015-10-27 13:25:55 +01:00
Lennart Poettering bb15fafe9c util: move filename_is_valid() and path_is_safe() to path-util.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 4349cd7c1d util-lib: move mount related utility calls to mount-util.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 6550203eb4 util-lib: move fstab_node_to_udev_node() to fstab-util.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 0d39fa9c69 util-lib: move more file I/O related calls into fileio.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 5f311f8c0e util: remove path_get_parent(), in favour of dirname_malloc()
We don't need two functions that do essentialy the same, hence drop
path_get_parent(), and stick to dirname_malloc(), but move it to
path-util.[ch].
2015-10-27 13:25:55 +01:00
Lennart Poettering e4e73a6325 util-lib: split out hex/dec/oct encoding/decoding into its own file 2015-10-27 13:25:55 +01:00
Lennart Poettering 6bedfcbb29 util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] 2015-10-27 13:25:55 +01:00
Tom Gundersen f47fc3ffc4 Merge pull request #1693 from ssahani/word
timesysnd: port to extract_first_word
2015-10-27 11:41:06 +01:00
Susant Sahani 880603a13c resolved: port to extract_first_word 2015-10-27 09:24:23 +05:30
Susant Sahani 2e3c585472 timesysnd: port to extract_first_word 2015-10-27 09:12:04 +05:30
Lennart Poettering c2b4c0e68a Merge pull request #1688 from phomes/typo-fix
path-util: do not return NULL as int
2015-10-27 03:07:24 +01:00
Thomas Hindoe Paaboel Andersen ce9d6bcf33 path-util: do not return NULL as int
strv_split will only return NULL on oom so we should return -ENOMEM
instead.

Looks like an oversight from the changes in 0f474365
2015-10-26 22:31:37 +01:00
Lennart Poettering a9067193dd Merge pull request #1679 from evverx/refuse-manual-start-by-reload-or-restart
core: don't allow manual start with reload-or-restart too
2015-10-26 17:53:59 +01:00
Lennart Poettering 5422848d63 Merge pull request #1686 from medhefgo/remount-ro-fix
unmount: Pass in mount options when remounting read-only
2015-10-26 17:52:37 +01:00
Jan Janssen 471b48ed2f unmount: Pass in mount options when remounting read-only
man 2 mount says that the mountflags and data parameteres should
match the original values except for the desired changes. We only
bother with the mount options since the only flags we can change
are MS_RDONLY, MS_SYNCHRONOUS and MS_MANDLOCK; which shouldn't
matter too much.

Fixes: #351
2015-10-26 15:13:28 +01:00
Tom Gundersen ad1a44b23b Merge pull request #1676 from poettering/util-lib-2
split up util.[ch] into more pieces, and other stuff
2015-10-26 13:21:41 +01:00
Tom Gundersen 0dec689b09 journal: add missing include 2015-10-26 13:12:30 +01:00
Lennart Poettering 24a99732e2 Merge pull request #1681 from ssahani/journal
journald-server: port to extract_first_word
2015-10-26 12:25:34 +01:00
Susant Sahani d581d9d91f journald-server: port to extract_first_word 2015-10-26 15:32:08 +05:30
Evgeny Vereshchagin efb30ba1a6 core: don't allow manual start with reload-or-restart too
fix bug: systemctl reload-or-restart starts a service with RefuseManualStart=yes
2015-10-26 04:23:09 +00:00
Lennart Poettering e05ac0557f Merge pull request #1675 from evverx/run-protect-home
systemd-run can launch units with ProtectHome
2015-10-26 01:43:23 +01:00
Lennart Poettering 4d0d3d41d2 process-util: move more process related calls to process-util.[ch] 2015-10-26 01:24:39 +01:00
Lennart Poettering 2583fbea8e socket-util: move remaining socket-related calls from util.[ch] to socket-util.[ch] 2015-10-26 01:24:39 +01:00
Lennart Poettering 58ce77339c build-sys: add missing makefile symlink 2015-10-26 01:24:39 +01:00
Lennart Poettering 81a56d6f42 util-lib: move ether_addr_to_string() into ether-addr-util.c 2015-10-26 01:24:39 +01:00
Lennart Poettering 373cd63a37 path-util: minor coding style fix
We usually avoid relying on C's degrade-to-boolean functionality when
comparing numerical variables with 0. We use it only for pointers and
actual booleans.
2015-10-26 01:24:39 +01:00
Lennart Poettering 7cb48925dc core: rename SmackFileSystemRoot= to SmackFileSystemRootLabel=
That way it's in sync with the other SMACK label settings.

https://github.com/systemd/systemd/pull/1664#issuecomment-150891270
2015-10-26 01:24:39 +01:00
Lennart Poettering 67c7c892b9 user-util: never hand out or accept invalid UIDs
libc isn't that strict, but it's a good idea if we are, to not create
confusion around invalid user ids.
2015-10-26 01:24:38 +01:00
Lennart Poettering d02608170e util: remove lookup_uid(), replace by uid_to_name()
So far we had two pretty much identical calls in user-util.[ch]:
lookup_uid() and uid_to_name(). Get rid of the former, in favour of the
latter, and while we are at it, rewrite it, to use getpwuid_r()
correctly, inside an allocation loop, as POSIX intended.
2015-10-26 01:24:38 +01:00
Lennart Poettering b1d5277372 user-util: simplify uid parsing a bit 2015-10-26 01:24:38 +01:00
Lennart Poettering b1d4f8e154 util-lib: split out user/group/uid/gid calls into user-util.[ch] 2015-10-26 01:24:38 +01:00