summaryrefslogtreecommitdiff
path: root/src/hostname
AgeCommit message (Collapse)Author
2013-03-05hostnamed: allow more special characters in pretty hostnameNathaniel Chen
this addresses the bug at: https://bugs.freedesktop.org/show_bug.cgi?id=59311 https://bugzilla.redhat.com/show_bug.cgi?id=895299 hostnamectl is supposed to allow a range of special characters for the 'pretty' hostname: $ hostnamectl set-hostname --pretty "Nathaniels Desktop !@#$%" ..however, it rejects apostrophes, double quotes, and backslashes. The manual for hostnamectl suggests that this should be allowed. It makes sense to reject \0, \n, etc. pretty_string_is_safe() is the same as string_is_safe(), but allows more special characters.
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-01-04build-sys: drop all distribution specfic checksLennart Poettering
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2012-12-31polkit: add "imply" rules to a number of polkit actionsLennart Poettering
2012-12-24hostnamed: make chassis type configurable via /etc/machine-infoLennart Poettering
For many usecases it is useful to store the chassis type somewhere, and /etc/machine-info sounds like a good place. Ideally we could always detect the chassis type from firmware, but frequently that's not available and in many embedded devices probably entirely unrealistic. This patch adds a configurable setting CHASSIS= to /etc/machine-info and exposes this via hostnamectl/hostnamed. hostnamed will guess the chassis type from DMI if nothing is set explicitly. I also added support for detecting it from ACPI, which should be more useful as ACPI 5.0 actually knows a "tablet" chassis type, which neither DMI nor previous ACPI versions knew. This also enables DMI-based and ACPI-based detection for non-x86 systems as ACPI is apparently coming to ARM platforms soon. I tried to minimize the vocabulary of chassis types understood and added: desktop, laptop, server, tablet, handset. This is much less than either APCI or DMI know. If we need more types later on we can easily add them.
2012-11-15hostnamectl: fix parsing of --no-ask-passwordLennart Poettering
2012-11-12enable localization for common *ctl commandsDave Reisner
2012-10-29hostnamectl: do not choke on set-hostname with no argumentKay Sievers
https://bugzilla.redhat.com/show_bug.cgi?id=871172
2012-10-21hostnamectl: add more really basic system info to the status outputLennart Poettering
2012-10-19timedatectl,hostnamectl: rework --help textLennart Poettering
2012-10-17hostname: add new hostnamectl tool as text client for hostnamedLennart Poettering
2012-10-03dbus: add some more safety checks before accepting data from bus clientsLennart Poettering
2012-07-26log.h: new log_oom() -> int -ENOMEM, use itShawn Landden
also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera
2012-07-25use "Out of memory." consistantly (or with "\n")Shawn Landden
glibc/glib both use "out of memory" consistantly so maybe we should consider that instead of this. Eliminates one string out of a number of binaries. Also fixes extra newline in udev/scsi_id
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-02-11logind: introduce CanReboot/CanPowerOff bus callsLennart Poettering
2012-01-22login: move seat udev rules to login subdirKay Sievers
2012-01-16dbus: more efficient implementation of propertiesMichal Schmidt
The way the various properties[] arrays are initialized is inefficient: - only the .data members change at runtime, yet the whole arrays of properties with all the fields are constructed on the stack one by one by the code. - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit" are repeated in several unit types. Fix it by moving the information about properties into static const sections. Instead of storing the .data directly in the property, store a constant offset from a run-time base. The small arrays of struct BusBoundProperties bind together the constant information with the right runtime information (the base pointer). On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-05build-sys: add stub makefiles to subdirsLennart Poettering
2011-12-31hostnamed, localed: move config files to subdirKay Sievers
2011-12-31hostnamed: move sources to subdirectoryKay Sievers