Bug #2357

open(2) flagspace is full

Added by ftigeot almost 2 years ago. Updated over 1 year ago.

Status:ResolvedStart date:04/28/2012
Priority:HighDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Recent software expects to be able to use open with flags such as O_DIRECTORY or O_CLOEXEC; they are useful to prevent races and securities vulnerabilities.

I have looked at implementing O_CLOEXEC support, but all the bits in an int are already used; I have counted about 10 DragonFly-specific flags in the lot.

The standard flags, as defined in the current POSIX.1-2008 standard:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html

0001-kernel-remove-O_ROOTCRED.patch Magnifier (2.23 KB) ftigeot, 07/29/2012 11:00 AM

0002-kernel-remove-O_FRNONBLOCKING.patch Magnifier (1.79 KB) ftigeot, 07/29/2012 11:00 AM


Related issues

Related to Bug #2398: [FEATURE REQUEST] OpenAT O_DIRECTORY and AT_SYMLINK_FOLLO... Closed 07/29/2012

History

#1 Updated by ftigeot over 1 year ago

O_ROOTCRED is DragonFly-specific and effectively unused.
It can be removed without causing secondary issues

#2 Updated by ftigeot over 1 year ago

  • % Done changed from 0 to 10

O_FRNONBLOCKING is also effectively unused

#3 Updated by ftigeot over 1 year ago

Patches to remove O_ROOTCRED and O_FRNONBLOCKING

Complete world+kernel builds are needed

#4 Updated by ftigeot over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 10 to 100

Both patches pushed today

Also available in: Atom PDF