Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crazy shfs behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xsteadfastx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 132
Location: germany/belgium

PostPosted: Thu Mar 10, 2005 6:05 pm    Post subject: crazy shfs behavior Reply with quote

when i mount one directory on my server with shfsmount this process starts

Code:
marv@eden marv $ ps aux|grep perl                                                                                           
root      7524  0.0  1.6   5700  4204 ?        S    18:52   0:00 /usr/bin/perl -w /usr/sbin/ddclient
marv      7989  1.2  1.0   4164  2612 ?        Ss   19:02   0:00 perl -e use POSIX qw(mktime);?use Fcntl;?use IO::File;?my $ROOT;?my ($PRELIM) = ("### 100\n");?my ($COMPLETE, $NOP, $NOTEMPTY) = ("### 200\n", "### 201\n", "### 202\n");?my ($CONTINUE, $TRANSIENT) = ("### 300\n", "### 400\n");?my ($ERROR, $EPERM, $ENOSPC, $ENOENT) = ("### 500\n", "### 501\n", "### 502\n", "### 503\n");?my $STABLE = "";?my $PRESERVE = 0;?sub s_init()?{??my $args = $_[0];??my $s;??$ENV{'TZ'} = 'GMT';??$ENV{'LC_ALL'} = 'POSIX';??$s = shift @$args;??if ($s eq '') {???$ROOT = $ENV{'HOME'};??} else {???$ROOT = "$s";??}??while (($s = shift @$args)) {???if ($s eq "stable") {????$STABLE = "L";???} elsif ($s eq "preserve") {????$PRESERVE = 1;???}??}??print($COMPLETE);?}?sub s_finish()?{??print($COMPLETE);?}?sub s_lsdir()?{??my $args = $_[0];??my $dir = $$args[0];??my $result;??if (not -d "$ROOT$dir") {???print($ENOENT);???return;??}??if (system("ls", "-lan$STABLE", "$ROOT$dir") != 0) {???print($EPERM);???return;??}??print($COMPLETE);?}?sub s_stat()?{??my $args = $_[0];??my $dir = $$args[0];??my $result;??if (not -e "$ROOT$dir") {???print($ENOENT);???return;??}??if (system("ls", "-land$STABLE", "$ROOT$dir") != 0) {???print($EPERM);???return;??}??print($COMPLETE);?}?sub s_open()?{??my $args = $_[0];??my ($file, $mode) = ($$args[0], $$args[1]);??my $openmode = 0;??my ($data, $result);??$openmode = O_RDONLY if ($mode eq "R");??$openmode = O_WRONLY if ($mode eq "W");??$openmode = O_RDWR if ($mode eq "RW");??if (not sysopen(FD, "$ROOT$file", $openmode)) {???if (-e "$ROOT$file") {????print($EPERM);???} else {????print($ENOENT);???}???return;??}??if (-s "$ROOT$file") {???print($COMPLETE);???close FD;???return;??}??if (sysread(FD, $data, 1) == 1) {???print($NOTEMPTY);??} else {???print($COMPLETE);??}??close FD;?}?sub s_read()?{??my $args = $_[0];??my ($file, $off, $size) = ($$args[0], $$args[1], $$args[2]);??my ($result, $data, $o, $s);??if (not sysopen(FD, "$ROOT$file", O_RDONLY)) {???if (-e "$ROOT$file") {????print($EPERM);???} else {????print($COMPLETE);???}???return;??}??sysseek(FD, $off, 0);??$o = 0; $s = $size;??$result = sysread(FD, $data, $size, 0);??while (defined $result and $result > 0) {???$o += $result; $s -= $result;???$result = sysread(FD, $data, $s, $o);??}??close FD;??if (defined $result) {?select STDOUT; $| = 0;???print($PRELIM);???print("$data"."\000"x($size-$o));?select STDOUT; $| = 1;???print($COMPLETE);??} else {???print($ERROR);??}?}?sub s_sread()?{??my $args = $_[0];??my ($file, $off, $size) = ($$args[0], $$args[1], $$args[2]);??my ($result, $data, $o, $s);??if (not sysopen(FD, "$ROOT$file", O_RDONLY)) {???if (-e "$ROOT$file") {????print($EPERM);???} else {????print($COMPLETE);???}???return;??}??sysseek(FD, $off, 0);??$o = 0; $s = $size;??$result = sysread(FD, $data, $size, 0);??while (defined $result and $result > 0) {???$o += $result; $s -= $result;???$result = sysread(FD, $data, $s, $o);??}??close FD;??if (defined $result) {???print($PRELIM);???print("$o");???print("$data");???print($COMPLETE);??} else {???print($ERROR);??}?}?sub s_write()?{??my $args = $_[0];??my ($file, $off, $size) = ($$args[0], $$args[1], $$args[2]);??my ($result, $data, $o, $s);??if (not sysopen(FD, "$ROOT$file", O_WRONLY)) {???if (-e "$ROOT$file") {????print($EPERM);???} else {????print($COMPLETE);???}???return;??}??sysseek(FD, $off, 0);??print($PRELIM);??$o = 0; $s = $size;??$result = sysread(STDIN, $data, $size);??while (defined $result and $result > 0) {???$o += $result; $s -= $result;???$result = sysread(STDIN, $data, $s, $o);??}??if (not defined $result) {???print($ERROR);???close FD;???return;??}????$o = 0; $s = $size;??$result = syswrite(FD, $data, $size, 0);??while (defined $result and $result > 0 and $o+$result < $size) {???$o += $result; $s -= $result;???$result = syswrite(FD, $data, $s, $o);??}??close FD;??if (defined $result) {???print($COMPLETE);??} else {???print($ERROR);??}?}?sub s_mkdir()?{??my $args = $_[0];??my $dir = $$args[0];??if (mkdir("$ROOT$dir", 0777)) {???print($COMPLETE);??} else {???print($EPERM);??}?}?sub s_rmdir()?{??my $args = $_[0];??my $dir = $$args[0];??if (not -d "$ROOT$dir") {???print($EN
marv      7995  0.0  0.1   1404   464 pts/0    R+   19:02   0:00 grep perl


when i use normal scp nothing shows up. does somebody has a idea? i checked my logs...does not look like someone broke into my computer and isntalled something....

thank you for any ideas
_________________
[ http://www.xsteadfastx.de ]
Back to top
View user's profile Send private message
xsteadfastx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 132
Location: germany/belgium

PostPosted: Thu Mar 10, 2005 8:53 pm    Post subject: Reply with quote

i think its normal cause i read shfs uses a perl backend to hold the ssh connection
_________________
[ http://www.xsteadfastx.de ]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum