Changeset 3211e8e in rtems


Ignore:
Timestamp:
Nov 24, 2014, 8:18:16 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
d152024
Parents:
630642e
git-author:
Joel Sherrill <joel.sherrill@…> (11/24/14 20:18:16)
git-committer:
Joel Sherrill <joel.sherrill@…> (11/25/14 18:57:09)
Message:

cpukit/libcsupport/src/pwdgrp.c: Check return value

Coverity Id 1255518. mkdir() could fail. Check return value and return
on failure. Behavior is similar to if open() failed while writing the
files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/pwdgrp.c

    r630642e r3211e8e  
    6262static void pwdgrp_init(void)
    6363{
    64   mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
     64  int rc;
     65
     66  rc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
     67  if ( rc != 0 )
     68    return;
    6569
    6670  /*
Note: See TracChangeset for help on using the changeset viewer.