summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-ctrl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* tree-wide: use proper unicode © instead of (C) where we canLennart Poettering2018-06-141-1/+1
| | | | | | Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
* Add SPDX license headers to various assorted filesZbigniew Jędrzejewski-Szmek2017-11-191-1/+2
|
* tree-wide: standardize on $(PACKAGE_VERSION) for the version stringZbigniew Jędrzejewski-Szmek2017-04-051-1/+1
| | | | | | We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents. $(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and drop the other define.
* Rename formats-util.h to format-util.hZbigniew Jędrzejewski-Szmek2016-11-071-1/+1
| | | | | | We don't have plural in the name of any other -util files and this inconsistency trips me up every time I try to type this file name from memory. "formats-util" is even hard to pronounce.
* tree-wide: use mfree moreZbigniew Jędrzejewski-Szmek2016-10-171-2/+1
|
* tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhereLennart Poettering2016-05-051-1/+1
| | | | | | | | | | The macro determines the right length of a AF_UNIX "struct sockaddr_un" to pass to connect() or bind(). It automatically figures out if the socket refers to an abstract namespace socket, or a socket in the file system, and properly handles the full length of the path field. This macro is not only safer, but also simpler to use, than the usual offsetof() + strlen() logic.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* udev: add emacs header lineZbigniew Jędrzejewski-Szmek2015-12-071-0/+2
| | | | | Otherwise emacs wants to use 2-space indentation and other attrocities.
* tree-wide: sort includesThomas Hindoe Paaboel Andersen2015-11-161-3/+3
| | | | Sort the includes accoding to the new coding style.
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-1/+2
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* tree-wide: drop {} from one-line if blocksLennart Poettering2015-09-091-4/+2
| | | | Patch via coccinelle.
* tree-wide: make use of log_error_errno() return valueLennart Poettering2015-09-091-6/+2
| | | | | | | | | | | | | | | | | | | | Turns this: r = -errno; log_error_errno(errno, "foo"); into this: r = log_error_errno(errno, "foo"); and this: r = log_error_errno(errno, "foo"); return r; into this: return log_error_errno(errno, "foo");
* udev: control - add FIXME comment to remove work-aroundKay Sievers2015-08-271-0/+5
|
* udev: variable dereferenced before check 'cmsg'Karel Zak2015-08-061-1/+2
|
* udev-ctrl: make _unref() always return NULLTom Gundersen2015-05-151-27/+23
| | | | Bring this in line with the rest of the codebase.
* shared: add formats-util.hRonny Chevalier2015-04-101-0/+1
|
* udev-ctrl: fix strict aliasing issuesShawn Landden2015-03-141-9/+10
| | | | | | | it is ironic that "The only purpose of this structure is to cast the structure pointer passed in addr in order to avoid compiler warnings. See EXAMPLE below." from bind(2)
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-2/+0
| | | | | | 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.
* shared: introduce cmsg_close_all() callLennart Poettering2015-02-181-0/+3
| | | | | | | | | The call iterates through cmsg list and closes all fds passed via SCM_RIGHTS. This patch also ensures the call is used wherever appropriate, where we might get spurious fds sent and we should better close them, then leave them lying around.
* include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen2015-02-121-1/+1
| | | | | | include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
* Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering2015-02-121-1/+1
| | | | | | | This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
* tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez2015-02-101-1/+1
|
* Assorted format fixesZbigniew Jędrzejewski-Szmek2015-01-221-2/+2
| | | | | Types used for pids and uids in various interfaces are unpredictable. Too bad.
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-281-8/+8
| | | | | | | | | | | 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.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | | | | | | | | | | 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().
* udev: fix typosTom Gundersen2014-09-181-1/+1
| | | | Spotted by Andreas Henriksson.
* udev: ctrl - log if setting SO_PASSCRED failsTom Gundersen2014-09-181-2/+8
| | | | | | No functional change. Found by Coverity. Fixes CID #1237533.
* udev: place opening { at the same line as the function declarationKay Sievers2014-07-291-60/+30
|
* udev: remove seqnum API and all assumptions about seqnumsKay Sievers2014-04-141-1/+1
| | | | | | | | | | | | The way the kernel namespaces have been implemented breaks assumptions udev made regarding uevent sequence numbers. Creating devices in a namespace "steals" uevents and its sequence numbers from the host. It confuses the "udevadmin settle" logic, which might block until util a timeout is reached, even when no uevent is pending. Remove any assumptions about sequence numbers and deprecate libudev's API exposing these numbers; none of that can reliably be used anymore when namespaces are involved.
* make gcc shut upLennart Poettering2014-02-191-1/+1
| | | | | | | If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
* everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering2014-02-131-1/+1
|
* use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH2014-01-311-1/+1
| | | | | | | | In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
* log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2013-12-241-11/+11
| | | | including it in the log strings
* util: unify SO_PEERCRED/SO_PEERSEC invocationsLennart Poettering2013-12-241-5/+5
| | | | | | Introduce new call getpeercred() which internally just uses SO_PEERCRED but checks if the returned data is actually useful due to namespace quirks.
* trivial coding style clean upsThomas Hindoe Paaboel Andersen2013-12-031-1/+1
| | | | | | | | | | | | | | - Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
* udev: declare some symbols staticKay Sievers2013-11-131-9/+1
|
* udev: use initialization instead of zeroing in one placeZbigniew Jędrzejewski-Szmek2013-10-131-8/+9
|
* udev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCREDHarald Hoyer2013-04-081-0/+2
| | | | | | | | | Avoid "sender uid=65534, message ignored" case, where no credentials can be read on the sender side. Seems, the server socket does not enable credential receiving fast enough, and the message from the client (without credential) sometimes is queued before the credential passing was active.
* udev: move string copy functions to shared/Kay Sievers2013-01-091-2/+2
|
* use the same email address everywhereKay Sievers2012-11-121-1/+1
|
* udev: remove configuration options for /dev, /sys, /run directoriesKay Sievers2012-04-161-2/+1
|
* udev: fix gcc warnings showing up after adding $(AM_CFLAGS)Kay Sievers2012-04-101-1/+0
|
* udev: switch to systemd logging functionsKay Sievers2012-04-081-14/+12
|
* move imported udev into placeKay Sievers2012-04-041-0/+494