standalone-reset: use mkdir -p
PATCH 1/1 standalone-reset: use mkdir -p
--- standalone-reset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
standalone-reset +1 -1
@@ -49,7 +49,7 @@ fi ensure_dir () { if test -d "$1"; then return; fi - mkdir "$1" + mkdir -p "$1" } ensure_key () {
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Wei Liu writes ("[OSSTEST PATCH] standalone-reset: use mkdir -p"):
...
standalone-reset fi · line 52
Quoted 4 lines
ensure_dir() {standalone-reset +1
-1if test -d "$1"; then return; fi - mkdir "$1" + mkdir -p "$1"
This deliberately doesn't do this. Otherwise wrong (or partially missing) configuration can create strangely-named directories.
What missing parent directory did you want it to create ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH] standalone-reset: use mkdir -p"):
...standalone-reset fi · line 52
Quoted 4 lines
ensure_dir() {standalone-reset +1
-1if test -d "$1"; then return; fi - mkdir "$1" + mkdir -p "$1"This deliberately doesn't do this. Otherwise wrong (or partially missing) configuration can create strangely-named directories.
Quoted 2 lines
What missing parent directory did you want it to create ?
/tmp/wei/osstest/
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu writes ("Re: [OSSTEST PATCH] standalone-reset: use mkdir -p"):
Quoted 11 lines · Ian Jackson
Quoted 10 lines
Wei Liu writes ("[OSSTEST PATCH] standalone-reset: use mkdir -p"):
...standalone-reset fi · line 52
Quoted 4 lines
ensure_dir() {standalone-reset +1
-1if test -d "$1"; then return; fi - mkdir "$1" + mkdir -p "$1"This deliberately doesn't do this. Otherwise wrong (or partially missing) configuration can create strangely-named directories.
Quoted 3 lines
Quoted 1 line
What missing parent directory did you want it to create ?
/tmp/wei/osstest/
I guess I mean, which configuration option ? What was your configuration ? Did /tmp/wei exist ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 12 lines · Ian Jackson
Wei Liu writes ("Re: [OSSTEST PATCH] standalone-reset: use mkdir -p"):
Quoted 11 lines · Ian Jackson
Quoted 10 lines
Wei Liu writes ("[OSSTEST PATCH] standalone-reset: use mkdir -p"):
...standalone-reset fi · line 52
Quoted 4 lines
ensure_dir() {standalone-reset +1
-1if test -d "$1"; then return; fi - mkdir "$1" + mkdir -p "$1"This deliberately doesn't do this. Otherwise wrong (or partially missing) configuration can create strangely-named directories.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
What missing parent directory did you want it to create ?
/tmp/wei/osstest/I guess I mean, which configuration option ? What was your configuration ?
tftptmp=getconfig TftpTmpDirensure_dir "$tftp$tftptmp"
And $tftp is set to /tmp/ in my standalone config.
Quoted 1 line
Did
/tmp/weiexist ?
No.
Quoted 2 lines
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu writes ("Re: [OSSTEST PATCH] standalone-reset: use mkdir -p"):
Quoted 2 lines
tftptmp=
getconfig TftpTmpDirensure_dir"$tftp$tftptmp"
OK. I'm afraid I think if TftpTmpDir's parent does not exist, osstest should not create it automatically.
Quoted 1 line
And $tftp is set to
/tmp/in my standalone config.
As an aside: this habit of using /tmp as a personal playground is a really bad one.
It may be fine on your single-user workstation, but if it slips into any code or config which you ship to anyone else, it is a security problem.
You should probably create a ~/tmp.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel