Age | Commit message (Collapse) | Author |
|
Also add a coccinelle receipt to help with such transitions.
|
|
Otherwise emacs wants to use 2-space indentation and other
attrocities.
|
|
with small manual cleanups for style.
|
|
|
|
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.
|
|
- Add smack xattr lookup table
- Unify all of mac_smack_apply_xxx{_fd}() to mac_smack_apply() and
mac_smack_apply_fd().
- Add smack xattr read apis similar with apply apis as
mac_smack_read{_fd}().
|
|
|
|
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
|
|
Types used for pids and uids in various interfaces are unpredictable.
Too bad.
|
|
|
|
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.
|
|
It corrrectly handles both positive and negative errno values.
|
|
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().
|
|
If selinux is disabled and smack is only enabled, smack label is
relable-ed by label_fix. To avoid, make only be labeled for selinux.
|
|
|
|
a) always return negative errno error codes
b) always become a noop if smack is off
c) always take a NULL label as a request to remove it
|
|
and all that reset it to defaults mac_{selinux|smack}_fix()
Let's clean up the naming schemes a bit and use the same one for SMACK
and for SELINUX.
|
|
|
|
No functional change, just log the warning.
Fonud by Coverity. Fixes CID #1237544.
|
|
Use rmdir_parents() from src/shared instead.
|
|
|
|
including it in the log strings
|
|
|
|
Always cache the results, and bypass low-level security calls when the
respective subsystem is not enabled.
|
|
|
|
|
|
|
|
|
|
On Tue, Feb 12, 2013 at 2:18 PM, Robert Milasan <rmilasan@suse.com> wrote:
> Under some circumstances udev mixed with multipath fails:
>
> udevd-work[1376]:
> symlink(../../sdk, /dev/disk/by-id/scsi-36005076305ffc0670000000000002842.udev-tmp)
> failed: File exists udevd-work[1432]:
> rename(/dev/disk/by-id/scsi-36005076305ffc0850000000000000a88.udev-tmp, /dev/disk/by-id/scsi-36005076305ffc0850000000000000a88)
> failed: No such file or directory
>
> This is non-fatal, but there is no point of created the symlink or
> renaming the symlink if it already exists.
>
> Reference: https://bugzilla.novell.com/show_bug.cgi?id=791503
It looke like this now:
stat("/dev/disk/by-id", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
symlink("../../sda", "/dev/disk/by-id/ata-INTEL...N.tmp-b8:0") = 0
rename("/dev/disk/by-id/ata-INTEL...N.tmp-b8:0", "/dev/disk/by-id/ata-INTEL...N") = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mount but can't due to EROFS
|
|
|
|
context
|
|
|
|
|
|
|
|
|
|
|
|
|