From: Ian Lance Taylor Date: Fri, 10 Jun 1994 19:43:49 +0000 (+0000) Subject: * objcopy.c (copy_archive): Make the temporary directory in the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90f6517da9d3ddf09648bd3bc3fca3cf13da9e5a;p=binutils-gdb.git * objcopy.c (copy_archive): Make the temporary directory in the same directory as the output BFD, since we may not have write permission on the current directory. Set the permissions of the new directory to 0700, not 0777. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index f0b841bc2d0..562916bd4dd 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +Fri Jun 10 15:41:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (copy_archive): Make the temporary directory in the + same directory as the output BFD, since we may not have write + permission on the current directory. Set the permissions of the + new directory to 0700, not 0777. + Mon Jun 6 21:36:43 1994 D. V. Henkel-Wallace (gumby@cygnus.com) * configure.in: if this is an rs6000 (and we're not building for diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 2700207f92f..673511fc171 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -358,10 +358,10 @@ copy_archive (ibfd, obfd, output_target) { bfd **ptr = &obfd->archive_head; bfd *this_element; - char *dir = cat ("./#", make_tempname (""), "cd"); + char *dir = make_tempname (bfd_get_filename (obfd)); /* Make a temp directory to hold the contents. */ - mkdir (dir, 0777); + mkdir (dir, 0700); obfd->has_armap = ibfd->has_armap; this_element = bfd_openr_next_archived_file (ibfd, NULL);