Text   |  XML   |  ReML   |   Visible Warnings:

File System Race Condition  at mkdir-parents.c:35

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

mkdir_chown_full

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mkdir-parents.c)expand/collapse
Show more  
 14  mkdir_chown_full(const char *path, mode_t mode, uid_t uid,
 15                   gid_t gid, const char *gid_origin)
 16  {
 17          string_t *str;
 18          mode_t old_mask;
 19          int ret, orig_errno;
 20   
 21          old_mask = umask(0);
 22          ret = mkdir(path, mode);
 23          umask(old_mask);
 24   
 25          if (ret < 0) {
 26                  if (errno == EISDIR || errno == ENOSYS) {
 27                          /* EISDIR check is for BSD/OS which returns it if path 
 28                             contains '/' at the end and it exists.
 29   
 30                             ENOSYS check is for NFS mount points. */
 31                          errno = EEXIST;
 32                  }
 33                  return -1;
 34          }
 35          if (chown(path, uid, gid) < 0) {
Show more  




Change Warning 7114.24762 : File System Race Condition

Priority:
State:
Finding:
Owner:
Note: