libc: better access on directories
This commit is contained in:
parent
fe173086f7
commit
56287a4337
@ -53,17 +53,14 @@ jehanne_access(const char *name, int mode)
|
|||||||
user = jehanne_getuser();
|
user = jehanne_getuser();
|
||||||
if(jehanne_strcmp(user, db->gid) == 0){
|
if(jehanne_strcmp(user, db->gid) == 0){
|
||||||
/* check group */
|
/* check group */
|
||||||
tmp = db->mode & (reqmode << 3);
|
tmp |= (db->mode & (reqmode << 3)) >> 3;
|
||||||
tmp = tmp >> 3;
|
|
||||||
if(tmp != reqmode && jehanne_strcmp(user, db->uid)== 0){
|
if(tmp != reqmode && jehanne_strcmp(user, db->uid)== 0){
|
||||||
/* check user */
|
/* check user */
|
||||||
tmp = db->mode & (reqmode << 6);
|
tmp |= (db->mode & (reqmode << 6)) >> 6;
|
||||||
tmp = tmp >> 6;
|
|
||||||
}
|
}
|
||||||
} else if (jehanne_strcmp(user, db->uid)== 0){
|
} else if (jehanne_strcmp(user, db->uid)== 0){
|
||||||
/* check user */
|
/* check user */
|
||||||
tmp = db->mode & (reqmode << 6);
|
tmp |= (db->mode & (reqmode << 6)) >> 6;
|
||||||
tmp = tmp >> 6;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user