1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

15926 Commits

Author SHA1 Message Date
Marc-Antoine Perennou
57827c087c fix in_addr_prefix_intersect for 32bits
shifting from a non fixed number of bits >= to the size of the type
leads to weird results, handle the special case of << 32 to fix it.

This was causing a test failure from test-socket-util:
Assertion 'in_addr_prefix_intersect(f, &ua, apl, &ub, bpl) == result' failed at
/var/tmp/paludis/build/sys-apps-systemd-scm/work/systemd-scm/src/test/test-socket-util.c:147, function
test_in_addr_prefix_intersect_one(). Aborting.

Minimal reproducer:

paludisbuild@Lou /tmp $ cat test.c
static void test(unsigned m) {
        unsigned nm = 0xFFFFFFFFUL << (32-m);
        printf("%u: %x\n", m, nm);
}

int main (void) {
        test(1);
        test(0);
        return 0;
}
paludisbuild@Lou /tmp $ gcc -m32 -std=gnu99 test.c -o test32
paludisbuild@Lou /tmp $ ./test32
1: 80000000
0: ffffffff
paludisbuild@Lou /tmp $ gcc -std=gnu99 test.c -o test64
paludisbuild@Lou /tmp $ ./test64
1: 80000000
0: 0
2014-06-22 12:26:09 -04:00
Ronny Chevalier
026d00bc4a update .gitignore 2014-06-22 15:03:28 +02:00
Thomas Hindoe Paaboel Andersen
c8b32e11ee consistently order cleanup attribute before type 2014-06-22 00:45:15 +02:00
Ronny Chevalier
2de61bbebf tests: add test_fdset_remove 2014-06-22 00:36:19 +02:00
Ronny Chevalier
e6b5c5d03c tests: add test-async 2014-06-22 00:36:19 +02:00
Ronny Chevalier
6160e473fc tests: add test-capability 2014-06-22 00:36:19 +02:00
Ronny Chevalier
8e75477abd build-sys: add -pthread flag for libsystemd-shared
src/shared/async.c uses pthread so it will fail at link time if we link
only to libsystemd-shared and use async
2014-06-22 00:36:19 +02:00
Kay Sievers
aac5ad0d25 build-sys: replace nm with $(NM) 2014-06-21 16:50:11 +02:00
Kay Sievers
706b7936d0 gudev: replace regex with sym file 2014-06-21 16:25:15 +02:00
Kay Sievers
e09c69d9fd pam_systemd: replace regex with sym file 2014-06-21 15:45:49 +02:00
Kay Sievers
dfb0c6cc3b pam_systemd: rename source file to match the module 2014-06-21 15:44:14 +02:00
Tom Gundersen
d122f9ee3a sd-dhcp-server: change default lease time form 1m to 1h
The short lease was useful for testing, but in real-world usage it is pointless to keep leases
this short. That said, the cost of lease renewal is really low, so we keep the lease still
relatively short at one hour to not get into hard-to-hit problems with lease exhaustion etc.
2014-06-21 15:26:41 +02:00
Tom Gundersen
d6bd972d06 sd-dhcp-server: fix broadcast of DHCP packets
The destination IP address should be INADDR_BROADCAST, but was
accidentally left as INADDR_ANY.
2014-06-21 15:02:30 +02:00
Zbigniew Jędrzejewski-Szmek
da92ca5eb5 util: treat fuse.sshfs as a network filesystem
https://bugs.freedesktop.org/show_bug.cgi?id=73727
2014-06-20 22:44:01 -04:00
Zbigniew Jędrzejewski-Szmek
81577dc228 missing.h: add various network enums
We used to check if e.g. IFLA_BOND_MAX is defined and provide fallback
values in missing.h is it wasn't. But over time, various kernel
versions added IFLA_* defines, so checking for IFLA_BOND_MAX is not
enough if the kernel is new enough to have some of them but too old to
have all. In case we detect that the latest known enum value is
missing, #define most of them.

https://bugs.freedesktop.org/show_bug.cgi?id=80095
2014-06-20 22:05:43 -04:00
Zbigniew Jędrzejewski-Szmek
747cf8cdf6 build-sys: fail if python support requested but not found 2014-06-20 18:44:40 -04:00
Filipe Brandenburger
65adc982db build-sys: check that compat-libs are enabled for "make dist"
Running "make dist" requires --enable-compat-libs since DIST_SOURCES will list
generated files such as libsystemd-daemon.c.

