]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
lxc: Improve session config error message
authorAlessandro Astone <ales.astone@gmail.com>
Sun, 22 Jan 2023 18:29:41 +0000 (19:29 +0100)
committerAlessandro Astone <ales.astone@gmail.com>
Sun, 22 Jan 2023 18:29:41 +0000 (19:29 +0100)
tools/helpers/lxc.py

index 0221d0b46aa49c0948a96e9f1e3f32d26c204f0c..3f7ad74360828853f2b3bb7fd0b0b628c2ca680b 100644 (file)
@@ -181,11 +181,11 @@ def generate_session_lxc_config(args, session):
     nodes = []
     def make_entry(src, dist=None, mnt_type="none", options="rbind,create=file 0 0"):
         if any(x in src for x in ["\n", "\r"]):
     nodes = []
     def make_entry(src, dist=None, mnt_type="none", options="rbind,create=file 0 0"):
         if any(x in src for x in ["\n", "\r"]):
-            logging.warning("User-provided mount path contains illegal character")
+            logging.warning("User-provided mount path contains illegal character: " + src)
             return False
         if dist is None and (not os.path.exists(src) or
                              str(os.stat(src).st_uid) != session["user_id"]):
             return False
         if dist is None and (not os.path.exists(src) or
                              str(os.stat(src).st_uid) != session["user_id"]):
-            logging.warning("User-provided mount path is not owned by user")
+            logging.warning("User-provided mount path is not owned by user: " + src)
             return False
         return add_node_entry(nodes, src, dist, mnt_type, options, check=False)
 
             return False
         return add_node_entry(nodes, src, dist, mnt_type, options, check=False)