summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers_watch.go
AgeCommit message (Collapse)Author
2016-06-14drop inotify, we can just rely on SIGHUP.Luke Shumaker
much simple. very kiss.
2015-11-08gofmtLuke Shumaker
2015-11-07use the separate packages from lukeshu.com, clean up the MakefileLuke Shumaker
2015-09-18Massive documentation and copyright clean-up.Luke Shumaker
2015-09-12gofmt, use make(chan) without a number argument where possibleLuke Shumaker
2015-09-12Clean up log messagesLuke Shumaker
2015-09-12Add an inotify watcher utility using channels; use it.Luke Shumaker
The interface of inotify/inutil.Watcher more resembles golang.org/x/exp/inotify; with it using channels instead of repeated calls to Read(). In my use-case, this is useful because it allows implementing a "read" (select, really) that doesn't block Close(); which is required to handle the TERM signal correctly.
2015-09-12hackers_watch: fix double-lock errorLuke Shumaker
2015-09-11Have nslcd_systemd manage the backend lifecycleLuke Shumaker
2015-09-07clean upLuke Shumaker
2015-09-07clean up gofmt differencesLuke Shumaker
2015-09-07manage each users list of groups as a set instead of a listLuke Shumaker
2015-09-05track group membershipLuke Shumaker
2015-09-05minor tidy upLuke Shumaker
2015-09-05clean up load_yaml_file loggingLuke Shumaker
2015-09-05tidy up hackers_gitLuke Shumaker
2015-09-05inotify: Avoid most of the race conditions, get rid of CintLuke Shumaker
There's still a condition that could be a race with fd-reuse, if one goroutine is calling inotify.{AddWatch,RmWatch,Read}(); another goroutine is calling inotify.Close(), and several things happen between loadFd() running and the add_watch/rm_watch/read syscall launching: - syscall.Close() returns - syscall.Open() reuses the filedescriptor A B syscall(loadFd()) inotify.Close(); syscall.Open() ---------------------------------------------------------- loadFd() syscall.Close() syscall.Open() syscall() Given that Read() can't be allowed to block Close() from running, I'm not sure there's a way to fix this.
2015-09-05clean up loggingLuke Shumaker
2015-09-04fix password loadingLuke Shumaker
2015-09-03The comment at the bottom of hackers_watch.go was wrong; fix the race.Luke Shumaker
The actual determinant was this race main worker ------------------- Close() Read() Exit() If Read() returned between when Close() happened and when Exit() happened, then the code ran. It doesn't *really* matter if the code runs, but for predictability, set up a wait group to have Close() block until the worker exits.
2015-09-03fix bugs in code calling inotifyLuke Shumaker
2015-09-03tidyLuke Shumaker
2015-09-03Fix issues in inotify bindingsLuke Shumaker
2015-09-03Use systemd/lsb exit codes, consistentlyLuke Shumaker
2015-09-02Clean upLuke Shumaker
2015-09-01Finish the hackers.git parserLuke Shumaker
2015-08-29roll sleeves up, do actual yaml the hard wayLuke Shumaker
2015-08-28implement hackers_watchLuke Shumaker