[prev in list] [next in list] [prev in thread] [next in thread] 

List:       klik-devel
Subject:    [klik-devel] [klikclient commit] r1631 -
From:       codesite-noreply () google ! com
Date:       2008-07-30 0:20:52
Message-ID: 001636458d88ace0d6045332bafb () google ! com
[Download RAW message or body]

Author: lionel.tricon
Date: Tue Jul 29 09:15:22 2008
New Revision: 1631

Modified:
   trunk/client/trunk/kfakechroot/src/libfakechroot.c

Log:
Fixed a failure when trying to read symbolic links from jails


Modified: trunk/client/trunk/kfakechroot/src/libfakechroot.c
==============================================================================
--- trunk/client/trunk/kfakechroot/src/libfakechroot.c	(original)
+++ trunk/client/trunk/kfakechroot/src/libfakechroot.c	Tue Jul 29 
09:15:22 2008
@@ -2237,6 +2237,7 @@
 {
     int v_status, v_dirfd, i;
     char tmp[FAKECHROOT_MAXPATH], ppath[FAKECHROOT_MAXPATH];
+    char cwd_path[FAKECHROOT_MAXPATH];
     char *fakechroot_path, *fakechroot_ptr;
     DIR *v_dir;
 if (getenv("FAKECHROOT_DEBUG")) fprintf(stderr, "# readlink(%s)\n", path);
@@ -2249,8 +2250,14 @@
     if (v_dir != NULL) {
         v_dirfd = dirfd(v_dir);
         if (v_dirfd != -1) {
-            if (path[0] == '/') strcpy(ppath, &(path[1]));
-            else strcpy(ppath, path);
+            if (path[0] == '/') strcpy(ppath, path);
+            else
+            {
+                next_getcwd(cwd_path, FAKECHROOT_MAXPATH);
+                strcpy(ppath, &(cwd_path[1]));
+                strcat(ppath, "/");
+                strcat(ppath, path);
+            }
             i = strlen(ppath);
             if (i>0 && ppath[i-1]=='/') ppath[i-1]='\0';
              if ((v_status = readlinkat(v_dirfd, ppath, tmp, 
bufsiz)) != -1) {
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic