package hackers_git import ( "inotify" "nslcd_proto" "nslcd_proto/util" "nslcd_systemd" "sd_daemon/logger" "sync" ) type user struct { passwd nslcd_proto.Passwd pwhash string groups []string } type Config struct { Pam_password_prohibit_message string Yamldir string } type Hackers struct { util.NullBackend cfg Config lock sync.RWMutex users map[int32]user passwords map[int32]string in_fd *inotify.Inotify in_wd_home inotify.Cint in_wd_yaml inotify.Cint in_uid2wd map[int32]inotify.Cint in_wd2uid map[inotify.Cint]int32 } var _ nslcd_systemd.Backend = &Hackers{} var _ nslcd_proto.Backend = &Hackers{} func (o *Hackers) Close() { logger.Info("Closing hackers.git session") o.lock.Lock() defer o.lock.Unlock() o.close() } func (o *Hackers) Reload() error { logger.Info("Loading hackers.git session") o.lock.Lock() defer o.lock.Unlock() return o.reload() }