draft-ietf-nfsv4-umask-04.txt   draft-ietf-nfsv4-umask-05.txt 
NFSv4 J. Fields NFSv4 J. Fields
Internet-Draft A. Gruenbacher Internet-Draft A. Gruenbacher
Intended status: Standards Track Red Hat Intended status: Standards Track Red Hat
Expires: January 21, 2018 July 20, 2017 Expires: March 3, 2018 August 30, 2017
Allowing Inheritable NFSv4 Access Control Entries to Override the Umask Allowing Inheritable NFSv4 Access Control Entries to Override the Umask
draft-ietf-nfsv4-umask-04 draft-ietf-nfsv4-umask-05
Abstract Abstract
In many environments, inheritable NFSv4 Access Control Entries (ACEs) In many environments, inheritable NFSv4 Access Control Entries (ACEs)
can be rendered ineffective by the application of the per-process can be rendered ineffective by the application of the per-process
umask. This can be addressed by transmitting the umask and create umask. This can be addressed by transmitting the umask and create
mode as separate pieces of data, allowing the server to make more mode as separate pieces of data, allowing the server to make more
intelligent decisions about the permissions to set on new files. intelligent decisions about the permissions to set on new files.
This document proposes a protocol extension which accomplishes that. This document proposes a protocol extension which accomplishes that.
skipping to change at page 1, line 35 skipping to change at page 1, line 35
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 21, 2018. This Internet-Draft will expire on March 3, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 12 skipping to change at page 2, line 12
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Conventions Used in This Document . . . . . . . . . . . . . . 2 1. Conventions Used in This Document . . . . . . . . . . . . . . 2
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2
3. Protocol Extension Considerations . . . . . . . . . . . . . . 3 3. Protocol Extension Considerations . . . . . . . . . . . . . . 3
4. mode_umask Attribute . . . . . . . . . . . . . . . . . . . . 3 4. XDR Extraction . . . . . . . . . . . . . . . . . . . . . . . 3
5. Security Considerations . . . . . . . . . . . . . . . . . . . 4 5. mode_umask Attribute . . . . . . . . . . . . . . . . . . . . 4
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
7.1. Normative References . . . . . . . . . . . . . . . . . . 5 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.2. Informative References . . . . . . . . . . . . . . . . . 5 8.1. Normative References . . . . . . . . . . . . . . . . . . 5
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 5 8.2. Informative References . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
1. Conventions Used in This Document 1. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
2. Problem Statement 2. Problem Statement
On Unix-like systems, each process is associated with a file mode On Unix-like systems, each process is associated with a file mode
skipping to change at page 3, line 39 skipping to change at page 3, line 39
clients and servers that are aware of the extension (whether they clients and servers that are aware of the extension (whether they
support it or not). support it or not).
Note that [RFC7862] does not define NFSv4.2 as non-extensible, so Note that [RFC7862] does not define NFSv4.2 as non-extensible, so
that it is considered by [nfsv4-versioning] to be an extensible minor that it is considered by [nfsv4-versioning] to be an extensible minor
version. As a result, upon publication of this document as a version. As a result, upon publication of this document as a
Proposed Standard, the extension described herein will effectively be Proposed Standard, the extension described herein will effectively be
part of NFSv4.2, even though this document does not update [RFC7862] part of NFSv4.2, even though this document does not update [RFC7862]
or [RFC7863]. or [RFC7863].
4. mode_umask Attribute 4. XDR Extraction
struct mode_umask4 { The additional lines of external data representation (XDR) [RFC4506]
mode4 mu_mode; description embedded in this document can be extracted by feeding
mode4 mu_umask; this document into the following shell script:
};
<CODE BEGINS>
#!/bin/sh
grep '^ *///' $* | sed 's?^ */// ??' | sed 's?^ *///$??'
<CODE ENDS>
That is, if the above script is stored in a file called "extract.sh",
and this document is in a file called "umask.txt", then the reader
can do:
sh extract.sh < umask.txt > umask.x
The effect of the script is to remove leading white space from each
line, plus a sentinel sequence of "///".
Once that extraction is done, these added lines need to be inserted
into an appropiate base XDR of the generated XDR from [RFC7863],
together with XDR from any additional extensions to be recognized by
the implementation. This will result in a ready-to-compile XDR file.
5. mode_umask Attribute
<CODE BEGINS>
/// struct mode_umask4 {
/// mode4 mu_mode;
/// mode4 mu_umask;
/// };
///
/// %/*
/// % * New For UMASK
/// % */
/// const FATTR4_MODE_UMASK = 81;
<CODE ENDS>
+------------+----+-------------+-----+------------+ +------------+----+-------------+-----+------------+
| Name | Id | Data Type | Acc | Defined in | | Name | Id | Data Type | Acc | Defined in |
+------------+----+-------------+-----+------------+ +------------+----+-------------+-----+------------+
| mode_umask | 81 | mode_umask4 | W | Section 4 | | mode_umask | 81 | mode_umask4 | W | Section 5 |
+------------+----+-------------+-----+------------+ +------------+----+-------------+-----+------------+
Table 1 Table 1
The NFSv4.2 mode_umask attribute is based on the umask and on the The NFSv4.2 mode_umask attribute is based on the umask and on the
mode bits specified at open time, which together determine the mode mode bits specified at open time, which together determine the mode
of a newly created UNIX file. Only the nine low-order mode4 bits of of a newly created UNIX file. Only the nine low-order mode4 bits of
mu_umask are defined. A server MUST return NFS4ERR_INVAL if bits mu_umask are defined. A server MUST return NFS4ERR_INVAL if bits
other than those nine are set. other than those nine are set.
skipping to change at page 4, line 33 skipping to change at page 5, line 23
The server then uses mode_umask as follows: The server then uses mode_umask as follows:
o On a server that supports ACL attributes, if an object inherits o On a server that supports ACL attributes, if an object inherits
any ACEs from its parent directory, mu_mode SHOULD be used, and any ACEs from its parent directory, mu_mode SHOULD be used, and
mu_umask ignored. mu_umask ignored.
o Otherwise, mu_umask MUST be used to limit the mode: all bits in o Otherwise, mu_umask MUST be used to limit the mode: all bits in
the mode MUST be turned off which are set in the umask; the mode the mode MUST be turned off which are set in the umask; the mode
assigned to the new object becomes (mu_mode & ~mu_umask) instead. assigned to the new object becomes (mu_mode & ~mu_umask) instead.
5. Security Considerations 6. Security Considerations
The mode_umask attribute shifts to the server the decision about when The mode_umask attribute shifts to the server the decision about when
to apply the umask. Because the server MUST apply the umask if there to apply the umask. Because the server MUST apply the umask if there
are no inheritable permissions, the traditional semantics are are no inheritable permissions, the traditional semantics are
preserved in the absence of a permission inheritance mechanism. The preserved in the absence of a permission inheritance mechanism. The
only relaxation of permissions comes in the case servers follow the only relaxation of permissions comes in the case servers follow the
recommendation that they ignore the umask in the presence of recommendation that they ignore the umask in the presence of
inheritable permissions. inheritable permissions.
The practice of ignoring the umask when there are inheritable The practice of ignoring the umask when there are inheritable
permissions in the form of a "POSIX" default ACL is of long standing permissions in the form of a "POSIX" default ACL is of long standing
and has not given rise to security issues. The "POSIX" default ACL and has not given rise to security issues. The "POSIX" default ACL
mechanism and the mechanism for permission inheritance in NFSv4 are mechanism and the mechanism for permission inheritance in NFSv4 are
equivalent from a security perspective. equivalent from a security perspective.
6. IANA Considerations 7. IANA Considerations
This document does not require any actions by IANA. This document does not require any actions by IANA.
7. References 8. References
7.1. Normative References 8.1. Normative References
[nfsv4-versioning] [nfsv4-versioning]
Noveck, D., "Rules for NFSv4 Extensions and Minor Noveck, D., "Rules for NFSv4 Extensions and Minor
Versions", draft-ietf-nfsv4-versioning-08 (work in Versions", draft-ietf-nfsv4-versioning-08 (work in
progress), December 2016. progress), December 2016.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", March 1997. Requirement Levels", March 1997.
[RFC4506] Eisler, M., "XDR: External Data Representation Standard",
STD 67, RFC 4506, May 2006.
[RFC7530] Haynes, T. and D. Noveck, "Network File System (NFS) [RFC7530] Haynes, T. and D. Noveck, "Network File System (NFS)
version 4 Protocol", RFC 7530, March 2015. version 4 Protocol", RFC 7530, March 2015.
[RFC7862] Haynes, T., "Network File System (NFS) Version 4 Minor [RFC7862] Haynes, T., "Network File System (NFS) Version 4 Minor
Version 2 Protocol", RFC 7862, November 2016. Version 2 Protocol", RFC 7862, November 2016.
[RFC7863] Haynes, T., "Network File System (NFS) Version 4 Minor [RFC7863] Haynes, T., "Network File System (NFS) Version 4 Minor
Version 2 External Data Representation Standard (XDR) Version 2 External Data Representation Standard (XDR)
Description", RFC 7863, November 2016. Description", RFC 7863, November 2016.
7.2. Informative References 8.2. Informative References
[LinuxACL] [LinuxACL]
Gruenbacher, A., "ACL(5) - Access Control Lists", Linux Gruenbacher, A., "ACL(5) - Access Control Lists", Linux
man pages ACL(5), March 2002, <http://kernel.org/doc/man- man pages ACL(5), March 2002, <http://kernel.org/doc/man-
pages/online/pages/man5/acl.5.html>. pages/online/pages/man5/acl.5.html>.
[SUSv4] The Open Group, "Single UNIX Specification Version 4", [SUSv4] The Open Group, "Single UNIX Specification Version 4",
2013. 2013.
Appendix A. Acknowledgments Appendix A. Acknowledgments
Thanks to Dave Noveck and Trond Myklebust for review. Thanks to Trond Myklebust and Dave Noveck for the suggestion to
define this as a (mode, umask) pair rather than just umask. Thanks
for review to them and to Warren Kumari, Adam Roach, Spencer Dawkins,
Mike Kupfer, and Thomas Haynes for review, and to Thomas Haynes for
XDR help.
Authors' Addresses Authors' Addresses
J. Bruce Fields J. Bruce Fields
Red Hat, Inc. Red Hat, Inc.
Email: bfields@redhat.com Email: bfields@redhat.com
Andreas Gruenbacher Andreas Gruenbacher
Red Hat, Inc. Red Hat, Inc.
Email: agruenba@redhat.com Email: agruenba@redhat.com
 End of changes. 15 change blocks. 
23 lines changed or deleted 67 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/