]> git.ipfire.org Git - thirdparty/shadow.git/commit
adduser-old.c: Remove program 495/head
authorAlejandro Colomar <alx@kernel.org>
Fri, 7 Oct 2022 23:58:07 +0000 (01:58 +0200)
committerSerge Hallyn <serge@hallyn.com>
Mon, 17 Oct 2022 14:06:08 +0000 (09:06 -0500)
commit0336454503fb9b0fd6bce2690f8fa729186de252
tree2ed2ef6411106d5653217cf14fad4caa252e8072
parent16afe18142bf8e0ba8b315aac10526b8998fa98e
adduser-old.c: Remove program

This program has 10 calls to gets(3) according to grep(1).  That
makes it a very unsafe program which should not be used at all.
Let's kill the program already.

See what gets(3) has to say:

SYNOPSIS
       #include <stdio.h>

       [[deprecated]] char *gets(char *s);

DESCRIPTION
       Never use this function.

       ...

BUGS
       Never use gets().  Because it is impossible to tell with‐
       out knowing the  data  in  advance  how  many  characters
       gets()  will  read,  and  because gets() will continue to
       store characters past the end of the buffer,  it  is  ex‐
       tremely dangerous to use.  It has been used to break com‐
       puter security.  Use fgets() instead.

       For more information, see CWE‐242 (aka "Use of Inherently
       Dangerous Function") at http://cwe.mitre.org/data/defini‐
       tions/242.html

Acked-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
contrib/Makefile.am
contrib/adduser-old.c [deleted file]