[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r971 -
From: codesite-noreply () google ! com
Date: 2008-01-31 2:29:42
Message-ID: 000e0cd147dc0444fb6e2eedfb896d7 () google ! com
[Download RAW message or body]
Author: KillerKiwi2005
Date: Wed Jan 30 18:29:36 2008
New Revision: 971
Modified:
trunk/virtualization/unionfuse/trunk/klikfuse/src/fs.c
trunk/virtualization/unionfuse/trunk/klikfuse/src/fusemain.c
Log:
Added -d to jail dot files... im not 100% its correct if linoel could
check it over.. it at least dsont break anything elase as far as I can tell
Modified: trunk/virtualization/unionfuse/trunk/klikfuse/src/fs.c
==============================================================================
--- trunk/virtualization/unionfuse/trunk/klikfuse/src/fs.c (original)
+++ trunk/virtualization/unionfuse/trunk/klikfuse/src/fs.c Wed Jan 30
18:29:36 2008
@@ -266,6 +266,14 @@
return 0;
}
+ // -d support
+ if ((p_path[_size_home_path-2]=='/' &&
p_path[_size_home_path-1]=='.') && !strncmp(p_path,_home_path,_size_home_path))
+ {
+ strcpy(*p_newpath, _sandbox_path);
+ strcat(*p_newpath, &(p_path[_size_home_path]));
+ return 0;
+ }
+
// -b support
if ((v_size==_size_home_path || p_path[_size_home_path]=='/') && \
!strncmp(p_path,_home_path,_size_home_path)) {
@@ -273,7 +281,7 @@
strcat(*p_newpath, &(p_path[_size_home_path]));
return 0;
}
-
+
*p_newpath = (char*)p_path;
return 1;
}
Modified: trunk/virtualization/unionfuse/trunk/klikfuse/src/fusemain.c
==============================================================================
--- trunk/virtualization/unionfuse/trunk/klikfuse/src/fusemain.c (original)
+++ trunk/virtualization/unionfuse/trunk/klikfuse/src/fusemain.c Wed
Jan 30 18:29:36 2008
@@ -524,6 +524,7 @@
" -h -- print this screen\n"
" -u -- union mounting feature for klik2
(forced if -b or -B)\n"
" -b <path> -- sandbox feature for klik2
(redirect all modification from $HOME to <path>)\n"
+ " -d <path> -- sandbox feature for klik2
(redirect all modification from $HOME dot files and folders to <path>)\n"
" -B <path> -- sandbox feature for klik2
(redirect all modification to <path>)\n"
"\nCommon FUSE library options are:\n"
" -f -- run in foreground, do not daemonize\n"
@@ -585,6 +586,26 @@
}
}
break;
+
+ case 'd':
+ _union_mounting = true;
+ _sandbox_mounting = true;
+ if (optarg)
+ {
+ _sandbox_path=optarg;
+ _size_sandbox_path = strlen( _sandbox_path );
+ passwd = getpwuid( getuid() );
+ if (passwd && passwd->pw_dir)
+ {
+ _size_home_path = strlen( passwd->pw_dir );
+ _home_path = malloc( _size_home_path+3 );
+ strcpy( _home_path, passwd->pw_dir );
+ strcat(_home_path, "/.");
+ }
+ }
+ break;
+
+
case 'B':
_union_mounting = true;
_sandbox_mounting = true;
_______________________________________________
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