Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

system/2862: missing third argument for open()

From: Grudge Mason <grudge_mason(at)hotmail.com>
Date: Tue Aug 06 2002 - 13:06:41 EDT


>Number: 2862
>Category: system
>Synopsis: missing third argument for open()
>Confidential: no
net
>Environment:

        System      : OpenBSD 3.1
        Architecture: OpenBSD.i386
        Machine     : i386

>Description:

I found serveral open() with O_CREAT but with missing third argument (mode), hence causing files being created with random permission.

In src/gnu/egcs/gcc/collect2.c:
redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);

In src/gnu/usr.bin/binutils/gdb/29k-share/udi/udip2soc.c: f = open(soc_con[cnt].tip_string, O_CREAT);

In src/kerberosIV/src/appl/afsutil/pagsh.c: f = open(tf, O_CREAT|O_EXCL|O_RDWR);

In src/kerberosIV/src/appl/kauth/kauth.c: f = open(tf, O_CREAT|O_EXCL|O_RDWR);

In src/kerberosV/src/appl/dceutils/k5dcecon.c: open("/tmp/k5dce.debug",O_WRONLY|O_CREAT|O_APPEND);

In src/usr.bin/msgs/msgs.c:
fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND);

In src/usr.sbin/afs/src/arlad/reconnect.c: fd_to = open(name_to, O_WRONLY | O_CREAT | O_BINARY);

Do you need help?X

In src/usr.sbin/afs/src/arlad/messages.c: ret = DARLA_Open(&log_data, ARLACACHEDIR"/discon_log",

                             O_WRONLY | O_CREAT | O_BINARY);

And DARLA_Open() then runs:
  fd = open(fname, oflag);

>How-To-Repeat:
Add correct mode as 3rd argument.
At least the arla stuff has been fixed in arla-current.



MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

>Release-Note:
Received on Thu Nov 7 15:43:42 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library