removed handle/uid checks (CYGWIN)
This commit is contained in:
parent
52346fc121
commit
74b3e0dcae
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,7 @@ pmhandle_t *handle_new()
|
||||||
memset(handle, 0, sizeof(pmhandle_t));
|
memset(handle, 0, sizeof(pmhandle_t));
|
||||||
handle->lckfd = -1;
|
handle->lckfd = -1;
|
||||||
|
|
||||||
|
#ifndef CYGWIN
|
||||||
/* see if we're root or not */
|
/* see if we're root or not */
|
||||||
handle->uid = geteuid();
|
handle->uid = geteuid();
|
||||||
if(!handle->uid && getenv("FAKEROOTKEY")) {
|
if(!handle->uid && getenv("FAKEROOTKEY")) {
|
||||||
|
@ -65,6 +66,9 @@ pmhandle_t *handle_new()
|
||||||
} else {
|
} else {
|
||||||
handle->access = PM_ACCESS_RO;
|
handle->access = PM_ACCESS_RO;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
handle->access = PM_ACCESS_RW;
|
||||||
|
#endif
|
||||||
|
|
||||||
return(handle);
|
return(handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue