Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at main.c:93

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

get_uid

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/main.c)expand/collapse
Show more  
 78  static uid_t get_uid(const char *user)
 79  {
 80          struct passwd *pw;
 81   
 82          if (user == NULL)
 83                  return (uid_t)-1;
 84          if (is_numeric(user, '\0'))
 85                  return strtoul(user, NULL, 10);
 86   
 87          errno = 0;
 88          if ((pw = getpwnam(user)) == NULL) {
 89                  if (errno != 0)
 90                          i_fatal("User '%s' lookup failed: %m", user);
 91                  setpwent();
 92                  if (getpwent() == NULL) {
 93                          if (errno != 0)
 94                                  i_fatal("getpwent() failed: %m");
 95                          i_fatal("getpwnam() failed for some reason. "
 96                                  "Is auth_process_size set to too low?");
 97                  }
 98                  i_fatal("User doesn't exist: %s", user);
 99          }
 100          return pw->pw_uid;
 101  }
Show more  




Change Warning 7602.24459 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: