chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab5919f
)
install: fix incorrect 'Access denied' message with a non-existent unit
author
Michal Schmidt
<mschmidt@redhat.com>
Thu, 9 Feb 2012 09:36:56 +0000
(10:36 +0100)
committer
Michal Schmidt
<mschmidt@redhat.com>
Thu, 9 Feb 2012 09:36:56 +0000
(10:36 +0100)
With "systemctl is-enabled non-existent.service"
_UNIT_FILE_STATE_INVALID (-1) was wrongly interpreted as -errno.
Return -ENOENT in this case.
https://bugzilla.redhat.com/show_bug.cgi?id=766579
src/install.c
patch
|
blob
|
history
diff --git
a/src/install.c
b/src/install.c
index 1fb1f9d5800e7fc3ccad1b6c222be0058bfdbd18..174d79bab6bc3eb72de371fe968465fb5968927c 100644
(file)
--- a/
src/install.c
+++ b/
src/install.c
@@
-1571,10
+1571,10
@@
UnitFileState unit_file_get_state(
}
if (lstat(path, &st) < 0) {
+ r = -errno;
if (errno == ENOENT)
continue;
- r = -errno;
goto finish;
}