summaryrefslogtreecommitdiffstats
path: root/lib/ext2fs/ismounted.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 04:59:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 04:59:33 +0000
commit857a92991db30f538ea8858a2dfda0fe606353e3 (patch)
treedcf97aa3a41925c05670bb640cdd495fc1083f72 /lib/ext2fs/ismounted.c
parentAdding debian version 1.47.0-2.4. (diff)
downloade2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.tar.xz
e2fsprogs-857a92991db30f538ea8858a2dfda0fe606353e3.zip
Merging upstream version 1.47.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ext2fs/ismounted.c')
-rw-r--r--lib/ext2fs/ismounted.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
index a7db1a5..c1c3102 100644
--- a/lib/ext2fs/ismounted.c
+++ b/lib/ext2fs/ismounted.c
@@ -108,7 +108,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
if ((f = setmntent (mtab_file, "r")) == NULL) {
if (errno == ENOENT) {
- if (getenv("EXT2FS_NO_MTAB_OK"))
+ if (ext2fs_safe_getenv("EXT2FS_NO_MTAB_OK"))
return 0;
else
return EXT2_ET_NO_MTAB_FILE;
@@ -366,15 +366,15 @@ errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
errcode_t retval = 0;
int busy = 0;
- if (getenv("EXT2FS_PRETEND_RO_MOUNT")) {
+ if (ext2fs_safe_getenv("EXT2FS_PRETEND_RO_MOUNT")) {
*mount_flags = EXT2_MF_MOUNTED | EXT2_MF_READONLY;
- if (getenv("EXT2FS_PRETEND_ROOTFS"))
+ if (ext2fs_safe_getenv("EXT2FS_PRETEND_ROOTFS"))
*mount_flags = EXT2_MF_ISROOT;
return 0;
}
- if (getenv("EXT2FS_PRETEND_RW_MOUNT")) {
+ if (ext2fs_safe_getenv("EXT2FS_PRETEND_RW_MOUNT")) {
*mount_flags = EXT2_MF_MOUNTED;
- if (getenv("EXT2FS_PRETEND_ROOTFS"))
+ if (ext2fs_safe_getenv("EXT2FS_PRETEND_ROOTFS"))
*mount_flags = EXT2_MF_ISROOT;
return 0;
}