b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
f5e5c28f42a2f6d006785ec8b5e98c11a71bb039 |
|
13-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
tree-wide: check if errno is greater then zero
gcc is confused by the common idiom of
return errno ? -errno : -ESOMETHING
and thinks a positive value may be returned. Replace this condition
with errno > 0 to help gcc and avoid many spurious warnings. I filed
a gcc rfe a long time ago, but it hard to say if it will ever be
implemented [1].
Both conventions were used in the codebase, this change makes things
more consistent. This is a follow up to bcb161b0230f.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846 |
db260eedc27814248da39ebdfc84a3f5584b0b16 |
|
15-Nov-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
firstboot: log on take_etc_passwd_lock error too |
e1427b138fbf7b7f13bb61187635b882be3ca2b2 |
|
09-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: apply errno.cocci
with small manual cleanups for style. |
4546c34193064a1536d551facdcb398c0b765175 |
|
05-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
firstboot: fix errno sign |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
affb60b1ef0cb48388d23360c6f3b043c50f6b8c |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out umask-related code to umask-util.h |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
e929bee09ab8000e87b7e825ed3a78d73ecdd7f0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move take_password_lock() to user-util.[ch]
Also, rename it take_etc_passwd_lock(), in order to make it more
expressive. |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
0f03c2a4c093e3d44f4072144827e943c05c8904 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
path-util: unify how we process paths specified on the command line
Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so. |
0f4743651081b5367ab06f238827ddfd4da74e74 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: get_current_dir_name() can return errors other than ENOMEM
get_current_dir_name() can return a variety of errors, not just ENOMEM,
hence don't blindly turn its errors to ENOMEM, but return correct errors
in path_make_absolute_cwd().
This trickles down into a couple of other functions, some of which
receive unrelated minor fixes too with this commit. |
ab84f5b95e10e8ffa115696ddf29c48440c5bae4 |
|
19-Oct-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_ |
1602b008531ba6e0c704588cb2643daef26b71d9 |
|
19-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we deal with passwords, erase them from memory after use
A bit snake-oilish, but can't hurt. |
e287086b8aa2558356af225a12d9bfea8e7d61ca |
|
07-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
ask-password: add support for caching passwords in the kernel keyring
This adds support for caching harddisk passwords in the kernel keyring
if it is available, thus supporting caching without Plymouth being
around.
This is also useful for hooking up "gdm-auto-login" with the collected
boot-time harddisk password, in order to support gnome keyring
passphrase unlocking via the HDD password, if it is the same.
Any passwords added to the kernel keyring this way have a timeout of
2.5min at which time they are purged from the kernel. |
0084360296429b2068c1a4d4d4263083a8963b02 |
|
06-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
ask-password: various modernizations
Primarily clean-up error logging: log either all or no error messages in
the various functions. Mostly this means the actual password querying
calls no longer will log on their own, but the callers have to do so.
Contains various other fixes too, for example ports some code over to
use the clean-up macro.
Should contain no functional changes. |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
ae691c1d9382995ea7e28317f5c37023229c27ee |
|
06-Aug-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
hostname-util: get rid of unused parameter of hostname_cleanup()
All users are now setting lowercase=false. |
34ad609010244513e0c31fdde59ce1cf84d4c3f6 |
|
06-Aug-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
firstboot: allow a trailing dot on fqdn |
8fb494435889dcb9e1c09b8c7220e47bab717bf9 |
|
06-Aug-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
hostname-util: add relax parameter to hostname_is_valid
Tests are modified to check behaviour with relax and without relax.
New tests are added for hostname_cleanup().
Tests are moved a new file (test-hostname-util) because there's
now a bunch of them.
New parameter is not used anywhere, except in tests, so there should
be no observable change. |
0da162481886c6ded6fac514cb1e3da1c9845771 |
|
03-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
tree-wide: convert some more mfree() candidates |
97b11eedff9d2e17101ad453caf9e48b73246719 |
|
31-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar); |
2fc09a9cdd1ad25bc7c53a23d5301eb952e1ce3d |
|
30-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
tree-wide: use free_and_strdup()
Use free_and_strdup() where appropriate and replace equivalent,
open-coded versions. |
4c1fc3e404d648c70bd2f50ac50aeac6ece8872e |
|
07-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and
write_string_file_atomic() into write_string_file() and provide a flags mask
that allows combinations of atomic writing, newline appending and automatic
file creation. Change all users accordingly. |
958b66ea16deddd794b3a52643bd44633e165ead |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split all hostname related calls into hostname-util.c |
1d13f648d0fade38194db74b4f82ca68c8a26856 |
|
13-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: add generic calls for prefixing a root directory to a path
So far a number of utilities implemented their own calls for this, unify
them in prefix_root() and prefix_roota(). The former uses heap memory,
the latter allocates from the stack via alloca().
Port over most users of a --root= logic. |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
ad525df851a1bef7369fe21b5cde382941e7b073 |
|
07-Mar-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
firstboot: set all spwd fields to -1 for consistency with sysusers |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
b57b06258e0b1894edb6d1fc52a80b3c33164892 |
|
28-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
notify,firstboot,analyze,run: trim --help output to 80 lines |
f2068bcce01db31cdc9422f44185f3b49c04d2ce |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: when cloning a raw disk image, also set the NOCOW flag |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno + return simplifications |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
07a60cc13c48c5f79616b07aad2808bfe809de22 |
|
22-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: don't prohibit re-generating the machine id on the current root fs
If it really is missing it should be safe to create it.
Also see:
http://lists.freedesktop.org/archives/systemd-devel/2014-August/022726.html |
64845bdc829d6a6179d0762b7e97ef23828562a3 |
|
05-Oct-2014 |
David Sommerseth <davids@redhat.com> |
ask-password: Add --echo to enable echoing the user input
Programs such as OpenVPN may use ask-password for not only retrieving
passwords, but also usernames. Masking usernames with * seems just silly.
v2 - Don't mess with termios flags, instead print the input
instead of an asterix. Resolves issues with backspace
and TAB input.
v3 - Renamed 'do_echo' variables and argument to 'echo'. Also
modified the ask_password_{tty,agent,auto} API instead of
additional wrapper functions.
[zj: undo changes to ask_password_auto, since no callers were using
the new argument.] |
94956f8fba498d5d34a88a7e26b0418a4a0e9e6d |
|
02-Oct-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
firstboot: silence coverity
CID#1237537 |
e926f6475d2f7063f8190076a0dc9ff7ecb227c8 |
|
11-Sep-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
firstboot: silence a warning
No change in behavoir as the fallthrough from ARG_COPY had already
set arg_copy_locale to true.
Found with coverity. Fixes: CID#1237622 |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
3a43da2832dc5360a638d043f469a6dcbe025582 |
|
29-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
time-util: add and use USEC/NSEC_INFINIY |
45035609fcfc3fe09324988c4929a3c147171c23 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: follow lock protocol when changing /etc/shadow |
3250929b7049f3fbbb610a92438c8a8b638ec155 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: change /etc/shadow access mode to 000
It appears to be customary to remove all access bits from /etc/shadow
including those for the root owner), hence let's do the same. |
418b9be50018303cde79b423d4701b7fd86ddbdc |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: add new component to query basic system settings on first boot, or when creating OS images offline
A new tool "systemd-firstboot" can be used either interactively on boot,
where it will query basic locale, timezone, hostname, root password
information and set it. Or it can be used non-interactively from the
command line when prepareing disk images for booting. When used
non-inertactively the tool can either copy settings from the host, or
take settings on the command line.
$ systemd-firstboot --root=/path/to/my/new/root --copy-locale --copy-root-password --hostname=waldi
The tool will be automatically invoked (interactively) now on first boot
if /etc is found unpopulated.
This also creates the infrastructure for generators to be notified via
an environment variable whether they are running on the first boot, or
not. |