Commit b1320d97 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfs4: remove NfsLoginService interface

Motivation:
The NfsLoginService aimed to handle RPCSEC_GSS based session and
map GSS context to appropriate Subject. However, this is always
handled by RPC layer (after split of nfs and rpc modules into different
projects). Thus NfsLoginService is simply a dead code.

Modification:
remove NfsLoginService interface

Result:
less dead code

Acked-by: Paul Millar
Acked-by: Lea Morschel
Target: master
parent e84212e3
Pipeline #527 passed with stage
in 1 minute and 19 seconds
......@@ -2,7 +2,8 @@
## 0.22
- removed deprecated CompoundContextBuilder#withExportFile
- removed deprecated CompoundContextBuilder#withExportFile
- removed interface org.dcache.nfs.v4.NfsLoginService
## 0.21
......
/*
* Copyright (c) 2009 - 2012 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program (see the file COPYING.LIB for more
* details); if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.dcache.nfs.v4;
import java.security.Principal;
import javax.security.auth.Subject;
public interface NfsLoginService {
Subject login(Principal principal);
}
/*
* Copyright (c) 2009 - 2015 Deutsches Elektronen-Synchroton,
* Copyright (c) 2009 - 2020 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
*
* This library is free software; you can redistribute it and/or modify
......@@ -19,24 +19,17 @@
*/
package org.dcache.nfs.v4;
import java.security.Principal;
import javax.security.auth.Subject;
import org.dcache.auth.Subjects;
/**
* Simple implementation of {@link NfsIdMapping} which converts number into
* string representation and vice versa.
*
* @since 0.0.4
*/
public class SimpleIdMap implements NfsIdMapping, NfsLoginService {
public class SimpleIdMap implements NfsIdMapping {
private static final int NOBODY_UID = 65534;
private static final int NOBODY_GID = 65534;
private static final int DEFAULT_UID = 1001;
private static final int DEFAULT_GID = 1001;
@Override
public int principalToGid(String principal) {
try {
......@@ -64,9 +57,4 @@ public class SimpleIdMap implements NfsIdMapping, NfsLoginService {
public String gidToPrincipal(int id) {
return Integer.toString(id);
}
@Override
public Subject login(Principal principal) {
return Subjects.of(DEFAULT_UID, DEFAULT_GID);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment