aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.go b/main.go
index 5e9811d..b085e2f 100644
--- a/main.go
+++ b/main.go
@@ -65,6 +65,7 @@ type State struct {
type Entry map[string][]string
var configFlag = flag.String("config", "./config.json", "Configuration file path")
+var resyncFlag = flag.Bool("resync", false, "Check and re-synchronize memberOf values before launch")
func readConfig(logger *log.Logger) Config {
config_file := ConfigFile{
@@ -171,6 +172,13 @@ func main() {
logger.Fatal(err)
}
+ if *resyncFlag {
+ err = bottin.memberOfResync()
+ if err != nil {
+ logger.Fatal(err)
+ }
+ }
+
// Create routes
routes := ldap.NewRouteMux()
@@ -267,7 +275,7 @@ func (server *Server) init() error {
base_attributes := Entry{
"objectClass": []string{"top", "dcObject", "organization"},
- "structuralObjectClass": []string{"Organization"},
+ "structuralObjectClass": []string{"organization"},
ATTR_CREATORSNAME: []string{server.config.Suffix},
ATTR_CREATETIMESTAMP: []string{genTimestamp()},
ATTR_ENTRYUUID: []string{genUuid()},