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 148431 Details for
Bug 228102
lspp: newrole doesn't work on serial consoles
[?]
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]
updated patch that turns off O_NONBLOCK
newrole.c.patch (text/plain), 1.21 KB, created by
Linda Knippers
on 2007-02-20 18:35:38 UTC
(
hide
)
Description:
updated patch that turns off O_NONBLOCK
Filename:
MIME Type:
Creator:
Linda Knippers
Created:
2007-02-20 18:35:38 UTC
Size:
1.21 KB
patch
obsolete
>--- newrole.c 2007-02-20 13:32:46.000000000 -0500 >+++ newrole.c.ljk2 2007-02-20 13:32:39.000000000 -0500 >@@ -636,11 +636,12 @@ static int relabel_tty(const char *ttyn, > } > > /* Re-open TTY descriptor */ >- fd = open(ttyn, O_RDWR); >+ fd = open(ttyn, O_RDWR|O_NONBLOCK); > if (fd < 0) { > fprintf(stderr, _("Error! Could not open %s.\n"), ttyn); > return fd; > } >+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); > > if (fgetfilecon(fd, &tty_con) < 0) { > fprintf(stderr, _("%s! Could not get current context " >@@ -1127,15 +1128,18 @@ int main(int argc, char *argv[]) > fprintf(stderr, _("Could not close descriptors.\n")); > goto err_close_pam; > } >- fd = open(ttyn, O_RDONLY); >+ fd = open(ttyn, O_RDONLY|O_NONBLOCK); > if (fd != 0) > goto err_close_pam; >- fd = open(ttyn, O_RDWR); >+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); >+ fd = open(ttyn, O_RDWR|O_NONBLOCK); > if (fd != 1) > goto err_close_pam; >- fd = open(ttyn, O_RDWR); >+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); >+ fd = open(ttyn, O_RDWR|O_NONBLOCK); > if (fd != 2) > goto err_close_pam; >+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); > > /* > * Step 5: Execute a new shell with the new context in `new_context'.
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228102
:
147823
| 148431