Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152707888
D11129.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11129.id.diff
View Options
Index: share/mk/bsd.lib.mk
===================================================================
--- share/mk/bsd.lib.mk
+++ share/mk/bsd.lib.mk
@@ -200,8 +200,8 @@
.endif
.if defined(LLVM_LINK)
-BCOBJS= ${OBJS:.o=.bco} ${STATICOBJS:.o=.bco}
-LLOBJS= ${OBJS:.o=.llo} ${STATICOBJS:.o=.llo}
+BCOBJS= ${SRCS:N*.h:N*.S:R:S/$/.bco/} ${STATICOBJS:.o=.bco}
+LLOBJS= ${SRCS:N*.h:N*.S:R:S/$/.llo/} ${STATICOBJS:.o=.llo}
CLEANFILES+= ${BCOBJS} ${LLOBJS}
lib${LIB_PRIVATE}${LIB}.bc: ${BCOBJS}
Index: usr.bin/uuencode/uuencode.c
===================================================================
--- usr.bin/uuencode/uuencode.c
+++ usr.bin/uuencode/uuencode.c
@@ -46,13 +46,16 @@
*
* Encode a file so it can be mailed to a remote system.
*/
+#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
+#include <capsicum_helpers.h>
#include <err.h>
+#include <errno.h>
#include <libgen.h>
#include <resolv.h>
#include <stdio.h>
@@ -125,8 +128,23 @@
output = fopen(outfile, "w+");
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 ))
+ err(1, "unable to limit rights for %s", outfile);
} else
output = stdout;
+
+
+ if (caph_limit_stdio() != 0)
+ errx(1, "Failed to limit std{in,out,err}");
+
+
+
+ if (cap_enter() < 0 && errno != ENOSYS)
+ err(1, "unable to enter capability mode");
+
if (base64)
base64_encode();
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 17, 3:20 PM (4 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31654731
Default Alt Text
D11129.id.diff (1 KB)
Attached To
Mode
D11129: uuencode(1): Capsicumify
Attached
Detach File
Event Timeline
Log In to Comment