Merge branch 'stable-2.5'
* stable-2.5: NPE when strategy is cherry-pick and changeMerge.test enabled Fix owner column to link to same status Sort groups on the group list screen Documentation: Add link to test-submit-rule from the prolog cookbook. Do not log RepositoryNotFoundException if non-existing project is accessed Documentation: Add submit rule example on how to implement 1+1=2 Fix OutOfScope exception when auditing ssh auth failure. Fix a NPE caused by GerritCall.getMethod returning null. Add org.apache.mina as dependency to pom.xml Conflicts: gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java Change-Id: Id280ca6afebbe299e5841ddf8850184714f70de7
This commit is contained in:
		| @@ -101,7 +101,7 @@ class SshLog implements LifecycleListener { | ||||
|  | ||||
|   void onLogin() { | ||||
|     async.append(log("LOGIN FROM " + session.get().getRemoteAddressAsString())); | ||||
|     audit("0", "LOGIN", new String[] {}); | ||||
|     audit(context.get(), "0", "LOGIN", new String[] {}); | ||||
|   } | ||||
|  | ||||
|   void onAuthFail(final SshSession sd) { | ||||
| @@ -127,7 +127,7 @@ class SshLog implements LifecycleListener { | ||||
|     } | ||||
|  | ||||
|     async.append(event); | ||||
|     audit("FAIL", "AUTH", new String[] {sd.getRemoteAddressAsString()}); | ||||
|     audit(null, "FAIL", "AUTH", new String[] {sd.getRemoteAddressAsString()}); | ||||
|   } | ||||
|  | ||||
|   void onExecute(int exitValue) { | ||||
| @@ -165,7 +165,8 @@ class SshLog implements LifecycleListener { | ||||
|     event.setProperty(P_STATUS, status); | ||||
|  | ||||
|     async.append(event); | ||||
|     audit(status, getCommand(commandLine), CommandFactoryProvider.split(commandLine)); | ||||
|     audit(context.get(), status, getCommand(commandLine), | ||||
|         CommandFactoryProvider.split(commandLine)); | ||||
|   } | ||||
|  | ||||
|   private String getCommand(String commandLine) { | ||||
| @@ -176,7 +177,7 @@ class SshLog implements LifecycleListener { | ||||
|  | ||||
|   void onLogout() { | ||||
|     async.append(log("LOGOUT")); | ||||
|     audit("0", "LOGOUT", new String[] {}); | ||||
|     audit(context.get(), "0", "LOGOUT", new String[] {}); | ||||
|   } | ||||
|  | ||||
|   private LoggingEvent log(final String msg) { | ||||
| @@ -415,8 +416,7 @@ class SshLog implements LifecycleListener { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   void audit(Object result, String commandName, String[] args) { | ||||
|     final Context ctx = context.get(); | ||||
|   void audit(Context ctx, Object result, String commandName, String[] args) { | ||||
|     final String sid = extractSessionId(ctx); | ||||
|     final long created = extractCreated(ctx); | ||||
|     final String what = extractWhat(commandName, args); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Shawn O. Pearce
					Shawn O. Pearce