File System Race Condition at unix-socket-create.c:27 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
unix_socket_create (/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/unix-socket-create.c)![]() | ||||||
![]() | ||||||
10 | int unix_socket_create(const char *path, int mode, | |||||
11 | uid_t uid, gid_t gid, int backlog) | |||||
12 | { | |||||
13 | mode_t old_umask; | |||||
14 | int fd; | |||||
15 | ||||||
16 | old_umask = umask(0777 ^ mode); | |||||
17 | [+] | fd = net_listen_unix_unlink_stale(path, backlog); | ||||
18 | umask(old_umask); | |||||
19 | ||||||
20 | if (fd < 0) { | |||||
21 | i_error("net_listen_unix(%s) failed: %m", path); | |||||
22 | return -1; | |||||
23 | } | |||||
24 | ||||||
25 | if (uid != (uid_t)-1 || gid != (gid_t)-1) { | |||||
26 | /* set correct */ | |||||
27 | if (chown(path, uid, gid) < 0) {
| |||||
![]() |