From 8fa552c691de8c202630a1eba78864eee5fb53c2 Mon Sep 17 00:00:00 2001 From: jbj Date: Tue, 2 Mar 2004 21:55:03 +0000 Subject: [PATCH] Change lock file location. Lock in outer, not in chroot, file tree for now. CVS patchset: 7142 CVS date: 2004/03/02 21:55:03 --- lib/rpmlock.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/rpmlock.c b/lib/rpmlock.c index 8e642d8..467d2f5 100644 --- a/lib/rpmlock.c +++ b/lib/rpmlock.c @@ -15,7 +15,7 @@ /* Internal interface */ -#define RPMLOCK_FILE "/var/lib/rpm/transaction.lock" +#define RPMLOCK_FILE "/var/lock/rpm/transaction" /*@observer@*/ /*@unchecked@*/ static const char * _rpmlock_file = RPMLOCK_FILE; @@ -39,13 +39,6 @@ static rpmlock rpmlock_new(const char *rootdir) rpmlock lock = (rpmlock) malloc(sizeof(*lock)); if (lock) { mode_t oldmask = umask(022); - char *path = (char *)malloc(strlen(rootdir)+ - strlen(RPMLOCK_FILE)+2); - if (!path) { - free(lock); - return NULL; - } - sprintf(path, "%s/%s", rootdir, RPMLOCK_FILE); lock->fd = open(RPMLOCK_FILE, O_RDWR|O_CREAT, 0644); (void) umask(oldmask); -- 2.7.4