summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Withers <nick.withers@anu.edu.au>2015-02-20 15:00:47 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-20 08:56:25 +0100
commit5eb27ce4095c85451964db5f83d10df12ab037db (patch)
tree262f6d45e35eb9cf10b3453b634a52a45551b125
parentdoc: Note that rename() is only partially implemented. (diff)
downloadrtems-5eb27ce4095c85451964db5f83d10df12ab037db.tar.bz2
Don't fail to create passwd and group files if /etc already exists
-rw-r--r--cpukit/libcsupport/src/pwdgrp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/pwdgrp.c b/cpukit/libcsupport/src/pwdgrp.c
index a5526a094d..b184ea8e96 100644
--- a/cpukit/libcsupport/src/pwdgrp.c
+++ b/cpukit/libcsupport/src/pwdgrp.c
@@ -61,11 +61,10 @@ static void init_file(const char *name, const char *content)
*/
static void pwdgrp_init(void)
{
- int rc;
-
- rc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
- if ( rc != 0 )
- return;
+ /*
+ * Do the best to create this directory.
+ */
+ mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
/*
* Initialize /etc/passwd