sys_generic.c (a9d2f8d84f69e98100b5746816b35666bcf992ac) sys_generic.c (d1b6899e83a28eedca46b95bb090e3e476642166)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 1058 unchanged lines hidden (view full) ---

1067
1068 if ((fp = fget_unlocked(fdp, fd)) == NULL)
1069 return (EBADF);
1070#ifdef CAPABILITIES
1071 /*
1072 * If the file descriptor is for a capability, test rights and use
1073 * the file descriptor references by the capability.
1074 */
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 1058 unchanged lines hidden (view full) ---

1067
1068 if ((fp = fget_unlocked(fdp, fd)) == NULL)
1069 return (EBADF);
1070#ifdef CAPABILITIES
1071 /*
1072 * If the file descriptor is for a capability, test rights and use
1073 * the file descriptor references by the capability.
1074 */
1075 error = cap_funwrap(fp, CAP_POLL_KEVENT, &fp_fromcap);
1075 error = cap_funwrap(fp, CAP_POLL_EVENT, &fp_fromcap);
1076 if (error) {
1077 fdrop(fp, curthread);
1078 return (error);
1079 }
1080 if (fp != fp_fromcap) {
1081 fhold(fp_fromcap);
1082 fdrop(fp, curthread);
1083 fp = fp_fromcap;

--- 589 unchanged lines hidden ---
1076 if (error) {
1077 fdrop(fp, curthread);
1078 return (error);
1079 }
1080 if (fp != fp_fromcap) {
1081 fhold(fp_fromcap);
1082 fdrop(fp, curthread);
1083 fp = fp_fromcap;

--- 589 unchanged lines hidden ---