summaryrefslogtreecommitdiff
path: root/lib/sysinit
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2019-01-11 09:31:34 +1100
committerMartin Thomson <martin.thomson@gmail.com>2019-01-11 09:31:34 +1100
commitb2467c62beddd663098e8fc5b0777b04e9996358 (patch)
tree3fb78b0ad2e4ca3901f3b3f5160604d36253104f /lib/sysinit
parentd08af9bc172142bcc6a987e1600110aba2955182 (diff)
downloadnss-hg-b2467c62beddd663098e8fc5b0777b04e9996358.tar.gz
Bug 1519228 - Remove dead code from nsssysinit.c, r=ueno
Diffstat (limited to 'lib/sysinit')
-rw-r--r--lib/sysinit/nsssysinit.c54
1 files changed, 3 insertions, 51 deletions
diff --git a/lib/sysinit/nsssysinit.c b/lib/sysinit/nsssysinit.c
index 2572141a3..bd0fac2f4 100644
--- a/lib/sysinit/nsssysinit.c
+++ b/lib/sysinit/nsssysinit.c
@@ -15,11 +15,10 @@
* of pkcs11 modules common to all applications.
*/
-/*
- * OS Specific function to get where the NSS user database should reside.
- */
+#ifndef LINUX
+#error __FILE__ only builds on Linux.
+#endif
-#ifdef XP_UNIX
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -150,44 +149,6 @@ userCanModifySystemDB()
return (access(NSS_DEFAULT_SYSTEM, W_OK) == 0);
}
-#else
-#ifdef XP_WIN
-static char *
-getUserDB(void)
-{
- /* use the registry to find the user's NSS_DIR. if no entry exists, create
- * one in the users Appdir location */
- return NULL;
-}
-
-static char *
-getSystemDB(void)
-{
- /* use the registry to find the system's NSS_DIR. if no entry exists, create
- * one based on the windows system data area */
- return NULL;
-}
-
-static PRBool
-userIsRoot()
-{
- /* use the registry to find if the user is the system administrator. */
- return PR_FALSE;
-}
-
-static PRBool
-userCanModifySystemDB()
-{
- /* use the registry to find if the user has administrative privilege
- * to modify the system's nss database. */
- return PR_FALSE;
-}
-
-#else
-#error "Need to write getUserDB, SystemDB, userIsRoot, and userCanModifySystemDB functions"
-#endif
-#endif
-
static PRBool
getFIPSEnv(void)
{
@@ -203,7 +164,6 @@ getFIPSEnv(void)
}
return PR_FALSE;
}
-#ifdef XP_LINUX
static PRBool
getFIPSMode(void)
@@ -228,14 +188,6 @@ getFIPSMode(void)
return PR_TRUE;
}
-#else
-static PRBool
-getFIPSMode(void)
-{
- return getFIPSEnv();
-}
-#endif
-
#define NSS_DEFAULT_FLAGS "flags=readonly"
/* configuration flags according to