Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 952474 Details for
Bug 1159300
running mock from chroot path directory produces "error retrieving current directory: getcwd"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
patch for handling getcwd() error when we are calling mock from chroot path
cwd-fix.patch (text/plain), 1.31 KB, created by
Mikhail Campos
on 2014-10-31 12:25:29 UTC
(
hide
)
Description:
patch for handling getcwd() error when we are calling mock from chroot path
Filename:
MIME Type:
Creator:
Mikhail Campos
Created:
2014-10-31 12:25:29 UTC
Size:
1.31 KB
patch
obsolete
>commit 166d887149049dfca32af6ff55f1bfd9a935c25b >Author: Mikhail Campos Guadamuz <Mikhail_Campos-Guadamuz@epam.com> >Date: Thu Oct 30 23:25:57 2014 +0300 > > This fix is for handling mock invocations from chroot directory. Now we have a message telling what is wrong > >diff --git a/py/mock.py b/py/mock.py >index 60060be..331fff6 100755 >--- a/py/mock.py >+++ b/py/mock.py >@@ -506,6 +506,16 @@ def rootcheck(): > raise RuntimeError("mock will not run from the root account (needs an unprivileged uid so it can drop privs)") > > @traceLog() >+def cwdcheck(rootpath): >+ try: >+ # just try to get current dir >+ curdir = os.getcwd() >+ if curdir == rootpath: >+ raise >+ except: >+ raise RuntimeError("Must not run from mock chroot directory!") >+ >+@traceLog() > def groupcheck(unprivGid, tgtGid): > "verify that the user running mock is part of the correct group" > # verify that we're in the correct group (so all our uid/gid manipulations work) >@@ -576,6 +586,8 @@ def main(): > # cmdline options override config options > util.set_config_opts_per_cmdline(config_opts, options, args) > >+ cwdcheck(os.path.join(config_opts['basedir'], config_opts['root'])) >+ > # allow a different mock group to be specified > if config_opts['chrootgid'] != mockgid: > uidManager.restorePrivs()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1159300
: 952474 |
952476
|
953126