Skip to content

Commit

Permalink
Bug 1519228 - Remove dead code from nsssysinit.c, r=ueno
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 1e52d1fa3bf54eb44e274b9fd089b8903a1b7cd3
extra : amend_source : 9205ef42369f617ed47c68b1d498b7ec96149547
  • Loading branch information
martinthomson committed Jan 10, 2019
1 parent 24dd141 commit 7cbbae6
Showing 1 changed file with 3 additions and 51 deletions.
54 changes: 3 additions & 51 deletions lib/sysinit/nsssysinit.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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)
{
Expand All @@ -203,7 +164,6 @@ getFIPSEnv(void)
}
return PR_FALSE;
}
#ifdef XP_LINUX

static PRBool
getFIPSMode(void)
Expand All @@ -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
Expand Down

0 comments on commit 7cbbae6

Please sign in to comment.