diff options
-rw-r--r-- | systemd/disable_nss_module.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/systemd/disable_nss_module.go b/systemd/disable_nss_module.go index c19ba0c..24d7f79 100644 --- a/systemd/disable_nss_module.go +++ b/systemd/disable_nss_module.go @@ -20,7 +20,6 @@ package nslcd_systemd import ( "dl" "sd_daemon/logger" - "unsafe" ) //static char *strary(char **ary, unsigned int n) { return ary[n]; } @@ -43,7 +42,7 @@ func disable_nss_module() { c_version_info, err := handle.Sym(nss_module_sym_version) if err == nil { - g_version_info := (**C.char)(unsafe.Pointer(c_version_info)) + g_version_info := (**C.char)(c_version_info) logger.Debug("NSS module %s version %s %s", nss_module_soname, C.GoString(C.strary(g_version_info, 0)), C.GoString(C.strary(g_version_info, 1))) @@ -55,6 +54,6 @@ func disable_nss_module() { logger.Warning("Unable to disable NSS ldap module for nslcd process: %v", err) return } - g_enable_flag := (*C.int)(unsafe.Pointer(c_enable_flag)) + g_enable_flag := (*C.int)(c_enable_flag) *g_enable_flag = 0 } |