aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2000-09-09 12:48:40 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2000-09-09 12:48:40 +0000
commit6fb88e73f792ad6dfb1c2c08600972988f223012 (patch)
treebdb5af2e15f1d6b44d84cdd2f55372f6f9fe4500
parent8324b9f1aacde5c1c80f0a94ba3d276787e14183 (diff)
downloadbusybox-6fb88e73f792ad6dfb1c2c08600972988f223012.tar.gz
Fix permisions
-rw-r--r--ar.c3
-rw-r--r--archival/ar.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/ar.c b/ar.c
index b758a6975..eaa15a516 100644
--- a/ar.c
+++ b/ar.c
@@ -298,7 +298,8 @@ extern int ar_main(int argc, char **argv)
while(extractList->next != NULL) {
if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) {
- dstFd = open(extractList->name, O_WRONLY | O_CREAT);
+ dstFd = open(extractList->name, O_WRONLY | O_CREAT, extractList->mode);
+
extractAr(srcFd, dstFd, extractList);
}
if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT)
diff --git a/archival/ar.c b/archival/ar.c
index b758a6975..eaa15a516 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -298,7 +298,8 @@ extern int ar_main(int argc, char **argv)
while(extractList->next != NULL) {
if ( (funct & EXT_TO_FILE) == EXT_TO_FILE) {
- dstFd = open(extractList->name, O_WRONLY | O_CREAT);
+ dstFd = open(extractList->name, O_WRONLY | O_CREAT, extractList->mode);
+
extractAr(srcFd, dstFd, extractList);
}
if ( (funct & EXT_TO_STDOUT) == EXT_TO_STDOUT)