mirror of
https://github.com/sheumann/hush.git
synced 2025-02-06 13:30:24 +00:00
put #if's around the lchown, because
older glibc versions don't have it.
This commit is contained in:
parent
5509af7073
commit
bf3a838aac
@ -55,8 +55,14 @@ static int fileAction(const char *fileName, struct stat* statbuf)
|
|||||||
switch (whichApp) {
|
switch (whichApp) {
|
||||||
case CHGRP_APP:
|
case CHGRP_APP:
|
||||||
case CHOWN_APP:
|
case CHOWN_APP:
|
||||||
|
#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)
|
||||||
if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
|
if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
|
||||||
(gid==-1)? statbuf->st_gid : gid) == 0) {
|
(gid==-1)? statbuf->st_gid : gid) == 0)
|
||||||
|
#else
|
||||||
|
if (chown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
|
||||||
|
(gid==-1)? statbuf->st_gid : gid) == 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
return( TRUE);
|
return( TRUE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user