Commit Graph

15 Commits

Author SHA1 Message Date
Samanta Navarro cb77628876 misc: fix typos [codespell]
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2020-11-04 11:42:25 +00:00
Karel Zak 3836cd2d21 lib: add missing headers to .c files
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-10-06 15:03:45 +02:00
Karel Zak e113093ce9 lib/env: add function to save and restore unwanted variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-08-25 10:43:07 +02:00
Karel Zak 9faba2114a include/nls: remove unnecessary declaration
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-04-22 10:27:12 +02:00
Sami Kerola ed292a08dd
include: add remove_entry() to env.h
A function to remove an command-line option argument, or environment
variable.

Requested-by: Karel Zak <kzak@redhat.com>
Reference: https://github.com/karelzak/util-linux/pull/1003#discussion_r403988092
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-04-13 12:14:08 +01:00
Sami Kerola 3d6fa8da69
tests: add sanitize_env() check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-04-13 12:14:08 +01:00
Sami Kerola 143ea06851 lib: remove _RLD_ from forbid environment variable list
The RLD environment variables are related to runtime linker vulnerability in
TELNET on systems running Silicon Graphics IRIX.  It is extremely unlikely
current util-linux would be compiled on such system.

Reference: http://www.cert.org/historical/advisories/CA-1995-14.cfm
Reference: http://signatures.juniper.net/documentation/signatures/TELNET%3AEXPLOIT%3ASGI-RLD.html
Refefence: http://www.polarhome.com/service/man/?qf=rld&tf=2&of=IRIX&sf=1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-06-14 12:23:42 +02:00
Cristian Rodríguez 075f4bfd34 build-sys: test for secure_getenv() too.
In current glibc versions, internal __secure_getenv
no longer exists and was replaced by secure_getenv()

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
2013-02-06 12:03:22 +01:00
Benno Schulenberg b50945d4ac textual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-02-06 11:15:02 +01:00
Sami Kerola 0e9b73d3fb build: fix redundant redeclaration warnings
env.c:24:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]
su.c:81:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]

fstab.c:581:14: warning: redundant redeclaration of 'strsignal' [-Wredundant-decls]

kill.h:1:13: note: previous declaration of 'get_pids' was here
kill.c:152:13: warning: redundant redeclaration of 'get_pids' [-Wredundant-decls]

kill.c:142:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]
getopt.c:89:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]

agetty.c:536:15: warning: redundant redeclaration of 'optarg' [-Wredundant-decls]
agetty.c:537:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
script.c:161:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
wall.c:96:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]

libmount.h:362:26: note: previous declaration of 'mnt_update_get_fs' was here
libmount.h:454:26: note: previous declaration of 'mnt_context_get_fs' was here
mountP.h:383:26: warning: redundant redeclaration of 'mnt_context_get_fs' [-Wredundant-decls]
mountP.h:398:26: warning: redundant redeclaration of 'mnt_update_get_fs' [-Wredundant-decls]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 19:51:35 +02:00
Sami Kerola fbc333fec0 build-sys: check HAVE_ definitions with #ifdef [smatch scan]
Fix to `warning: undefined preprocessor identifier' messages.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-02 18:21:46 +01:00
Karel Zak 035507c84b lib: [env] consolidate safe_getenv() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-03 12:28:48 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00