Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150126094
D16040.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
915 B
Referenced Files
None
Subscribers
None
D16040.id.diff
View Options
Index: usr.bin/uuencode/uuencode.c
===================================================================
--- usr.bin/uuencode/uuencode.c
+++ usr.bin/uuencode/uuencode.c
@@ -81,6 +81,7 @@
int base64;
int ch;
char *outfile;
+ cap_rights_t out_rights;
base64 = 0;
outfile = NULL;
@@ -131,9 +132,7 @@
if (output == NULL)
err(1, "unable to open %s for output", outfile);
- cap_rights_t out_rights;
- cap_rights_init(&out_rights, CAP_FSTAT | CAP_WRITE | CAP_SEEK );
- if (cap_rights_limit( output->_file, &out_rights ))
+ if (caph_limit_stream(fileno(output), CAP_WRITE) != 0)
err(1, "unable to limit rights for %s", outfile);
} else
output = stdout;
@@ -141,7 +140,7 @@
if (caph_limit_stdio() != 0)
errx(1, "Failed to limit stdio");
- if (cap_enter() < 0 && errno != ENOSYS)
+ if (caph_enter() < 0 && errno != ENOSYS)
err(1, "unable to enter capability mode");
if (base64)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 2:48 PM (3 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30589858
Default Alt Text
D16040.id.diff (915 B)
Attached To
Mode
D16040: Addresses suggestions made by cem@ for sytle and function.
Attached
Detach File
Event Timeline
Log In to Comment