kremlin [Sat, 3 Mar 1973 09:48:04 +0000 (04:48 -0500)]
completed timedated's SetTime method
kremlin [Sun, 14 Sep 2014 06:52:41 +0000 (02:52 -0400)]
began general logic for timedated's SetTime method
Antoine Jacoutot [Wed, 3 Sep 2014 09:03:24 +0000 (11:03 +0200)]
Spelling.
kremlin [Tue, 2 Sep 2014 18:34:53 +0000 (13:34 -0500)]
properly credit frogs
kremlin [Thu, 28 Aug 2014 17:46:12 +0000 (13:46 -0400)]
continue documenting
kremlin [Thu, 28 Aug 2014 02:48:46 +0000 (22:48 -0400)]
start manpage
kremlin [Tue, 26 Aug 2014 03:18:17 +0000 (23:18 -0400)]
add localtime determination system for timezone property
this determines the proper timezone string (e.g. America/New_York)
by first checking if /etc/localtime is symlinked to a named timezone
in /usr/share/zoneinfo. if not, a warning is thrown and /etc/localtime's
checksum is compared against a previously generated table.
kremlin [Mon, 25 Aug 2014 19:57:22 +0000 (14:57 -0500)]
Merge branch 'devel' of git://uglyman.kremlin.cc/git/systembsd into devel
kremlin [Mon, 25 Aug 2014 19:56:50 +0000 (14:56 -0500)]
begin get_timezone(), begin get_timezone_path() util func
kremlin [Mon, 25 Aug 2014 17:08:00 +0000 (12:08 -0500)]
switch params.h with types.h and include time.h in timedated.c
kremlin [Mon, 25 Aug 2014 17:05:40 +0000 (12:05 -0500)]
add get_file_sha256(path) to util.c
Antoine Jacoutot [Mon, 25 Aug 2014 11:50:56 +0000 (13:50 +0200)]
Unbreak installation.
kremlin [Mon, 25 Aug 2014 07:13:03 +0000 (02:13 -0500)]
get rid of pesky, gdm-breaking logind service file...
kremlin [Mon, 25 Aug 2014 07:07:10 +0000 (02:07 -0500)]
if /etc/myname lacks a trailing domain, do not force the default
discussed with ajacoutot
kremlin [Mon, 25 Aug 2014 07:03:19 +0000 (02:03 -0500)]
add config_[set,get]() in util.c, replace ini-style config
configs are now key->value pairs delimited by newlines, seperated
by '=' signs. replace all instances of g_key_file ini-like configs
kremlin [Mon, 25 Aug 2014 05:02:50 +0000 (00:02 -0500)]
fill in timedated skeleton funcs
kremlin [Mon, 25 Aug 2014 04:31:56 +0000 (23:31 -0500)]
fill in localed skeleton funcs
kremlin [Mon, 25 Aug 2014 03:43:53 +0000 (22:43 -0500)]
change polkit-auth.{c,h} to util.{c,h}
we are going to include the /etc/os-release changing
functions in here.
kremlin [Mon, 25 Aug 2014 03:30:27 +0000 (22:30 -0500)]
set /etc/myname when setStaticHostname is called
always sets a FQDN (see recent previous commits)
kremlin [Mon, 25 Aug 2014 01:47:58 +0000 (20:47 -0500)]
add get_bsd_hostname() and has_domain()
get_bsd_hostname takes a string and returns a proper FQDN to be
written to /etc/myname or NULL if the passed string is unsalvagable.
if passed string does not contain a domain, the current domain from
/etc/myname is used. if /etc/myname does not contain a trailing
domain, an error message is printed and the default (".home.network")
is used.
Landry Breuil [Fri, 22 Aug 2014 20:37:26 +0000 (22:37 +0200)]
fix url to gitweb repo
kremlin [Thu, 21 Aug 2014 04:10:14 +0000 (23:10 -0500)]
pretty hostname and static hostname no longer sync across each other
kremlin [Thu, 21 Aug 2014 04:01:50 +0000 (23:01 -0500)]
make SetStaticHostname() call sethostname()
Antoine Jacoutot [Mon, 18 Aug 2014 10:50:54 +0000 (12:50 +0200)]
Install under libexec/systemd to match upstream (lib/systemd).
Antoine Jacoutot [Mon, 18 Aug 2014 08:49:20 +0000 (10:49 +0200)]
Add DEPLOYMENT and LOCATION to machine-info.
kremlin [Mon, 18 Aug 2014 06:32:14 +0000 (01:32 -0500)]
change polkit action names to match systemd's exactly
gnome-control-center has polkit rules which refer explicitly to action
names we need to match for it to work with our code properly
kremlin [Mon, 18 Aug 2014 01:54:08 +0000 (20:54 -0500)]
s/Names=/Name=/g in .service.in files
the Names param in .service files expects > 1 name,
otherwise dbus won't recognize it as a valid activatable
service
Antoine Jacoutot [Sat, 16 Aug 2014 16:41:46 +0000 (18:41 +0200)]
Add XXX and mention /etc/os-release for our_get_os_cpename().
Antoine Jacoutot [Sat, 16 Aug 2014 16:31:57 +0000 (18:31 +0200)]
Add /etc/machine-info.
Antoine Jacoutot [Sat, 16 Aug 2014 16:11:00 +0000 (18:11 +0200)]
Get/set info into /etc/machine-info.
discussed with Ian
Antoine Jacoutot [Sat, 16 Aug 2014 10:09:01 +0000 (12:09 +0200)]
Unbreak install target.
kremlin [Sat, 16 Aug 2014 09:11:43 +0000 (04:11 -0500)]
finish remaining hostnamed method handlers
hostnamed is complete!
kremlin [Sat, 16 Aug 2014 07:08:35 +0000 (02:08 -0500)]
remove unnessecary free in polkit-auth.c
kremlin [Sat, 16 Aug 2014 06:49:33 +0000 (01:49 -0500)]
tighten up polkit-auth, implement in hostnamed.c
kremlin [Sat, 16 Aug 2014 05:08:25 +0000 (00:08 -0500)]
minor, remove test func from hostnamed.c
kremlin [Sat, 16 Aug 2014 05:08:08 +0000 (00:08 -0500)]
complete polkit-auth functionality
polkit-auth exposes one function taking an alleged unique bus name
and alleged action name (id) and returns an enum describing if and
how action is authorized.
kremlin [Sat, 16 Aug 2014 02:11:32 +0000 (21:11 -0500)]
add polkit auth object, compile it in makefile, add header to interfaces
src/polkit-auth.c and its header are seperately built objects, linked
to interfaces, which expose a single, safe auth checking function
kremlin [Sat, 16 Aug 2014 01:49:30 +0000 (20:49 -0500)]
minor, fix tab/spacing issue in hostnamed.c
kremlin [Sat, 16 Aug 2014 01:45:34 +0000 (20:45 -0500)]
get rid of main.c and references to it, it has been unused for a while now
kremlin [Fri, 15 Aug 2014 22:44:56 +0000 (17:44 -0500)]
add polkit XML policies, include them in install target
all new .policy files are well formed but i am waiting
for freedesktop to fix the doctype DTD file:
http://thread.gmane.org/gmane.comp.freedesktop.policykit/374
kremlin [Fri, 15 Aug 2014 20:51:57 +0000 (15:51 -0500)]
minor, change CFLAGS operator to '=' over '+='
setting CFLAGS in the makefile via += operator
made it tag on an extra -O3 -pipe 1, causing the
debug build to fail as it redundantly specifies
-O0
kremlin [Fri, 15 Aug 2014 20:00:28 +0000 (15:00 -0500)]
Merge branch 'devel' of git://uglyman.kremlin.cc/git/systemd-utl into devel
kremlin [Fri, 15 Aug 2014 19:47:55 +0000 (14:47 -0500)]
polish hostname setter func, fix logic issues with prop
handle_set_hostname works almost perfectly (still needs polkit
auth checking). returns logical D-Bus errors and sets hostname
property correctly now.
Antoine Jacoutot [Fri, 15 Aug 2014 19:03:29 +0000 (21:03 +0200)]
drop conf.
Antoine Jacoutot [Fri, 15 Aug 2014 19:03:09 +0000 (21:03 +0200)]
conf -> service-files
Antoine Jacoutot [Fri, 15 Aug 2014 18:59:06 +0000 (20:59 +0200)]
Revamp the Makefile.
Create the service files as part of the build so that they respect BINDIR.
ok Ian
kremlin [Fri, 15 Aug 2014 18:11:08 +0000 (13:11 -0500)]
include polkit.h in all interfaces, edit makefile accordingly
kremlin [Sat, 9 Aug 2014 16:26:39 +0000 (11:26 -0500)]
consolidate name setting functionality into set_name()
this follows the precedent of setting globals during init
like chassis/icon/uname properties and makes better sense overall.
birthday commit! happy birthday ian
kremlin [Sat, 9 Aug 2014 15:50:30 +0000 (10:50 -0500)]
revert hostnamed-dbus.conf to allow normal users to call methods
we need this beheivor as authentication can happen easily via polkit
(it is also the correct approach)
kremlin [Sat, 9 Aug 2014 15:44:36 +0000 (10:44 -0500)]
add set_names(), complement to icon/chassis setters
it runs during init and acts just like like icon/chassis/uname(3)
functions work
kremlin [Sat, 9 Aug 2014 15:39:10 +0000 (10:39 -0500)]
make *name prop. getters operate similarly to others
kremlin [Fri, 8 Aug 2014 05:22:35 +0000 (00:22 -0500)]
add SetHostname functionality
sethostname now works, cleans up after itself properly and
cleans/checks incoming data before trying to sethostname(3).
kremlin [Fri, 8 Aug 2014 05:21:34 +0000 (00:21 -0500)]
add deny clause in hostnamed sysbus policy
add a <deny> statement to prevent regular users from invoking any
methods on hostname1's interface, which all set details only root
should be able to set
kremlin [Fri, 8 Aug 2014 03:33:42 +0000 (22:33 -0500)]
minor, make xen an uncertainty and move a comment that was misplaced
Antoine Jacoutot [Thu, 7 Aug 2014 09:42:48 +0000 (11:42 +0200)]
"SmartDC HVM" comes from illumos-joyent, not Oracle Solaris
kremlin [Thu, 7 Aug 2014 09:21:11 +0000 (04:21 -0500)]
recatagorize QEMU/KVM/etc. to correct baremetal classification
kremlin [Thu, 7 Aug 2014 06:16:55 +0000 (01:16 -0500)]
add support for vars from uname(3)
fill out remaining properties for hostnamed, which can be easily found
through uname(3) calls.
kremlin [Thu, 7 Aug 2014 05:31:09 +0000 (00:31 -0500)]
minor, update TODO
kremlin [Thu, 7 Aug 2014 05:18:58 +0000 (00:18 -0500)]
minor, initialize counter to zero. i might be a bit tired.
kremlin [Thu, 7 Aug 2014 05:10:15 +0000 (00:10 -0500)]
minor, add generous fixed buffer for sysctl strings
kremlin [Thu, 7 Aug 2014 04:29:51 +0000 (23:29 -0500)]
minor, init some vars to 0 for saftey
kremlin [Thu, 7 Aug 2014 04:19:53 +0000 (23:19 -0500)]
minor, remove extra comma
kremlin [Thu, 7 Aug 2014 04:17:02 +0000 (23:17 -0500)]
minor, remove old comments + add KVM to chassis indicator table
kremlin [Thu, 7 Aug 2014 04:02:22 +0000 (23:02 -0500)]
embellish chassis/icon detection for laptops/servers/VMs/desktops
import landry's upower function to detect laptop-ness
check arch if sparc*/hppa to detect server-ness
connect functionality to DBus side of things
kremlin [Thu, 7 Aug 2014 02:31:30 +0000 (21:31 -0500)]
revamp icon/chassis determination method
icon/chassis is now set once during init and then referred to afterwords.
replaced string array with nice struct, added clear instructions.
added virtualization give-aways from my research + icon names (xdg)
kremlin [Wed, 6 Aug 2014 10:43:46 +0000 (05:43 -0500)]
add WIP bit of chassis detection for hostnamed
hostnamed checks sysctl output for known vm indicators
kremlin [Wed, 6 Aug 2014 07:09:11 +0000 (02:09 -0500)]
minor, clean up last commit to compile with strict flags
kremlin [Wed, 6 Aug 2014 06:57:12 +0000 (01:57 -0500)]
add get_[static/dynamic/pretty]hostname functionality
dynamic hostname (sometimes just hostname) is always whatever
the gethostname(3) returns.
static hostname is derived from prettyhostname, which attempts to
convert it to a 7 bit ascii hostname (no bookend -'s, etc.) if this
fails or prettyhostname has not yet been set, defaults to gethostname(3).
prettyhostname is whatever is in /etc/systemd_compat.conf, if reading that
fails it is just an empty string. prettyhostname is blank until manually set.
kremlin [Wed, 6 Aug 2014 05:58:06 +0000 (00:58 -0500)]
minor, retab \t's to four spaces
kremlin [Tue, 5 Aug 2014 05:24:40 +0000 (00:24 -0500)]
minor, s/g_print/g_printf
kremlin [Tue, 5 Aug 2014 02:56:58 +0000 (21:56 -0500)]
minor, add ISC license blurbs to interfaces/foo/foo.h
kremlin [Tue, 5 Aug 2014 02:51:47 +0000 (21:51 -0500)]
minor, add a TODO to hostnamed.c i caught
kremlin [Tue, 5 Aug 2014 02:50:37 +0000 (21:50 -0500)]
(8) [final] modify main() to call correct clean sequence
main() now sets the signal handlers (via function from previous
commit) before establishing the GMainLoop as well as invoke the
proper clean()'s after unref'ing the loop. at this point all four
interfaces are at the same place structurally. builds all cases.
kremlin [Tue, 5 Aug 2014 02:37:30 +0000 (21:37 -0500)]
(7) add set_signal_handlers() to bind functions during init
this function calls attached the ones from the previous commit to the
GLib runtime properly. since we are working solely in the default context
(in terms on the GMainLoop) we are guaranteed the attached functions will
only run once.
kremlin [Tue, 5 Aug 2014 02:30:41 +0000 (21:30 -0500)]
(6) add handler for unix termination signals
it prints a message and calls foo_mem_clean(), swiftly and safely
bringing the runtime down before letting the calling thread it was
ready to exit. note, this is handled through GLib which guarantees
it is only fired once, rather than unwrapped signals that can occur
wildly.
kremlin [Tue, 5 Aug 2014 02:18:51 +0000 (21:18 -0500)]
(5) fix foo_mem_clean() functions to avoid race cond.
mem_clean functions previously free()'d our pointer array without
first checking that the name/interface had properly been unexported from
dbus. checking first better guarantees all operations implicating that date
have ceased, and that it is safe to go ahead and stop the GMainLoop before
immediately returning. this causes the code just after the main_loop_begin()
call to start functioning, in our case the actual free() calls (which are now
*absolutley* safe to call)
kremlin [Tue, 5 Aug 2014 02:03:58 +0000 (21:03 -0500)]
(4) move on_name_acquired functionality to on_bus_acquired
work that was previously done in foo_on_name_acquired(), such as attaching
the interface to the name, is now done in foo_on_bus_acquired(), as GIO docs
suggest. this fixed a bug with logind failing to export, the name_acquired function
executed executed too late to export a big interface like logind.
fix some minor error msg/consistency stuff in hostnamed, merge across pals. builds
kremlin [Tue, 29 Jul 2014 07:40:03 +0000 (02:40 -0500)]
(3) add needed GLib headers, move loop and bus descr out of main into global
minor variable placement changes. added gboolean dbus_interface_exported,
which due to the guarantees of the name_lost, bus_acquired, and name_acquired
is a reliable source of whether not it is reasonable to try and unexport it
kremlin [Tue, 29 Jul 2014 07:26:14 +0000 (02:26 -0500)]
(2) move on_name_lost() callback to appropriate commend-bounded region
minor, builds
kremlin [Tue, 29 Jul 2014 07:20:14 +0000 (02:20 -0500)]
(1) add <interface>.h and #include it in corresponding .c
nessecary for compiler unambiguity. minor, builds
kremlin [Tue, 29 Jul 2014 07:11:07 +0000 (02:11 -0500)]
see full message -- safe signal/lifetime/glib code
this unusually dense commit is the product of me using hostnamed as a
prototyping bed, you should instead follow the next numbered series of
commits to proceed this one, as they are the same changes but made
incrementally and gradually across the other three interfaces.
added:
* proper lifetime handling, everything coordinated in a gmainloop such that
daemons don't clean their memory twice or trip over the last instance's unclosed
file descriptors, etc.
* threadsafe unix termination signal handling
* more intuitive runtime, daemons immidietly either start up perfectly and print
a verification or crash and print a reason/probable solution
* some bugfixes detailed in further individual commits
kremlin [Tue, 29 Jul 2014 02:27:48 +0000 (21:27 -0500)]
minor, clarify what "misc functions" are in comments
kremlin [Tue, 29 Jul 2014 02:16:57 +0000 (21:16 -0500)]
minor, clarify "dbus signal" vs. "unix signal" in comments
kremlin [Tue, 29 Jul 2014 02:07:38 +0000 (21:07 -0500)]
include glib-unix.h in interface files
it's a good idea to use glib signal handling, most use cases will
be running gnome
kremlin [Tue, 22 Jul 2014 22:24:48 +0000 (17:24 -0500)]
minor, add tmpfile to preserve now-empty bin dirs
kremlin [Tue, 22 Jul 2014 21:46:16 +0000 (16:46 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 21:45:10 +0000 (16:45 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 21:43:00 +0000 (16:43 -0500)]
minor, add genfiles to gitignore
kremlin [Tue, 22 Jul 2014 21:41:27 +0000 (16:41 -0500)]
update service files to run with root permissions
root is needed for gethostname(3), setlocale(3), setting system time,
and handling login enviornments.
kremlin [Tue, 22 Jul 2014 21:34:50 +0000 (16:34 -0500)]
modify makefile and script to work with previous commit
last commit created discrepencies in makefile and gen-gdbus-interfaces.sh, fix
kremlin [Tue, 22 Jul 2014 21:27:05 +0000 (16:27 -0500)]
organize configs in conf/ into new subdirectories
introspection xml -> conf/introspect-xml/
service files -> conf/service-files/
dbus policies -> conf/sysbus-policy/
kremlin [Tue, 22 Jul 2014 21:15:50 +0000 (16:15 -0500)]
remove genfiles from repo, instead generate in makefile
genfiles (-gen.{c,h}) should be generated at build time instead of
being included in the repo. remove them & add relevant recipes/pre-reqs
include genfiles in 'clean' recipe
kremlin [Tue, 22 Jul 2014 20:54:34 +0000 (15:54 -0500)]
refactor makefile with env variables
per ajacoutot's reccomendation
kremlin [Tue, 22 Jul 2014 20:26:23 +0000 (15:26 -0500)]
edit TODO
kremlin [Tue, 22 Jul 2014 20:22:46 +0000 (15:22 -0500)]
update gitignore to include all binaries
additionally get rid of unused -handler rule
kremlin [Tue, 22 Jul 2014 20:21:12 +0000 (15:21 -0500)]
get rid of objects in repository
i thought i could make some cool looking diffs in gitweb or something :)
kremlin [Tue, 22 Jul 2014 03:12:29 +0000 (22:12 -0500)]
(minor) update binaries
kremlin [Tue, 22 Jul 2014 03:12:02 +0000 (22:12 -0500)]
copy and regex localed, timedated, and logind from hostnamed
they now start up and display the proper methods/functions on the
system bus, albeit with no functionality
kremlin [Tue, 22 Jul 2014 02:18:42 +0000 (21:18 -0500)]
cut out cruft in dbus confs
kremlin [Tue, 22 Jul 2014 02:00:27 +0000 (21:00 -0500)]
add DBus service files, change Makefile to install them