{"push_id":970378748,"size":36,"distinct_size":36,"ref":"refs/heads/master","head":"7b2428fec40033549c68f54e26e89e7ca9a9ce31","before":"9845c0f8acc9ebffec4b9196267e5eaa0887ba11","commits":[{"sha":"8bddaf5f6489af08e85f35261b57c3671623bb3d","author":{"email":"f9809039ea4850e75dcb8d80b778844aa463358f@redhat.com","name":"Antonio Murdaca"},"message":"sdjournal: expose sd_journal_set_data_threshold\n\nSigned-off-by: Antonio Murdaca <runcom@redhat.com>","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/8bddaf5f6489af08e85f35261b57c3671623bb3d"},{"sha":"f164f437010a16e0443d2d1e68e8e001cdbf1226","author":{"email":"27c24459b5ba4724e54142a5ec5c41135e2587f6@gnugeneration.com","name":"Vito Caputo"},"message":"Merge pull request #124 from runcom/sdjournald-data-threshold\n\nsdjournal: expose sd_journal_set_data_threshold","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/f164f437010a16e0443d2d1e68e8e001cdbf1226"},{"sha":"61cc5f024478188a8f94332cda4be76bbebad83c","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"util: add GetRunningSlice+RunningFromSystemService\n\nThis adds two utility functions which can be used by processes to determine\ntheir context (slice), and whether they are running from a systemd \"system\"\nservice.\n\nThis is a port of [code in rkt](https://github.com/coreos/rkt/blob/d23669f63644f63c1c5b61ea3c95f90ee9ab66f9/stage1/init/init.go#L399), with a few improvements (correctly freeing CStrings, broader portability for older systemd versions).\n\nTo check for whether we're running from a \"system service\" we use the approach suggested by Lennart (and described [here](https://github.com/coreos/rkt/issues/911#issuecomment-103853978)):\n\n\thence: to detect if something is a system service, the best approach is\n\tto check if it is not a user process. There are two kinds of user\n\tprocesses: those running in session scopes, and those running of the\n\tper-user systemd --user instance (which is a per-user singleton shared\n\tby every session of the user). sd_pid_get_owner_uid() can recognize\n\tsession scopes and the systemd --user service, extracts the uid from it\n\tand returns it. It's hence suitable as a check if something is user\n\tcode or not.\n\nUnfortunately this results in false positives: on CoreOS Linux, where there's no PAM, logging in does not result in a user slice/scope being created, and instead the session runs under `systemd-sshd.slice`:\n\n\tcore@coreos_production_qemu-633-1-0 ~ $ systemd-cgls |fgrep $PPID -B3\n\t  ├─system-sshd.slice\n\t  │ ├─sshd@9-10.0.2.15:22-10.0.2.2:44781.service\n\t  │ │ ├─18061 sshd: core [priv]\n\t  │ │ ├─18063 sshd: core@pts/2\n\t  │ │ ├─18064 -bash\n\t  │ │ ├─19669 systemd-cgls\n\t  │ │ └─19670 grep -F 18063 -B3\n\n\tcore@coreos_production_qemu-633-1-0 ~ $ ./sysd\n\tslice = system-sshd.slice\n\trunningFromSystemService = true\n\ncompare to a Fedora 20 system where a user scope is created:\n\n\tjon@fedora20 ~ $ systemd-cgls | fgrep $PPID -B2\n\t  │ └─session-452.scope\n\t  │   ├─2809 sshd: jon [priv]\n\t  │   ├─2814 sshd: jon@pts/13\n\t  │   ├─2816 -bash\n\t  │   ├─2928 systemd-cgls\n\t  │   └─2929 fgrep --color=auto 2814 -B2\n\n\tjon@fedora20 ~ $ ./sysd\n\tslice = user-1000.slice\n\trunningFromSystemService = false","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/61cc5f024478188a8f94332cda4be76bbebad83c"},{"sha":"d7803637f6eb61f1957801b1000e0c0a7d1085d1","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"util: rework getHandle interface and add caveats","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/d7803637f6eb61f1957801b1000e0c0a7d1085d1"},{"sha":"2a36382d7303f2868c56ebc94def3d75c12d36b1","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"util: add sessionleader heuristic to service check\n\nThis adds a heuristic to RunningFromSystemService that checks if the\ninvoking process is a session leader, which should help eliminate false\npositives on systems that do not have `pam_systemd` configured.\n\nThis is a port of vcaputo's patch to rkt which landed in\nhttps://github.com/coreos/rkt/pull/1694/commits","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/2a36382d7303f2868c56ebc94def3d75c12d36b1"},{"sha":"0bc436dc4fda012c5fc1c1fec304c6b07254a9ea","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"util: add CurrentUnitName (wraps sd_pid_get_unit)\n\nCurrentUnitName is a simple wrapper around `sd_pid_get_unit` to\nfacilitate processes invoked from a systemd service unit to be able to\nretrieve the name of that unit.","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/0bc436dc4fda012c5fc1c1fec304c6b07254a9ea"},{"sha":"6ab3de8a11e4776d18b77b920d2e99f25209390a","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"Merge pull request #87 from jonboulle/master\n\nutil: add GetRunningSlice, RunningFromSystemService, CurrentUnitName","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/6ab3de8a11e4776d18b77b920d2e99f25209390a"},{"sha":"99be3c3e759bfd92074b36ff2729bdb9e4e8129a","author":{"email":"08b3ee9e6b18a12a2e38b65d7c8561c9337dccee@kinvolk.io","name":"Iago López Galeiras"},"message":"util: add ErrSoNotFound error var\n\nThis allows rkt to detect that the problem was that we couldn't open\nlibsystemd and just warn the user.\n\nFor example, NixOS has shared libraries in weird paths and we don't want\nto just fail if we can't find it. See\nhttps://github.com/coreos/rkt/issues/1879","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/99be3c3e759bfd92074b36ff2729bdb9e4e8129a"},{"sha":"a831f36d09de8f095c28eeee839df52e9de5031f","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"Merge pull request #127 from kinvolk/iaguis/so-error\n\nutil: add ErrSoNotFound error var","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/a831f36d09de8f095c28eeee839df52e9de5031f"},{"sha":"2f349b7bf3020e63e35ea2dad64d937bc134b68a","author":{"email":"832f6b0035c88cc2abca437058d42bb6dbd3f58d@gmail.com","name":"Christopher Snell"},"message":"sdjournal: enable loading journal from custom dir\n\nAdd a new constructor, `NewJournalFromDir`, which allows the opening of\na Journal from a given directory (by wrapping\n`sd_journal_open_directory`)","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/2f349b7bf3020e63e35ea2dad64d937bc134b68a"},{"sha":"0acb493bbec3cd986b0508d83246a54c441d4e81","author":{"email":"832f6b0035c88cc2abca437058d42bb6dbd3f58d@gmail.com","name":"Christopher Snell"},"message":"util: add a GetMachineID() convenience function\n\nFunctions similarly to systemd's `sd_id128_get_machine`, by simply\nreading the contents of `/etc/machine-id`\n\nAlso tweaks sdjournal to make paths given to `NewJournalFromDir`\nabsolute before passing them to the systemd library.","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/0acb493bbec3cd986b0508d83246a54c441d4e81"},{"sha":"7f0723f2757beb369312e795c56cb681a928d7c7","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"util/sdjournal: minor style cleanup","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/7f0723f2757beb369312e795c56cb681a928d7c7"},{"sha":"716ff808c32398fe50914c9df7860a8c0da4d894","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"Merge pull request #130 from jonboulle/chrissnell-custom-journal-directory\n\n*: add util.GetMachineID+journal.NewJournalFromDir","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/716ff808c32398fe50914c9df7860a8c0da4d894"},{"sha":"5ad14db0686a8ae9b04e36196adc34dccdb53498","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"*: add contribution guide and DCO\n\nNot sure why these have been missing for so long.\nPulled from coreos/template-project as per other\nCoreOS projects.","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/5ad14db0686a8ae9b04e36196adc34dccdb53498"},{"sha":"97e8788e5fec4292c722714be31bbaa220a41df1","author":{"email":"ccbe98003f1cf0230fc266a4454ecd220d828993@ezix.org","name":"Lyonel Vincent"},"message":"sdjournal: un-break errint->err replacement\n\n7f0723f2757beb369312e795c56cb681a928d7c7 inadvertently broke the build\nby re-using a variable; this fixes that.","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/97e8788e5fec4292c722714be31bbaa220a41df1"},{"sha":"45759f83ccc9a2f38633acc261578571c039e265","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"sdjournal: use consistent style for errno check\n\nWhen calling systemd C functions we were using a mix of patterns for\nvariable names and error style checking (\"err\" vs \"r\", != 0 vs. < 0).\nThis standardises on \"r < 0\" everywhere.\n\nAs noted in\nhttps://github.com/coreos/go-systemd/pull/124#discussion_r47586556\n\nSupersedes https://github.com/coreos/go-systemd/pull/131","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/45759f83ccc9a2f38633acc261578571c039e265"},{"sha":"197c12a8b5681d6a27ad16292a8ee68246d87214","author":{"email":"df7ab31f057ce2104ab9a2ad742fa8f635b67edf@gmail.com","name":"Mikkel Oscar Lyderik"},"message":"login1: Add interface for Inhibit method\n\nhttp://www.freedesktop.org/wiki/Software/systemd/inhibit/","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/197c12a8b5681d6a27ad16292a8ee68246d87214"},{"sha":"102060175581b40a68e414b41760cbce1f6807d5","author":{"email":"df7ab31f057ce2104ab9a2ad742fa8f635b67edf@gmail.com","name":"Mikkel Oscar Lyderik"},"message":"login1: Add Subscribe method for login1\n\nAdd test for Inhibit method","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/102060175581b40a68e414b41760cbce1f6807d5"},{"sha":"c4a2f93017fd1f9dd686bb0014c78e2bc43ea0d0","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"Merge pull request #119 from mikkeloscar/inhibit\n\nlogin: add Inhibit and Subscribe","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/c4a2f93017fd1f9dd686bb0014c78e2bc43ea0d0"},{"sha":"4bfe5aaedb9dbaa9ee735a8e68870b18cb50b62e","author":{"email":"0d47477beef1d882e8812885f3dcf66c4a47c346@gmail.com","name":"Jonathan Boulle"},"message":"Merge pull request #132 from jonboulle/lyonel-master\n\nsdjournal: fix build and be consistent about errno","distinct":true,"url":"https://api.github.com/repos/runcom/go-systemd/commits/4bfe5aaedb9dbaa9ee735a8e68870b18cb50b62e"}]}