]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip vrf: Fix run-on error message on mkdir failure
authorDavid Ahern <dsa@cumulusnetworks.com>
Fri, 6 Jan 2017 00:22:21 +0000 (16:22 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 9 Jan 2017 20:13:08 +0000 (12:13 -0800)
Andy reported a missing newline if a non-root user attempts to run
'ip vrf exec':

$ ./ip/ip vrf exec default /bin/echo asdf
mkdir failed for /var/run/cgroup2: Permission deniedFailed to setup vrf cgroup2 directory

Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
lib/fs.c

index 39cc96dccca975cadabba43965b90ac3bcc7ec46..644bb486ae8edbf88258a06a21442d75a29a1b9b 100644 (file)
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -121,7 +121,7 @@ int make_path(const char *path, mode_t mode)
 
                        if (mkdir(dir, mode) != 0) {
                                fprintf(stderr,
-                                       "mkdir failed for %s: %s",
+                                       "mkdir failed for %s: %s\n",
                                        dir, strerror(errno));
                                goto out;
                        }