shadow/src
Iker Pedrosa 8281c82e32 usermod.c: fix covscan RESOURCE_LEAK
Error: RESOURCE_LEAK (CWE-772): [#def31]
shadow-4.8.1/src/usermod.c:813: alloc_fn: Storage is returned from allocation function "__gr_dup".
shadow-4.8.1/src/usermod.c:813: var_assign: Assigning: "ngrp" = storage returned from "__gr_dup(grp)".
shadow-4.8.1/src/usermod.c:892: leaked_storage: Variable "ngrp" going out of scope leaks the storage it points to.
  890|   		}
  891|   	}
  892|-> }
  893|
  894|   #ifdef SHADOWGRP

Error: RESOURCE_LEAK (CWE-772): [#def32]
shadow-4.8.1/src/usermod.c:933: alloc_fn: Storage is returned from allocation function "__sgr_dup".
shadow-4.8.1/src/usermod.c:933: var_assign: Assigning: "nsgrp" = storage returned from "__sgr_dup(sgrp)".
shadow-4.8.1/src/usermod.c:1031: leaked_storage: Variable "nsgrp" going out of scope leaks the storage it points to.
 1029|   		}
 1030|   	}
 1031|-> }
 1032|   #endif				/* SHADOWGRP */
 1033|

Error: RESOURCE_LEAK (CWE-772): [#def34]
shadow-4.8.1/src/usermod.c:1161: alloc_fn: Storage is returned from allocation function "getgr_nam_gid".
shadow-4.8.1/src/usermod.c:1161: var_assign: Assigning: "grp" = storage returned from "getgr_nam_gid(optarg)".
shadow-4.8.1/src/usermod.c:1495: leaked_storage: Variable "grp" going out of scope leaks the storage it points to.
 1493|   	}
 1494|   #endif				/* ENABLE_SUBIDS */
 1495|-> }
 1496|
 1497|   /*

Error: RESOURCE_LEAK (CWE-772): [#def35]
shadow-4.8.1/src/usermod.c:1991: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
shadow-4.8.1/src/usermod.c:1991: var_assign: Assigning: "fd" = handle returned from "open("/var/log/lastlog", 2)".
shadow-4.8.1/src/usermod.c:2000: noescape: Resource "fd" is not freed or pointed-to in "lseek".
shadow-4.8.1/src/usermod.c:2000: noescape: Resource "fd" is not freed or pointed-to in "read". [Note: The source code implementation of the function has been overridden by a builtin model.]
shadow-4.8.1/src/usermod.c:2003: noescape: Resource "fd" is not freed or pointed-to in "lseek".
shadow-4.8.1/src/usermod.c:2032: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
 2030|   		}
 2031|   	}
 2032|-> }
 2033|
 2034|   /*

Error: RESOURCE_LEAK (CWE-772): [#def36]
shadow-4.8.1/src/usermod.c:2052: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
shadow-4.8.1/src/usermod.c:2052: var_assign: Assigning: "fd" = handle returned from "open("/var/log/faillog", 2)".
shadow-4.8.1/src/usermod.c:2061: noescape: Resource "fd" is not freed or pointed-to in "lseek".
shadow-4.8.1/src/usermod.c:2061: noescape: Resource "fd" is not freed or pointed-to in "read". [Note: The source code implementation of the function has been overridden by a builtin model.]
shadow-4.8.1/src/usermod.c:2064: noescape: Resource "fd" is not freed or pointed-to in "lseek".
shadow-4.8.1/src/usermod.c:2092: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
 2090|   		}
 2091|   	}
 2092|-> }
 2093|
 2094|   #ifndef NO_MOVE_MAILBOX
2021-06-11 11:50:49 +02:00
..
.gitignore Create a new libsubid 2020-06-07 12:11:58 -05:00
.indent.pro
chage.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
check_subid_range.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
chfn.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
chgpasswd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
chpasswd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
chsh.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
expiry.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
faillog.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
free_subid_range.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
get_subid_owners.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
gpasswd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
groupadd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
groupdel.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
groupmems.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
groupmod.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
groups.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
grpck.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
grpconv.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
grpunconv.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
id.c
lastlog.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
list_subid_ranges.c nss/libsubid: simplify the ranges variable for list_owner_ranges 2021-05-22 17:59:57 -05:00
login_nopam.c
login.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
logoutd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
Makefile.am subids: support nsswitch 2021-04-16 21:02:37 -05:00
new_subid_range.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
newgidmap.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
newgrp.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
newuidmap.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
newusers.c usermod, newusers, prefix: enforce absolute paths for homedir 2021-06-01 22:12:24 -05:00
nologin.c
passwd.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
pwck.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
pwconv.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
pwunconv.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
su.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
suauth.c
sulogin.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
useradd.c Merge pull request #327 from squat/bugfix_relative_prefix_path 2021-05-29 14:16:46 -05:00
userdel.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00
usermod.c usermod.c: fix covscan RESOURCE_LEAK 2021-06-11 11:50:49 +02:00
vipw.c libsubid: don't print error messages on stderr by default 2021-05-15 12:38:55 -05:00