diff options
author | Christian PERRIER <bubulle@debian.org> | 2013-08-10 12:51:49 +0200 |
---|---|---|
committer | Christian PERRIER <bubulle@debian.org> | 2013-08-10 12:51:49 +0200 |
commit | 111f8cd9fccc0ebd8f8c5310a10343bc78569e81 (patch) | |
tree | aa97c77d9d3b02730cf74c771cc43acb74a6cce9 /apt-pkg/deb/dpkgpm.cc | |
parent | de81d69704bc5103ca55032a8f009820f30624c7 (diff) | |
parent | f52037d629aea696f938015e7f1ec037eb079af8 (diff) |
Merge branch 'debian/sid' of git://git.debian.org/git/apt/apt into debian/sid
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0bd6b184..34ae4e593 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -134,7 +134,8 @@ static void dpkgChrootDirectory() std::cerr << "Chrooting into " << chrootDir << std::endl; if (chroot(chrootDir.c_str()) != 0) _exit(100); - chdir("/"); + if (chdir("/") != 0) + _exit(100); } /*}}}*/ @@ -755,7 +756,8 @@ bool pkgDPkgPM::OpenLog() pw = getpwnam("root"); gr = getgrnam("adm"); if (pw != NULL && gr != NULL) - chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid); + if(chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid) != 0) + _error->Errno("OpenLog", "chown failed"); chmod(logfile_name.c_str(), 0640); fprintf(d->term_out, "\nLog started: %s\n", timestr); } |