IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL'
oom conditions would not be detected properly. After that commit, a double
free was performed.
Rework the whole function to be easier to understand, and also replace
strv_split_nulstr with strv_new, since we know the strings anyway.
This fixes a bug pointed out by http://css.csail.mit.edu/stack/
(Optimization-unstable code)
It is a similar fix as f146f5e159 (2013-12-30, core:
Forgot to dereference pointer when checking for NULL)
To explain this bug consider the following similar, but simpler code:
if (!p)
free(*p)
Assume the if condition evaluates to true, then we will access *p,
which means the compiler can assume p is a valid pointer, so it could
dereference p and use the value *p.
Assuming p as a valid pointer, !p will be false.
But initally we assumed the condition evaluates to true.
By this reasoning the optimizing compiler can deduce, we have dead code.
("The if will never be taken, as *p must be valid, because otherwise
accessing *p inside the if would segfault")
This led to an error message of the static code checker, so I checked the
code in question.
As we access *modes and *states before the check in the changed line of
this patch, I assume the line to be wrong and we actually wanted to check
for *modes and *states being both non null.
Directly before the changed line there is:
while ((parent->next_ps && parent->pid != ps->ppid))
parent = parent->next_ps;
which looks one element ahead of the list, hence we can rely on parent
being non null here.
If 'parent' were NULL at that while loop already, it would crash as we're
dereferencing 'parent' when checking for next_ps already.
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
The return value of 0 would be treated as failure by mistake,
resulting in " SystemError: error return without exception set".
The way that set_error() is used is changed to be the same
everywhere.
Nspawn has --setenv, and systemd itself accepts systemd.setenv.
It is nice to have the same parameter name everywhere.
Old name is accepted, but not advertised.
scan-build is a static analyzer in llvm. As ususal static analyzers
tend to mostly find theoretical bugs in software that has been in
production for a while. For in-development code it can be useful to
check if new issues is added as there is a chance to spot real problems
before release. For systemd we are now down to 297 issues - the vast
majority are false positives because the tool does not understand the
cleanup attribute.
Running clang's static analyzer scan-build is a bit messy. You have to
run both configure and make "inside" the build-scan tool. To have an
easy shortcut from autogen.sh I thus call both directly from it. This
makes it different from the other options in autogen.sh. I chose 's'
for static analysis.
scan-build is in the package clang-analyzer on fedora.
For a while I have been cleaning up warnings when building with clang.
There are currently only two sources of warnings left: Wcast-align and Wgnu.
I am not convinced that fixing up those up is feasible so I run with them
disabled to spot regressions. E.g. clang is a bit more strict wrt to unused
variables with the cleanup attribute and I have fixed a number of those since.
Like the other options in autogen.sh I have a shortcut for clang as well. I use
'l' for llvm.
SELinux check will be done using the context of the unit file as as a
target instead of the default init_t context, allowing selinux control
on the level of individual units.
https://bugzilla.redhat.com/show_bug.cgi?id=1022762
grawity:
It looks like the old version _was_ correct – the default value will
be "Type=dbus" if the service has a BusName set.
Suggested change: "if neither Type= nor BusName= is specified"
gdm relies on the policy to deny its own requests to not deadlock. Given
that we currently do not enforce any policy in the dbus1 compat proxy
service this means that gdm will necessarily deadlock on our systems.
To work around this, enforce a fixed policy teomporarily, until we
interpret the legacy XML policy in full.
Booh, gdm, booh, for requring this and making me waste two days on
tracking this brokenness down.
This is a recurring submission and includes corrections to:
- missing words, preposition choice.
- change of /lib to /usr/lib, because that is what most distros are
using as the system-wide location for systemd/udev files.