*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
if (fl_udesc && sf->sf_rpc != SPTLRPC_FLVR_NULL)
sf->sf_flags |= PTLRPC_SEC_FL_UDESC;
}
+
+ /* Some flavors use a single uid (0) context */
+ if (flvr_is_rootonly(sf->sf_rpc))
+ sf->sf_flags |= PTLRPC_SEC_FL_ROOTONLY;
+
+ /* User descriptor might need to be cleared */
+ if (flvr_allows_user_desc(sf->sf_rpc) == 0)
+ sf->sf_flags &= ~PTLRPC_SEC_FL_UDESC;
}
void sptlrpc_conf_choose_flavor(enum lustre_sec_part from,
strcmp(obd->obd_type->typ_name, LUSTRE_LWP_NAME) == 0);
CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid);
- /* serialize with connect/disconnect import */
- down_read(&obd->u.cli.cl_sem);
+ /* serialize with connect/disconnect import */
+ down_read_nested(&obd->u.cli.cl_sem, OBD_CLI_SEM_MDCOSC);
imp = obd->u.cli.cl_import;
if (imp) {