version 1.3, 2000/06/19 20:35:48 |
version 1.4, 2000/06/19 22:42:29 |
|
|
int havempname = FALSE, havefsname = FALSE, isgroupkey = FALSE; |
int havempname = FALSE, havefsname = FALSE, isgroupkey = FALSE; |
int havename = FALSE, havefspath = FALSE; |
int havename = FALSE, havefspath = FALSE; |
|
|
while ((x = getopt(argc,argv,"f:p:g:")) != EOF) { |
while ((x = getopt(argc, argv, "f:p:g:")) != EOF) { |
switch(x) { |
switch(x) { |
case 'p': |
case 'p': |
havempname = TRUE; |
havempname = TRUE; |
|
|
} |
} |
} |
} |
if (argc-optind) |
if (argc-optind) |
tcfs_error(ER_UNKOPT,NULL); |
tcfs_error(ER_UNKOPT, NULL); |
|
|
if (havefsname && havempname) { |
if (havefsname && havempname) { |
tcfs_error(ER_CUSTOM, rmkey_usage); |
tcfs_error(ER_CUSTOM, rmkey_usage); |
|
|
havename = TRUE; |
havename = TRUE; |
|
|
if (!havename) |
if (!havename) |
es = tcfs_getfspath("default",fspath); |
es = tcfs_getfspath("default", fspath); |
|
|
if(!es) { |
if(!es) { |
tcfs_error(ER_CUSTOM,"fs-label not found!\n"); |
tcfs_error(ER_CUSTOM, "fs-label not found!\n"); |
exit(1); |
exit(1); |
} |
} |
|
|
uid = getuid(); |
uid = getuid(); |
|
|
if (isgroupkey) { |
if (isgroupkey) { |
es = tcfs_group_disable(fspath,uid,gid); |
es = tcfs_group_disable(fspath, uid, gid); |
if(es == -1) |
if(es == -1) |
tcfs_error(ER_CUSTOM, "problems updating filesystem"); |
tcfs_error(ER_CUSTOM, "problems updating filesystem"); |
exit(0); |
exit(0); |
} |
} |
|
|
es = tcfs_user_disable(fspath,uid); |
es = tcfs_user_disable(fspath, uid); |
|
|
if (es == -1) |
if (es == -1) |
tcfs_error(ER_CUSTOM,"problems updating filesystem"); |
tcfs_error(ER_CUSTOM, "problems updating filesystem"); |
|
|
exit(0); |
exit(0); |
} |
} |