Tested:
  $ ./configure && make && make dist
  *** compat-libs must be enabled in order to make dist
  make: *** [dist-check-compat-libs] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
279419b379 build-sys: check that python is enabled for "make dist"
Running "make dist" requires Python support since some of the man page sources
(such as man/systemd.index.xml and man/systemd.directives.xml) are generated by
Python scripts, so break "make dist" and give an useful error message when
Python or the Python lxml module is not available.

Tested:
  $ ./configure --without-python && make && make dist
  *** python and python-lxml module must be installed and enabled in order to make dist
  make: *** [dist-check-python] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
b9d5b4c30d build-sys: configure --with-python when running distcheck
Python support is pretty much essential to create man pages, so we should make
sure that distcheck will request it during configure.

Tested: Successfully ran "make distcheck" and confirmed --with-python was
present in the ./configure run inside the unpacked distribution directory.
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
be8737ae38 build-sys: add verbosity to python-lxml detection in ./configure
Be verbose when checking if Python module lxml is available.  Also warn that
Python support will be disabled when the lxml module is not present.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80005

Tested:
- Without python-lxml package installed:
  $ ./configure
  checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
  checking for python lxml module... no
  configure: WARNING: *** python support requires python-xml module installed

- With python-lxml package installed:
  $ ./configure
  checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
  checking for python lxml module... yes
  checking for PYTHON_DEVEL... yes
  ...
          Python:                  yes
          Python Headers:          yes
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
49100d2abd build-sys: do not include id128-constants.h in the dist archive
File src/python-systemd/id128-constants.h is auto generated and its generation
does not require special tools, only sed.  There is no point in bundling it in
the distribution archive, so let's mark it as nodist_ to have it excluded.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80006

Tested: Successfully ran "make dist" after ./configure --without-python.
2014-06-20 18:44:40 -04:00
Zbigniew Jędrzejewski-Szmek
0d460faf73 util: do not strip /dev prefix twice 2014-06-20 18:44:39 -04:00
Cristian Rodríguez
cc219d7bab Remove libattr mentions from README
It is no longer required.
2014-06-20 20:22:05 +02:00
Thomas Hindoe Paaboel Andersen
88675ae97c sd-dhcp-server: remove unused cleanup function
Removes _cleanup_dhcp_lease_free_. While the automatic cleanup
functions are great to have this one is never used and causes
a warning in clang.
2014-06-20 19:32:51 +02:00
Lennart Poettering
9bfcda9528 core: clean-up signal reset logic when reexec
There's no need to save the old sigmask, if we are going to die. Let's
simplify this. Also, reset all the signal handlers, so that we don't
leave SIG_IGN set for some of them across reexec.
2014-06-20 19:32:05 +02:00
Kay Sievers
2f3b873a49 tmpfiles: copy/link /usr/share/factory/ files when the source argument is omitted 2014-06-20 15:57:43 +02:00
Benjamin Steinwender
351e57652a po: add German translation
https://bugs.freedesktop.org/show_bug.cgi?id=79430
2014-06-20 15:01:36 +02:00
Filipe Brandenburger
d7c9aa5e64 build-sys: fix indentation in make-man-rules generated output
This fixes the footer where 7 spaces were used on the first line of EXTRA_DIST,
but a Tab was clearly intended.
2014-06-20 14:41:09 +02:00
Filipe Brandenburger
61b5c82d91 build-sys: add sysusers.d/systemd.conf to CLEANFILES
The sysusers.d/systemd.conf configuration file was originally introduced in
commit 1b99214789, but it was not marked for cleanup.  This caused distcheck
to complain about the file not being removed by distcleam.

