1 --- rpm-4.5/lib/psm.c 2010-05-08 14:14:22.817080224 +0200
2 +++ rpm-4.5/lib/psm.c 2010-05-08 14:14:03.063343062 +0200
4 /*@modifies psm, fileSystem, internalState @*/
6 const rpmts ts = psm->ts;
13 /* Save the current working directory. */
15 - rootFdno = open(".", O_RDONLY, 0);
16 + pwdFdno = open(".", O_RDONLY, 0);
19 + /* Save the current root directory. */
20 + rootFdno = open("/", O_RDONLY, 0);
22 /* Get into the chroot. */
23 if (!rpmtsChrootDone(ts)) {
24 const char *rootDir = rpmtsRootDir(ts);
26 /*@=superuser =noeffect @*/
27 xx = rpmtsSetChrootDone(ts, 0);
29 + xx = fchdir(pwdFdno);
31 - xx = fchdir(rootFdno);
32 + xx = fchdir(pwdFdno);
35 + xx = close(pwdFdno);