Menu

#3 other users access (-x)

open
nobody
None
5
2014-08-26
2003-12-17
Anonymous
No

add debug to command line (-D)
add "other users" command line (-x , same as fusemount,
requires root uid per fusemount requirement)

jpgarcia/at/execpc/dot/com

==========================
diff -ru owfs-0.985p1.orig/src/c/owfs.c
owfs-0.985p1/src/c/owfs.c
--- owfs-0.985p1.orig/src/c/owfs.c Mon Oct 27 21:28:09 2003
+++ owfs-0.985p1/src/c/owfs.c Wed Dec 17 13:16:50 2003
@@ -71,6 +71,10 @@
char fuse_mountpoint = NULL;
int fuse_fd = -1 ;
char umount_cmd[1024] = "";
+const char fuse_mount_otherusers[]="-x";
+int fuse_mount_argc=0;
+const char
fuse_mount_argv[]={NULL,NULL,NULL};
+

/ ---------------------------------------------- /
/ Command line parsing and mount handler to FUSE /
@@ -86,7 +90,7 @@
{
char c ;
// while ( (c=getopt(argc,argv,"p:dhs")) != -1 ) {
- while ( (c=getopt(argc,argv,"d:ht:CFRK")) != -1 ) {
+ while ( (c=getopt(argc,argv,"Dxd:ht:CFRK")) != -1 ) {
switch (c) {
// case 's':
// multithreaded = 0 ;
@@ -104,12 +108,15 @@
" -C | -F | -K | -R Temperature scale
Celsius(default)|Fahrenheit|Kelvin|Rankine\n",
argv[0],argv[0] ) ;
ow_exit(1);
+ case 'x':
+
fuse_mount_argv[fuse_mount_argc++]=fuse_mount_otherusers;
+ break;
case 't':
Timeout( optarg ) ;
break ;
-// case 'd':
-// flags |= FUSE_DEBUG;
-// break ;
+ case 'D':
+ flags |= FUSE_DEBUG;
+ break ;
case 'd':
com_tried = COM_open( optarg ) ;
break ;
@@ -160,11 +167,11 @@
if(tmpstr != NULL)
strncpy(umount_cmd, tmpstr,
sizeof(umount_cmd) - 1);
fuse_mountpoint = strdup(argv[optind]);
- fuse_fd = fuse_mount(fuse_mountpoint, NULL);
+ fuse_fd = fuse_mount(fuse_mountpoint,
fuse_mount_argv);
if(fuse_fd == -1) ow_exit(1);
} else {
fuse_mountpoint = strdup(argv[optind]);
- fuse_fd = fuse_mount(fuse_mountpoint, NULL);
+ fuse_fd = fuse_mount(fuse_mountpoint,
fuse_mount_argv);
if(fuse_fd == -1) ow_exit(1);
}

====================

Discussion