Displaying 2 results from an estimated 2 matches for "bad_systemd".
2018 Feb 07
1
[PATCH] tmpdirs: Make the ‘su broken’ error message actionable.
...,
+ char *(*getdir) (guestfs_h *g), int is_runtime_dir,
+ char **dest)
{
if (!*dest) {
CLEANUP_FREE char *tmpdir = getdir (g);
char *tmppath = safe_asprintf (g, "%s/libguestfsXXXXXX", tmpdir);
if (mkdtemp (tmppath) == NULL) {
- int bad_systemd = errno == EACCES && STRPREFIX (tmpdir, "/run/user/");
+ int bad_systemd = is_runtime_dir && errno == EACCES &&
+ STRPREFIX (tmpdir, "/run/user/");
if (!bad_systemd)
perrorf (g, _("%s: cannot create temporary directory&q...
2017 Dec 18
0
[PATCH] tmpdirs: Blame systemd because su is broken.
...r *(*getdir) (guestfs_h *g), char **dest)
CLEANUP_FREE char *tmpdir = getdir (g);
char *tmppath = safe_asprintf (g, "%s/libguestfsXXXXXX", tmpdir);
if (mkdtemp (tmppath) == NULL) {
- perrorf (g, _("%s: cannot create temporary directory"), tmppath);
+ int bad_systemd = errno == EACCES && STRPREFIX (tmpdir, "/run/user/");
+
+ if (!bad_systemd)
+ perrorf (g, _("%s: cannot create temporary directory"), tmppath);
+ else
+ error (g, _("%s: cannot create temporary directory. You may be hitting systemd bug http...