functionality-test-suite-20020114
[openafs.git] / src / tests / aclcopy.pl
1 #!/usr/bin/env perl
2 use OpenAFS::CMU_copyright;
3 use OpenAFS::util qw(:DEFAULT %AFS_Help);
4 use OpenAFS::afsconf;
5 use OpenAFS::fs;
6 use OpenAFS::pts;
7 use OpenAFS::vos;
8 use OpenAFS::bos;
9
10 my ($wscell, $path, @pos1, @pos2, @neg1, @neg2, $ret, @tmp, @tmp2, @tmp3, $found, $path2);
11 &AFS_Init();
12 $wscell = &AFS_fs_wscell();
13 $found = 0;
14
15 eval { &AFS_pts_createuser(user1,,); };
16 $path = "/afs/${wscell}/service/acltest";
17 $path2 = "/afs/${wscell}/service/acltest2";
18 mkdir $path, 0777;
19 mkdir $path2, 0777;
20 ($pos1, $neg1) = &AFS_fs_getacl($path);
21 $ret = &AFS_fs_copyacl($path,[$path2],1);
22 ($pos2, $neg2) = &AFS_fs_getacl($path2);
23 if (@pos1 != @pos2) {
24     exit(1);
25 }
26 if (@neg1 != @neg2) {
27     exit(1);
28 }
29 exit(0);
30
31
32