summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-18 18:35:33 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-18 18:35:33 +0000
commit3658d50727f3e5c264e95b7bfe6bc82dfcc2b908 (patch)
tree23ad3a8faa84732bf3d1f5026e67d31bece07ae0
parentc0f681a0aeb251af27ed8dc2b7c3062855ab5f59 (diff)
downloadpacman-3658d50727f3e5c264e95b7bfe6bc82dfcc2b908.tar.xz
Removed unuseful getuid() calls
-rw-r--r--lib/libalpm/handle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index cb2c745a..1c3501f7 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -57,7 +57,7 @@ pmhandle_t *handle_new()
}
/* see if we're root or not (fakeroot does not count) */
- if(getuid() == 0 && !getenv("FAKEROOTKEY")) {
+ if(handle->uid() == 0 && !getenv("FAKEROOTKEY")) {
handle->access = PM_ACCESS_RW;
} else {
handle->access = PM_ACCESS_RO;
@@ -138,7 +138,7 @@ int handle_set_option(pmhandle_t *handle, unsigned char val, unsigned long data)
DBPATH value */
break;
case PM_OPT_LOGFILE:
- if((char *)data == NULL || getuid() != 0) {
+ if((char *)data == NULL || handle->uid() != 0) {
return(0);
}
if(handle->logfile) {