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
kremlin [Tue, 22 Jul 2014 01:40:09 +0000 (20:40 -0500)]
(minor) update binaries
kremlin [Tue, 22 Jul 2014 01:39:43 +0000 (20:39 -0500)]
conf file will now be used to set intranslatable properties
kremlin [Tue, 22 Jul 2014 01:37:56 +0000 (20:37 -0500)]
update TODO
kremlin [Tue, 22 Jul 2014 01:37:41 +0000 (20:37 -0500)]
hostname1 now returns hostname minus domain info
also initializes pointer array properly, no more GLib warnings
kremlin [Tue, 22 Jul 2014 00:55:40 +0000 (19:55 -0500)]
clean up hostnamed.c, clear out localed.c for copying
fix minor memory management issues in hostnamed.c. localed.c
was previously based on a version of hostnamed.c i copied,
however it has strayed too far away from the working version
and must be recopied/refactored.
kremlin [Tue, 22 Jul 2014 00:35:57 +0000 (19:35 -0500)]
empty main.c
kremlin [Tue, 22 Jul 2014 00:34:37 +0000 (19:34 -0500)]
(minor) update object binaries
kremlin [Tue, 22 Jul 2014 00:34:02 +0000 (19:34 -0500)]
cut out config.c & config.h, they are unnessecary
kremlin [Tue, 22 Jul 2014 00:24:55 +0000 (19:24 -0500)]
tighten up memory management in hostnamed.c
kremlin [Mon, 21 Jul 2014 23:57:34 +0000 (18:57 -0500)]
refactor hostnamed.c to work with namespace genfile change
kremlin [Mon, 21 Jul 2014 23:42:33 +0000 (18:42 -0500)]
cut comments in main.c, prepare it to be removed
kremlin [Mon, 21 Jul 2014 23:16:57 +0000 (18:16 -0500)]
change gen script to use ksh, remove namespace option, regen genfiles
rewrite scripts/gen-gdbus-interfaces.sh to use ksh (#!/bin/sh) to cut
down on inbox spam, also fixed prior bug where generated files had bad
paths in their #includes. removed namespacing option from gdbus-codegen
as linked objects do not run into naming conflicts as the previous
commits did. regenerate all genfiles (src/interfaces/foo/foo-gen.{c.h})
accordingly.
kremlin [Tue, 15 Jul 2014 05:11:01 +0000 (00:11 -0500)]
minor, update binaries
kremlin [Tue, 15 Jul 2014 05:09:59 +0000 (00:09 -0500)]
include gprintf.h in hostnamed.c/localed.c to allow strict compilation
kremlin [Tue, 15 Jul 2014 05:03:17 +0000 (00:03 -0500)]
revamp makefile, build and link objects instead of #include'ing them
previously main.c #include'd files which themselves #include'd all source
files. now, we (correctly) build objects from the genfile, which are linked
to our sources.
kremlin [Tue, 15 Jul 2014 04:59:35 +0000 (23:59 -0500)]
cut out unnessecary #include's in main.c, prepare to deprecate
we're going to move towards having all four daemons exist as seperate
executables managed exclusively by DBus (startup, lifetime, etc.) so
i'm moving towards getting rid of the one "main" executable.
kremlin [Tue, 15 Jul 2014 04:57:18 +0000 (23:57 -0500)]
minor, bring in standalone daemon executables
kremlin [Tue, 15 Jul 2014 04:56:11 +0000 (23:56 -0500)]
minor, update objects from genfile
kremlin [Tue, 15 Jul 2014 04:55:24 +0000 (23:55 -0500)]
remove includes in non-gen'd interf files, they're linked properly now
no need to include foo-gen.c as its functionality exists inside linked object
built by makefile in future commit. additionally, make all non-generated
interface files executable with a dummy main() that runs foo_init() after
setting everything up properly with a g_main_loop
kremlin [Tue, 15 Jul 2014 04:51:11 +0000 (23:51 -0500)]
untouched genfiles now work with linking system, revert localed-gen.c
previously you needed to edit genfiles as to not re-implement
boilerplate methods. linking (instead of #include'ing) avoids this
and allows genfiles to work without edit, as intended.
kremlin [Tue, 15 Jul 2014 04:48:05 +0000 (23:48 -0500)]
get rid of non-generated interface headers, we don't need them
kremlin [Tue, 15 Jul 2014 03:46:04 +0000 (22:46 -0500)]
bring in genfile objects, remove git filler in bin
kremlin [Tue, 15 Jul 2014 03:21:23 +0000 (22:21 -0500)]
add bin/obj directory & populate w/ tmpfile; mod gitignore accordingly
kremlin [Tue, 15 Jul 2014 02:44:45 +0000 (21:44 -0500)]
get rid of ifdef maze in main.c, the binaries will be compiled sep.
kremlin [Thu, 10 Jul 2014 16:24:40 +0000 (11:24 -0500)]
set hostnamed's 'hostname' property before export
kremlin [Tue, 8 Jul 2014 08:15:51 +0000 (03:15 -0500)]
more work on managing four interfaces as separate PIDs, new makefile rules for building and installing standalone interface binaries, a little documentation and preproccessor logic
kremlin [Tue, 8 Jul 2014 06:41:59 +0000 (01:41 -0500)]
(1) regenerate leaner genfiles, we're not using the object manager functionality (2) modify gen-gdbus-interfaces to exclude object manager functionality (3) make localed skeleton (4) namespace hostnamed's and localed's bus/name functions properly (5) edit main.c to init localed
kremlin [Tue, 8 Jul 2014 06:04:16 +0000 (01:04 -0500)]
"build-proper renamed" to "publish" in makefile
kremlin [Tue, 8 Jul 2014 03:12:09 +0000 (22:12 -0500)]
regenerate proper namespaced code for other 3 interfaces, fix their includes accordingly
kremlin [Tue, 8 Jul 2014 03:07:58 +0000 (22:07 -0500)]
fix previous commit (forgot to escape newline), regenerate hostnamed with proper namespace changes, fix hostnamed.c accordingly
kremlin [Tue, 8 Jul 2014 02:53:20 +0000 (21:53 -0500)]
fix gen-gdbus-interfaces.sh to namespace generated functions by targetted DBus interface
kremlin [Thu, 3 Jul 2014 15:26:51 +0000 (10:26 -0500)]
cut out old XML install cruft
kremlin [Wed, 2 Jul 2014 06:06:15 +0000 (01:06 -0500)]
(1) modify gen-gdbus-interfaces.sh to generate nessecary subclasses
(2) regenerate hostnamed genfiles accordingly
(3) add in skeleton functions for handling hostnamed properties.
(4) celebrate, as hostnamed.c now serves as a copyable skeleton for the other three
kremlin [Wed, 2 Jul 2014 03:28:33 +0000 (22:28 -0500)]
following last commit, freshen up all ispect xml files with a on an updated archlinux box. also format all XML files to follow the same style (spacing/doctypes/etc)
kremlin [Wed, 2 Jul 2014 03:21:46 +0000 (22:21 -0500)]
(1) updated ispect xml to reflect recent undocumented changes in hostnamed
(2) implemented skeleton functions for hostnamed, attached to interface which is now
(3) exported on DBus properly as a generated GDBusInterfaceSkeleton
kremlin [Sun, 29 Jun 2014 20:33:51 +0000 (15:33 -0500)]
minor forgot to wrap email in <>'s in txts