diff options
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/privileges.c | 29 | ||||
-rw-r--r-- | wsutil/privileges.h | 9 |
2 files changed, 0 insertions, 38 deletions
diff --git a/wsutil/privileges.c b/wsutil/privileges.c index 2ce1cf33e9..3fee9d7927 100644 --- a/wsutil/privileges.c +++ b/wsutil/privileges.c @@ -71,8 +71,6 @@ init_process_policies(void) PSetProcessDEPPolicy(PROCESS_DEP_ENABLE); } } - - npf_sys_is_running(); } /* @@ -127,33 +125,6 @@ get_cur_groupname(void) { return groupname; } -/* - * If npf.sys is running, return TRUE. - */ -gboolean -npf_sys_is_running() { - SC_HANDLE h_scm, h_serv; - SERVICE_STATUS ss; - - h_scm = OpenSCManager(NULL, NULL, 0); - if (!h_scm) - return FALSE; - - h_serv = OpenService(h_scm, _T("npf"), SC_MANAGER_CONNECT|SERVICE_QUERY_STATUS); - if (!h_serv) { - h_serv = OpenService(h_scm, _T("npcap"), SC_MANAGER_CONNECT|SERVICE_QUERY_STATUS); - if (!h_serv) - return FALSE; - } - - if (QueryServiceStatus(h_serv, &ss)) { - if (ss.dwCurrentState & SERVICE_RUNNING) - return TRUE; - } - return FALSE; -} - - #else /* _WIN32 */ #ifdef HAVE_SYS_TYPES_H diff --git a/wsutil/privileges.h b/wsutil/privileges.h index a8b89dbe27..8ed8e5480a 100644 --- a/wsutil/privileges.h +++ b/wsutil/privileges.h @@ -71,15 +71,6 @@ WS_DLL_PUBLIC gchar *get_cur_username(void); */ WS_DLL_PUBLIC gchar *get_cur_groupname(void); -#ifdef _WIN32 -/** - * Check to see if npf.sys is running. - * @return TRUE if npf.sys is running, FALSE if it's not or if there was - * an error checking its status. - */ -WS_DLL_PUBLIC gboolean npf_sys_is_running(); -#endif - #ifdef __cplusplus } #endif /* __cplusplus */ |