git.samba.org
/
slow
/
toolbox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add procfd.c with gpfs_set_winattrs_path()
[slow/toolbox.git]
/
simulate afpsrv enumerate with perl.pl
1
#!/usr/bin/perl
2
3
if ($#ARGV != 0) {
4
print "Usage: enum.pl <dir>\n";
5
exit 1;
6
}
7
8
my $testdir = $ARGV[0];
9
my $i;
10
my $dir;
11
my $res;
12
my ($first);
13
14
chdir "$testdir";
15
16
$i = 1;
17
until ($i == 500) {
18
$dir = "dir" . $i;
19
$res = ".rsrc" . "/" . $dir;
20
stat ($dir) || die "stat $dir failed";
21
if (stat ($res)) {
22
open (FILE, "<$res") || die "open $res failed";
23
read (FILE, $first, 64);
24
close (FILE);
25
} else {
26
print "stat $res failed";
27
exit 1;
28
}
29
$i++;
30
}