Tested: Successfully ran "make distcheck" with this patchset.
2014-06-20 14:27:25 +02:00
Jonathan Boulle
59282254ef sysusers.d - fix typo in user definition file 2014-06-20 13:41:46 +02:00
Lennart Poettering
3c5a87a879 debug-generator: add new kernel cmdline option systemd.wants= to add units to the initial transaction 2014-06-20 13:36:28 +02:00
Tom Gundersen
6b66097b95 networkd: link - fix memleak of icmp6 struct 2014-06-20 13:04:02 +02:00
Tom Gundersen
6278a20190 networkd: veth - fix creation of veth netdev
Avoid freeing the netdev structure in the cleanup macro.
2014-06-20 12:59:22 +02:00
Michael Marineau
375eadd911 shared: fix search_and_fopen with alternate roots
Update for the current behavior of path_strv_resolve which now returns
paths relative to the given root, not the full absolute paths.
2014-06-20 00:10:47 -04:00
Michael Marineau
09e00c524f test: ensure conf_files_list returns absolute paths 2014-06-20 00:10:47 -04:00
Michael Marineau
cba2ef0272 conf-files: include root in returned file paths
This restores the original root handling logic that was present prior to
112cfb18 when path expansion moved to path_strv_canonicalize_absolute.
That behavior partially went away in 12ed81d9.

Alternatively all users of conf_files_list* could be updated to
concatenate the paths themselves as unit_file_query_preset did but since
no user needs the un-concatenated form that is pointless duplication.
2014-06-20 00:10:47 -04:00
Michael Marineau
3e8a78c8dc test: unit test for using alternate roots with path_strv_resolve 2014-06-20 00:10:47 -04:00
Michael Marineau
7d8da2c964 shared: rename path_strv_canonicalize_absolute functions
Since 12ed81d9 path_strv_canonicalize_absolute leaves the search list
relative to the given root directory instead of resolving paths to their
true location as the name implies. To better reflect this behavior
rename to the less strongly worded path_strv_resolve.
2014-06-20 00:10:46 -04:00
Zbigniew Jędrzejewski-Szmek
a2ae516a25 getty-generator: properly escape instance names
Otherwise the add_symlink() function tries to make directories for
each slash even for the slash after the @ symbol in the final link
name, failing for /dev/3270/tty1.

Based on a patch by Werner Fink <werner@suse.de>.
2014-06-19 22:04:29 -04:00
Zbigniew Jędrzejewski-Szmek
f56506141c getty-generator: use strappenda
Allocating on the stack should be fine for the fixed number
of items.
2014-06-19 22:04:29 -04:00
Zbigniew Jędrzejewski-Szmek
7141829512 man: also describe an udev rule for bridge sysctl 2014-06-19 21:14:07 -04:00
Zbigniew Jędrzejewski-Szmek
7284335adb man: document statically loading modules for sysctl settings
https://bugzilla.redhat.com/show_bug.cgi?id=1022977
https://bugzilla.novell.com/show_bug.cgi?id=725412
2014-06-19 20:44:49 -04:00
Cristian Rodríguez
0b73eab7a2 units/systemd-sysctl.service.in: run after load-modules
Modules might or will register new sysctl options.

[zj: This mechanism of adding modules just to reliably set sysctl
attributes is not ideal. Nevertheless, sysctl for dynamically created
attributes is simply broken, and this is the easiest workaround.]

https://bugzilla.redhat.com/show_bug.cgi?id=1022977
https://bugzilla.novell.com/show_bug.cgi?id=725412
2014-06-19 20:21:24 -04:00
Zbigniew Jędrzejewski-Szmek
dede0e335d util.c: simplify rm_rf_children_dangerous 2014-06-19 20:08:44 -04:00
Ronny Chevalier
4a336a69fd tests: add tests for strv_extendf 2014-06-19 19:59:57 -04:00
Ronny Chevalier
927be00cb3 tests: add tests to test-util
add tests for:
  - filename_is_safe
  - ascii_strlower
  - files_same
  - is_valid_documentation_url
  - file_in_same_dir
  - endswith
  - close_nointr
  - unlink_noerrno
  - readlink_and_make_absolute
  - read_one_char
  - ignore_signals
  - strshorten
2014-06-19 19:59:57 -04:00
Ronny Chevalier
4630bbb766 tests: add missing return 2014-06-19 19:59:57 -04:00
Ronny Chevalier
f277be6768 tests: fix test-icmp6-rs
Don't close the fd given to sd-icmp6-nd, since it will be aynschonously closed
by sd_icmp6_nd_unref
2014-06-20 00:32:02 +02:00
Ronny Chevalier
03de7ed905 sd-icmp6-nd: fix uninitialized fd 2014-06-20 00:27:38 +02:00
Ronny Chevalier
513a6fa867 sd-dhcp6-client: fix uninitialized variables 2014-06-20 00:26:54 +02:00