From 59979a4896044a70523827534028259f886e53cc Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Fri, 8 Jun 2018 22:55:50 -0700 Subject: [PATCH] Took out system() debugging again --- go_login.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/go_login.go b/go_login.go index 4961654..ca8fa0f 100644 --- a/go_login.go +++ b/go_login.go @@ -19,7 +19,7 @@ package go_login // // //void pututmp(struct utmpx* entry, char* name, char* host) { -// int32_t stat = system("echo ---- pre ----;who"); +// //int32_t stat = system("echo ---- pre ----;who"); // // entry->ut_type = USER_PROCESS; // entry->ut_pid = getpid(); @@ -34,7 +34,7 @@ package go_login // setutxent(); // pututxline(entry); // -// stat = system("echo ---- post ----;who"); +// //stat = system("echo ---- post ----;who"); //} // //void unpututmp(struct utmpx* entry) { @@ -45,7 +45,7 @@ package go_login // setutxent(); // pututxline(entry); // -// int32_t stat = system("echo ---- cleanup ----;who; lastlog"); +// //int32_t stat = system("echo ---- cleanup ----;who; lastlog"); // // endutxent(); //} @@ -69,7 +69,7 @@ package go_login // int fd = fileno(f); // if( write(fd, &l, sizeof(l)) == sizeof(l) ) { // retval = 1; -// int32_t stat = system("echo ---- lastlog ----; lastlog"); +// //int32_t stat = system("echo ---- lastlog ----; lastlog"); // } // } // fclose(f); @@ -108,6 +108,7 @@ func Put_lastlog_entry(app string, usr string, host string) { fmt.Sscanf(u.Uid, "%d", &uid) t := time.Now().Unix() - stat := C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host)) - fmt.Println("stat was:",stat) + _ = C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host)) + //stat := C.putlastlogentry(C.int64_t(t), C.int(uid), C.CString(app), C.CString(host)) + //fmt.Println("stat was:",stat) }