summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-10-26 16:10:50 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-10-26 16:10:50 -0400
commit2229078ac359bc872ae69629239011506f490587 (patch)
treea16efae24e46883a107c6977c915b2d32f3aaba5
parent82e3133de62a4e0a496ffcbdb91f998c53bc3f58 (diff)
dlfcn: return raw unsafe.Pointer
-rw-r--r--systemd/disable_nss_module.go5
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
}