version 1.8, 2000/06/19 22:42:28 |
version 1.9, 2000/06/19 23:06:25 |
|
|
int i; |
int i; |
|
|
if (tcfs_verify_fs(filesystem)) |
if (tcfs_verify_fs(filesystem)) |
i = mount("tcfs", filesystem, MNT_UPDATE, (void*)arg); |
i = mount("tcfs", filesystem, MNT_UPDATE, (void *)arg); |
else |
else |
i = -1; |
i = -1; |
|
|
|
|
tcfs_decrypt_key(char *pwd, u_char *t, u_char *tk, int tklen) |
tcfs_decrypt_key(char *pwd, u_char *t, u_char *tk, int tklen) |
{ |
{ |
char pass[_PASSWORD_LEN]; |
char pass[_PASSWORD_LEN]; |
char tcfskey[2*KEYSIZE], iv[8]; |
char tcfskey[KEYSIZE * 2], iv[8]; |
blf_ctx ctx; |
blf_ctx ctx; |
int len; |
int len; |
|
|
|
|
tcfs_user_enable(char *filesystem, uid_t user, u_char *key) |
tcfs_user_enable(char *filesystem, uid_t user, u_char *key) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.user = user; |
a.user = user; |
memcpy(a.tcfs_key, key, sizeof(a.tcfs_key)); |
memcpy(a.tcfs_key, key, sizeof(a.tcfs_key)); |
a.cmd = TCFS_PUT_UIDKEY; |
a.cmd = TCFS_PUT_UIDKEY; |
|
|
tcfs_user_disable(char *filesystem, uid_t user) |
tcfs_user_disable(char *filesystem, uid_t user) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.user = user; |
a.user = user; |
a.cmd = TCFS_RM_UIDKEY; |
a.cmd = TCFS_RM_UIDKEY; |
|
|
|
|
tcfs_proc_enable(char *filesystem, uid_t user, pid_t pid, char *key) |
tcfs_proc_enable(char *filesystem, uid_t user, pid_t pid, char *key) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.user = user; |
a.user = user; |
a.cmd = TCFS_PUT_PIDKEY; |
a.cmd = TCFS_PUT_PIDKEY; |
a.proc = pid; |
a.proc = pid; |
|
|
tcfs_proc_disable(char *filesystem, uid_t user, pid_t pid) |
tcfs_proc_disable(char *filesystem, uid_t user, pid_t pid) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.user = user; |
a.user = user; |
a.cmd = TCFS_RM_PIDKEY; |
a.cmd = TCFS_RM_PIDKEY; |
a.proc = pid; |
a.proc = pid; |
|
|
int tre, char *key) |
int tre, char *key) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.cmd = TCFS_PUT_GIDKEY; |
a.cmd = TCFS_PUT_GIDKEY; |
a.user = uid; |
a.user = uid; |
a.group = gid; |
a.group = gid; |
|
|
int tcfs_group_disable(char *filesystem, uid_t uid, gid_t gid) |
int tcfs_group_disable(char *filesystem, uid_t uid, gid_t gid) |
{ |
{ |
struct tcfs_args a; |
struct tcfs_args a; |
|
|
a.cmd = TCFS_RM_GIDKEY; |
a.cmd = TCFS_RM_GIDKEY; |
a.user = uid; |
a.user = uid; |
a.group = gid; |
a.group = gid; |
|
|
return (tcfs_callfunction(filesystem, &a)); |
return (tcfs_callfunction(filesystem, &a)); |
} |
} |
|
|
|
|