projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d5e394
)
fstab-generator: fix new NULL dereference. (#6296)
author
NeilBrown
<neil@brown.name>
Thu, 6 Jul 2017 02:53:41 +0000
(12:53 +1000)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 6 Jul 2017 02:53:41 +0000
(22:53 -0400)
fstype can be NULL, particularly when called from add_sysroot_mount(),
so we need to use STRPTR_IN_SET().
src/fstab-generator/fstab-generator.c
patch
|
blob
|
history
diff --git
a/src/fstab-generator/fstab-generator.c
b/src/fstab-generator/fstab-generator.c
index
7688a75
..
ce9dccf
100644
(file)
--- a/
src/fstab-generator/fstab-generator.c
+++ b/
src/fstab-generator/fstab-generator.c
@@
-358,7
+358,7
@@
static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
- if (STR_IN_SET(fstype, "nfs", "nfs4") && !automount &&
+ if (STR
PTR
_IN_SET(fstype, "nfs", "nfs4") && !automount &&
fstab_test_yes_no_option(opts, "bg\0" "fg\0")) {
/* The default retry timeout that mount.nfs uses for 'bg' mounts
* is 10000 minutes, where as it uses 2 minutes for 'fg' mounts.