File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ final class UGIExceptionMessages {
2727 public static final String FOR_USER = " for user: " ;
2828 public static final String FOR_PRINCIPAL = " for principal: " ;
2929 public static final String FROM_KEYTAB = " from keytab " ;
30+ public static final String INVALID_UID = "Invalid UID, could not determine effective user" ;
3031 public static final String LOGIN_FAILURE = "Login failure" ;
3132 public static final String LOGOUT_FAILURE = "Logout failure" ;
3233 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(
20752075 }
20762076 return ugi ;
20772077 } 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+ }
20782084 KerberosAuthException kae =
20792085 new KerberosAuthException (FAILURE_TO_LOGIN , le );
20802086 if (params != null ) {
You can’t perform that action at this time.
0 commit comments