summaryrefslogtreecommitdiff
path: root/src/shared/utmp-wtmp.c
Commit message (Collapse)AuthorAge
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-08-24
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-08-24
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop spurious newlines (#8764)Lennart Poettering2018-08-24
| | | | | | | | | Double newlines (i.e. one empty lines) are great to structure code. But let's avoid triple newlines (i.e. two empty lines), quadruple newlines, quintuple newlines, …, that's just spurious whitespace. It's an easy way to drop 121 lines of code, and keeps the coding style of our sources a bit tigther.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* coccinelle: O_NDELAY → O_NONBLOCKLennart Poettering2018-05-30
| | | | | | Apparently O_NONBLOCK is the modern name used in most documentation and for most cases in our sources. Let's hence replace the old alias O_NDELAY and stick to O_NONBLOCK everywhere.
* Prep v236 : Add missing SPDX-License-Identifier (6/9) src/sharedSven Eden2018-03-26
|
* tree-wide: use IN_SET where possibleAndreas Rammhold2017-09-29
| | | | | In addition to the changes from #6933 this handles cases that could be matched with the included cocci file.
* Prep v230: Add utmp support to make wall message to work properly.Sven Eden2017-06-16
|
* Major cleanup of all leftovers after rebasing on master.Sven Eden2017-03-14
| | | | | | | | The patching of elogind in several steps with only partly rebasing on a common commit with upstream, left the tree in a state, that was unmergeable with master. By rebasing on master and manually cleaning up all commits, this merge is now possible. However, this process left some orphans, that are cleanup now.
* util: split all hostname related calls into hostname-util.cLennart Poettering2017-03-14
|
* shared: add terminal-util.[ch]Ronny Chevalier2017-03-14
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen2015-02-12
| | | | | | 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.
* shared: wtmp-utmp - don't clear store_wtmp in utmp_put_dead_process()Tom Gundersen2014-09-19
| | | | | Also modernize a few other things and add comments to explain CID #1237503 and CID #1237504.
* utmp-wtmp: allow overriding username on wallSebastian Thorarensen2014-03-14
| | | | | | | utmp_wall() now takes an optional argument 'username_override' which allows the caller to override the username shown on wall messages. journald will use this to inform users that its wall messages comes from 'systemd-journald'.
* utmp: make sure we don't write the utmp reboot record twice on each bootLennart Poettering2014-01-30
| | | | (Also, only send the audit msg once, too)
* Get rid of our reimplementation of basenameZbigniew Jędrzejewski-Szmek2013-12-06
| | | | | | The only problem is that libgen.h #defines basename to point to it's own broken implementation instead of the GNU one. This can be fixed by #undefining basename.
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek2013-04-05
| | | | | | | | | | | | | | | | | | | | | | | Before, we would initialize many fields twice: first by filling the structure with zeros, and then a second time with the real values. We can let the compiler do the job for us, avoiding one copy. A downside of this patch is that text gets slightly bigger. This is because all zero() calls are effectively inlined: $ size build/.libs/systemd text data bss dec hex filename before 897737 107300 2560 1007597 f5fed build/.libs/systemd after 897873 107300 2560 1007733 f6075 build/.libs/systemd … actually less than 1‰. A few asserts that the parameter is not null had to be removed. I don't think this changes much, because first, it is quite unlikely for the assert to fail, and second, an immediate SEGV is almost as good as an assert.
* ModernizationZbigniew Jędrzejewski-Szmek2013-03-31
| | | | Use _cleanup_ and wrap lines to ~80 chars and such.
* Remove some dead codeZbigniew Jędrzejewski-Szmek2013-03-31
| | | | Based on coverity report.
* utmp: make gcc shut up, we need to pass an int here, not size_tLennart Poettering2013-03-29
|
* utmp-wtmp: don't try to read past end of stringZbigniew Jędrzejewski-Szmek2013-03-28
| | | | | | | | | | systemd-199/src/shared/utmp-wtmp.c:228: buffer_size_warning: Calling strncpy with a maximum size argument of 32 bytes on destination array "store.ut_line" of size 32 bytes might leave the destination string unterminated. The destination string is unterminated on purpose, but we must remember that.
* util: split-out path-util.[ch]Kay Sievers2012-05-08
|
* move more common files to shared/ and add them to shared.laKay Sievers2012-04-12