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 289762 Details for
Bug 425941
vol_id loops forever if it founds a malformed line in /etc/passwd
[?]
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]
patch for vol_id that fix the problem
udev-106-4-getpwnam.patch (text/plain), 1.30 KB, created by
Marco Ceci
on 2007-12-17 10:45:30 UTC
(
hide
)
Description:
patch for vol_id that fix the problem
Filename:
MIME Type:
Creator:
Marco Ceci
Created:
2007-12-17 10:45:30 UTC
Size:
1.30 KB
patch
obsolete
>--- extras/volume_id/vol_id.c 2007-12-14 08:30:24.000000000 -0500 >+++ extras/volume_id/vol_id.c.getpwnam 2007-12-14 08:29:40.000000000 -0500 >@@ -27,6 +27,8 @@ > #include <unistd.h> > #include <string.h> > #include <ctype.h> >+#include <errno.h> >+#include <pwd.h> > #include <grp.h> > #include <sys/ioctl.h> > >@@ -126,8 +128,7 @@ > int i; > uint64_t size; > const char *node = NULL; >- uid_t nobody_uid; >- gid_t nobody_gid; >+ struct passwd *pw; > int rc = 0; > > logging_init("vol_id"); >@@ -167,13 +168,15 @@ > size = 0; > dbg("BLKGETSIZE64=%llu", size); > >- /* drop all privileges */ >- nobody_uid = lookup_user("nobody"); >- nobody_gid = lookup_user_primary_group("nobody"); >- if (nobody_uid > 0 && nobody_gid > 0) { >+ /* try to drop all privileges before reading disk content */ >+ pw = getpwnam ("nobody"); >+ if (pw != NULL && pw->pw_uid > 0 && pw->pw_gid > 0) { >+ dbg("dropping privileges to %u:%u", >+ (unsigned int)pw->pw_uid, (unsigned int)pw->pw_gid); > if (setgroups(0, NULL) != 0 || >- setgid(nobody_gid) != 0 || >- setuid(nobody_uid) != 0) { >+ setgid(pw->pw_gid) != 0 || >+ setuid(pw->pw_uid) != 0) { >+ fprintf(stderr, "error dropping privileges: %s\n", strerror(errno)); > rc = 3; > goto exit; > }
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 425941
: 289762 |
291702