Commit b6916eb 1 parent 6370cd2 commit b6916eb Copy full SHA for b6916eb
File tree 2 files changed +7
-0
lines changed
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ final class UGIExceptionMessages {
27
27
public static final String FOR_USER = " for user: " ;
28
28
public static final String FOR_PRINCIPAL = " for principal: " ;
29
29
public static final String FROM_KEYTAB = " from keytab " ;
30
+ public static final String INVALID_UID = "Invalid UID, could not determine effective user" ;
30
31
public static final String LOGIN_FAILURE = "Login failure" ;
31
32
public static final String LOGOUT_FAILURE = "Logout failure" ;
32
33
public static final String MUST_FIRST_LOGIN =
Original file line number Diff line number Diff line change @@ -2075,6 +2075,12 @@ private static UserGroupInformation doSubjectLogin(
2075
2075
}
2076
2076
return ugi ;
2077
2077
} catch (LoginException le ) {
2078
+ String msg = le .getMessage ();
2079
+ if (msg != null && msg .contains ("invalid null input" )) {
2080
+ // This error from the JDK indicates that the OS couldn't map the UID of this process to an
2081
+ // actual user. Throw this as an IOException, because it's not related to Kerberos.
2082
+ throw new IOException (INVALID_UID , le );
2083
+ }
2078
2084
KerberosAuthException kae =
2079
2085
new KerberosAuthException (FAILURE_TO_LOGIN , le );
2080
2086
if (params != null ) {
You can’t perform that action at this time.
0 commit comments