Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 414016
Collapse All | Expand All

(-)a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/ByteStreamHandler.java (-3 / +20 lines)
Lines 18-23 Link Here
18
 *  David McKnight     (IBM)   [380023] [dstore] remote file permissions lost after upload
18
 *  David McKnight     (IBM)   [380023] [dstore] remote file permissions lost after upload
19
 *  David McKnight     (IBM)   [385630] [dstore] backup files created during upload should be removed when upload successful
19
 *  David McKnight     (IBM)   [385630] [dstore] backup files created during upload should be removed when upload successful
20
 *  David McKnight     (IBM)   [400251] [dstore] backup files cause problem when parent folder is read-only
20
 *  David McKnight     (IBM)   [400251] [dstore] backup files cause problem when parent folder is read-only
21
 *  David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
21
 *******************************************************************************/
22
 *******************************************************************************/
22
23
23
package org.eclipse.dstore.core.model;
24
package org.eclipse.dstore.core.model;
Lines 190-196 Link Here
190
	
191
	
191
		if (fileName != null)
192
		if (fileName != null)
192
		{
193
		{
193
			_dataStore.trace("Receiving Bytes for " + fileName); //$NON-NLS-1$
194
			if (!_dataStore.isVirtual()){
195
				_dataStore.trace("Receiving Bytes for " + fileName); //$NON-NLS-1$
196
				String[] auditData = new String[] {"WRITE", remotePath, null, null}; //$NON-NLS-1$
197
				_dataStore.getClient().getLogger().logAudit(auditData);			
198
			}
194
			try
199
			try
195
			{
200
			{
196
				// need to create directories as well
201
				// need to create directories as well
Lines 233-238 Link Here
233
				fileStream.close();
238
				fileStream.close();
234
				
239
				
235
				deleteBackupFile(newFile, backupFile);
240
				deleteBackupFile(newFile, backupFile);
241
				
242
				if (!_dataStore.isVirtual()){
243
					String[] auditData = new String[] {"WRITE", remotePath, "0", null}; //$NON-NLS-1$ //$NON-NLS-2$
244
					_dataStore.getClient().getLogger().logAudit(auditData);
245
				}
236
				if (status == null)
246
				if (status == null)
237
					return;
247
					return;
238
				status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
248
				status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
Lines 276-282 Link Here
276
286
277
		if (fileName != null)
287
		if (fileName != null)
278
		{
288
		{
279
			_dataStore.trace("Receiving Appended Bytes for " + fileName); //$NON-NLS-1$
289
			if (!_dataStore.isVirtual()){
290
				_dataStore.trace("Receiving Appended Bytes for " + fileName); //$NON-NLS-1$
291
				String[] auditData = new String[] {"WRITE", remotePath, null, null}; //$NON-NLS-1$
292
				_dataStore.getClient().getLogger().logAudit(auditData);
293
			}
280
			try
294
			try
281
			{
295
			{
282
				// need to create directories as well
296
				// need to create directories as well
Lines 323-329 Link Here
323
					outStream.close();
337
					outStream.close();
324
338
325
				}
339
				}
326
	
340
				if (!_dataStore.isVirtual()){
341
					String[] auditData = new String[] {"WRITE", remotePath, "0", null}; //$NON-NLS-1$ //$NON-NLS-2$
342
					_dataStore.getClient().getLogger().logAudit(auditData);
343
				}
327
				if (status == null)
344
				if (status == null)
328
					return;
345
					return;
329
				status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
346
				status.setAttribute(DE.A_SOURCE, "success"); //$NON-NLS-1$
(-)a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/IServerLogger.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2010 IBM Corporation and others.
2
 * Copyright (c) 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-17 Link Here
12
 * Contributors:
12
 * Contributors:
13
 *  Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
13
 *  Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 *  David McKnight  (IBM)  - [305272] [dstore][multithread] log close in ServerLogger
14
 *  David McKnight  (IBM)  - [305272] [dstore][multithread] log close in ServerLogger
15
 *  David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
15
 *******************************************************************************/
16
 *******************************************************************************/
16
17
17
package org.eclipse.dstore.core.server;
18
package org.eclipse.dstore.core.server;
Lines 62-65 Link Here
62
	 * @since 3.2
63
	 * @since 3.2
63
	 */
64
	 */
64
	public void closeLogFileStream();
65
	public void closeLogFileStream();
66
	
67
	/**
68
	 * logAudit
69
	 * 
70
	 * @param data information to log.
71
	 */
72
	public void logAudit(String[] data);	
65
}
73
}
(-)a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerLogger.java (-1 / +11 lines)
Lines 1-5 Link Here
1
/********************************************************************************
1
/********************************************************************************
2
 * Copyright (c) 2002, 2012 IBM Corporation. All rights reserved.
2
 * Copyright (c) 2002, 2013 IBM Corporation. All rights reserved.
3
 * This program and the accompanying materials are made available under the terms
3
 * This program and the accompanying materials are made available under the terms
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
5
 * available at http://www.eclipse.org/legal/epl-v10.html
5
 * available at http://www.eclipse.org/legal/epl-v10.html
Lines 26-31 Link Here
26
 * David McKnight  (IBM)  - [351993] [dstore] not able to connect to server if .eclipse folder not available
26
 * David McKnight  (IBM)  - [351993] [dstore] not able to connect to server if .eclipse folder not available
27
 * David McKnight  (IBM)  - [366220] Log_To_File no longer default value for log_location in rsecomm.properties
27
 * David McKnight  (IBM)  - [366220] Log_To_File no longer default value for log_location in rsecomm.properties
28
 * David McKnight  (IBM)  - [391774] [dstore] NPE if user-log directory cannot be created
28
 * David McKnight  (IBM)  - [391774] [dstore] NPE if user-log directory cannot be created
29
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
29
 ********************************************************************************/
30
 ********************************************************************************/
30
31
31
package org.eclipse.dstore.core.server;
32
package org.eclipse.dstore.core.server;
Lines 326-329 Link Here
326
		}
327
		}
327
	}
328
	}
328
329
330
	/**
331
	 * logAudit
332
	 * 
333
	 * @param data information to log.
334
	 */
335
	public void logAudit(String[] data){	
336
		// initial implementation is a no-op but extenders (i.e. zosServerLogger) can provide 
337
		// required function
338
	}
329
}
339
}
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java (-1 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2012 IBM Corporation and others.
2
 * Copyright (c) 2002, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 46-51 Link Here
46
 * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
46
 * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
47
 * David McKnight   (IBM)        - [390037] [dstore] Duplicated items in the System view
47
 * David McKnight   (IBM)        - [390037] [dstore] Duplicated items in the System view
48
 * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
48
 * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
49
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
49
 *******************************************************************************/
50
 *******************************************************************************/
50
51
51
package org.eclipse.rse.dstore.universal.miners;
52
package org.eclipse.rse.dstore.universal.miners;
Lines 749-758 Link Here
749
				}
750
				}
750
				else if (readOnly)
751
				else if (readOnly)
751
				{
752
				{
753
			        String[] auditData = new String[] {"SET-READONLY", filename.getAbsolutePath(), null, null}; //$NON-NLS-1$
754
			     	UniversalServerUtilities.logAudit(auditData, _dataStore);
755
752
					done = filename.setReadOnly();
756
					done = filename.setReadOnly();
753
				}
757
				}
754
				else
758
				else
755
				{
759
				{
760
			        String[] auditData = new String[] {"SET-READWRITE", filename.getAbsolutePath(), null, null}; //$NON-NLS-1$
761
			     	UniversalServerUtilities.logAudit(auditData, _dataStore);
762
			     	
756
					// doesn't handle non-unix
763
					// doesn't handle non-unix
757
					if (!_isWindows)
764
					if (!_isWindows)
758
					{
765
					{
Lines 816-821 Link Here
816
			status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
823
			status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_DOES_NOT_EXIST);
817
		else {
824
		else {
818
			try {
825
			try {
826
827
		        String[] auditData = new String[] {"SET-LAST-MODIFIED", filename.getAbsolutePath(), null, null}; //$NON-NLS-1$
828
		     	UniversalServerUtilities.logAudit(auditData, _dataStore);
829
				
830
819
				String str = subject.getAttribute(DE.A_SOURCE);
831
				String str = subject.getAttribute(DE.A_SOURCE);
820
832
821
				long date = Long.parseLong(str);
833
				long date = Long.parseLong(str);
Lines 2093-2098 Link Here
2093
	private DataElement handleSetFilePermissions(DataElement subject, DataElement newPermissions, DataElement status)
2105
	private DataElement handleSetFilePermissions(DataElement subject, DataElement newPermissions, DataElement status)
2094
	{
2106
	{
2095
		File file = getFileFor(subject);
2107
		File file = getFileFor(subject);
2108
		
2109
        String[] auditData = new String[] {"SET-PERMISSIONS", file.getAbsolutePath(), null, null}; //$NON-NLS-1$
2110
     	UniversalServerUtilities.logAudit(auditData, _dataStore);
2111
     	
2096
2112
2097
		String permissionsStr = newPermissions.getName();
2113
		String permissionsStr = newPermissions.getName();
2098
		String[] permAttributes = permissionsStr.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
2114
		String[] permAttributes = permissionsStr.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/UniversalServerUtilities.java (-1 / +13 lines)
Lines 1-5 Link Here
1
/********************************************************************************
1
/********************************************************************************
2
 * Copyright (c) 2002, 2008 IBM Corporation. All rights reserved.
2
 * Copyright (c) 2002, 2013 IBM Corporation. All rights reserved.
3
 * This program and the accompanying materials are made available under the terms
3
 * This program and the accompanying materials are made available under the terms
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
5
 * available at http://www.eclipse.org/legal/epl-v10.html
5
 * available at http://www.eclipse.org/legal/epl-v10.html
Lines 14-19 Link Here
14
 * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
15
 * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
15
 * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
16
 * Noriaki Takatsu (IBM) - [239068] [multithread] "client.username" property must be set via dataStore Client
16
 * Noriaki Takatsu (IBM) - [239068] [multithread] "client.username" property must be set via dataStore Client
17
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
17
 ********************************************************************************/
18
 ********************************************************************************/
18
19
19
package org.eclipse.rse.dstore.universal.miners;
20
package org.eclipse.rse.dstore.universal.miners;
Lines 98-101 Link Here
98
		dataStore.getClient().getLogger().logDebugMessage(minerName, message);
99
		dataStore.getClient().getLogger().logDebugMessage(minerName, message);
99
	}
100
	}
100
101
102
	
103
	/**
104
	 * logAudit
105
	 * 
106
	 * @param data information to be logged
107
	 * @param dataStore
108
	 */
109
	public static void logAudit(String[] data, DataStore dataStore)
110
	{
111
		dataStore.getClient().getLogger().logAudit(data);
112
	}
101
}
113
}
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/command/CommandMinerThread.java (-2 / +25 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2012 IBM Corporation and others.
2
 * Copyright (c) 2003, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 38-43 Link Here
38
 *  David McKnight   (IBM)     [372968] [dstore][shell] provide support for csh and tcsh shells
38
 *  David McKnight   (IBM)     [372968] [dstore][shell] provide support for csh and tcsh shells
39
 *  David McKnight   (IBM)     [395306] [dstore] Regression for CommandMinerThread authority
39
 *  David McKnight   (IBM)     [395306] [dstore] Regression for CommandMinerThread authority
40
 *  David McKnight   (IBM)     [395465] [dstore][shells] customer hit an NPE on shell cleanup
40
 *  David McKnight   (IBM)     [395465] [dstore][shells] customer hit an NPE on shell cleanup
41
 *  David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
41
 *******************************************************************************/
42
 *******************************************************************************/
42
 
43
 
43
package org.eclipse.rse.internal.dstore.universal.miners.command;
44
package org.eclipse.rse.internal.dstore.universal.miners.command;
Lines 351-356 Link Here
351
						if (suCommand!=null)
352
						if (suCommand!=null)
352
							_invocation = suCommand + _invocation;
353
							_invocation = suCommand + _invocation;
353
354
355
						
356
				        String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$
357
				     	UniversalServerUtilities.logAudit(auditData, _dataStore);
358
						
359
354
						_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
360
						_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
355
					}
361
					}
356
				}
362
				}
Lines 401-407 Link Here
401
								argsList.add("-L"); //$NON-NLS-1$
407
								argsList.add("-L"); //$NON-NLS-1$
402
								didLogin = true;
408
								didLogin = true;
403
							}
409
							}
404
														
410
													
411
							
412
					        String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$
413
					     	UniversalServerUtilities.logAudit(auditData, _dataStore);							
414
405
						    String args[] = (String[])argsList.toArray(new String[argsList.size()]);
415
						    String args[] = (String[])argsList.toArray(new String[argsList.size()]);
406
					    						    
416
					    						    
407
							try {
417
							try {
Lines 418-423 Link Here
418
								_invocation = suCommand + _invocation;								
428
								_invocation = suCommand + _invocation;								
419
							}
429
							}
420
							
430
							
431
					        String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$
432
					     	UniversalServerUtilities.logAudit(auditData, _dataStore);
433
							
434
421
							if (customShellInvocation != null && customShellInvocation.length() > 0){
435
							if (customShellInvocation != null && customShellInvocation.length() > 0){
422
								// all handled in the custom shell invocation
436
								// all handled in the custom shell invocation
423
								_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
437
								_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
Lines 460-465 Link Here
460
						argsList.add("-c"); //$NON-NLS-1$
474
						argsList.add("-c"); //$NON-NLS-1$
461
						argsList.add(_invocation);
475
						argsList.add(_invocation);
462
						
476
						
477
						
478
				        String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$
479
				     	UniversalServerUtilities.logAudit(auditData, _dataStore);						
480
						
481
463
						String args[] = (String[])argsList.toArray(new String[argsList.size()]);	
482
						String args[] = (String[])argsList.toArray(new String[argsList.size()]);	
464
						_theProcess = Runtime.getRuntime().exec(args, env, theDirectory);				
483
						_theProcess = Runtime.getRuntime().exec(args, env, theDirectory);				
465
					}
484
					}
Lines 694-699 Link Here
694
			input.getBytes();
713
			input.getBytes();
695
			UniversalServerUtilities.logInfo(getName(), "shell input after char conversion="+input, _dataStore); //$NON-NLS-1$
714
			UniversalServerUtilities.logInfo(getName(), "shell input after char conversion="+input, _dataStore); //$NON-NLS-1$
696
			
715
			
716
			
717
	        String[] auditData = new String[] {"SHELL-INPUT", input, null, null}; //$NON-NLS-1$
718
	     	UniversalServerUtilities.logAudit(auditData, _dataStore);
719
			
697
			if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$
720
			if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$
698
				input = origInput.replaceAll("export ", "setenv ").replaceAll("=", " ");  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
721
				input = origInput.replaceAll("export ", "setenv ").replaceAll("=", " ");  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
699
			}			
722
			}			
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CopyThread.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
2
 * Copyright (c) 2007, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-18 Link Here
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
15
 * David McKnight  (IBM)  - [290290] [dstore] Error message when copy a file from another user’s folder
15
 * David McKnight  (IBM)  - [290290] [dstore] Error message when copy a file from another user’s folder
16
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
19
Lines 89-94 Link Here
89
	
90
	
90
	protected void doCopyCommand(String source, String tgt, boolean folderCopy, DataElement status)
91
	protected void doCopyCommand(String source, String tgt, boolean folderCopy, DataElement status)
91
	{
92
	{
93
        String[] auditData = new String[] {"COPY", source, tgt, null}; //$NON-NLS-1$
94
    	UniversalServerUtilities.logAudit(auditData, _dataStore);
95
92
		String command = null;
96
		String command = null;
93
		if (isWindows) {
97
		if (isWindows) {
94
			
98
			
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFileThread.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-18 Link Here
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
16
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
19
Lines 118-123 Link Here
118
			if (filename.exists())
119
			if (filename.exists())
119
				_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
120
				_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
120
			else {
121
			else {
122
		        String[] auditData = new String[] {"CREATE-FILE", filename.getAbsolutePath(), null, null}; //$NON-NLS-1$
123
		     	UniversalServerUtilities.logAudit(auditData, _dataStore);
124
121
				try {
125
				try {
122
					boolean done = filename.createNewFile();
126
					boolean done = filename.createNewFile();
123
					if (ArchiveHandlerManager.getInstance().isArchive(filename)) {
127
					if (ArchiveHandlerManager.getInstance().isArchive(filename)) {
Lines 174-179 Link Here
174
		}
178
		}
175
//		VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
179
//		VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
176
		handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
180
		handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
181
		
182
        String[] auditData = new String[] {"MODIFY-ARCHIVE", handler.getArchive().getAbsolutePath(), null, null}; //$NON-NLS-1$
183
     	UniversalServerUtilities.logAudit(auditData, _dataStore);
184
     	
177
		handler.createFile(vpath.getVirtualPart(), systemOperationMonitor);
185
		handler.createFile(vpath.getVirtualPart(), systemOperationMonitor);
178
186
179
		status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
187
		status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/CreateFolderThread.java (-1 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-18 Link Here
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
16
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
19
Lines 124-129 Link Here
124
				_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
125
				_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
125
			else
126
			else
126
			{
127
			{
128
		        String[] auditData = new String[] {"CREATE-FOLDER", filename.getAbsolutePath(), null, null}; //$NON-NLS-1$
129
		     	UniversalServerUtilities.logAudit(auditData, _dataStore);
130
127
				try {
131
				try {
128
					boolean done = filename.mkdirs();
132
					boolean done = filename.mkdirs();
129
					if (done)
133
					if (done)
Lines 167-172 Link Here
167
		}
171
		}
168
//		VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
172
//		VirtualChild child = handler.getVirtualFile(vpath.getVirtualPart());
169
		handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
173
		handler.getVirtualFile(vpath.getVirtualPart(), systemOperationMonitor);
174
		
175
        String[] auditData = new String[] {"MODIFY-ARCHIVE", handler.getArchive().getAbsolutePath(), null, null}; //$NON-NLS-1$
176
     	UniversalServerUtilities.logAudit(auditData, _dataStore);		
177
170
		handler.createFolder(vpath.getVirtualPart(), systemOperationMonitor);
178
		handler.createFolder(vpath.getVirtualPart(), systemOperationMonitor);
171
179
172
		status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
180
		status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS);
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/DeleteThread.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2012 IBM Corporation and others.
2
 * Copyright (c) 2007, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 17-22 Link Here
17
 * David McKnight   (IBM)        - [321026][dstore] Broken symbolic link can't be removed
17
 * David McKnight   (IBM)        - [321026][dstore] Broken symbolic link can't be removed
18
 * David McKnight   (IBM)        - [342450][dstore] Real files should not be deleted when deleting a symbolic link
18
 * David McKnight   (IBM)        - [342450][dstore] Real files should not be deleted when deleting a symbolic link
19
 * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
19
 * David McKnight   (IBM)        - [392012] [dstore] make server safer for delete operations
20
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
20
 *******************************************************************************/
21
 *******************************************************************************/
21
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
22
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
22
23
Lines 157-162 Link Here
157
						"The object to delete does not exist", null, _dataStore); //$NON-NLS-1$
158
						"The object to delete does not exist", null, _dataStore); //$NON-NLS-1$
158
			} else {
159
			} else {
159
				try {
160
				try {
161
			        String[] auditData = new String[] {"DELETE", deleteObj.getAbsolutePath(), null, null};
162
			     	UniversalServerUtilities.logAudit(auditData, _dataStore);
163
160
					if (classification != null && classification.startsWith("symbolic link")){ //$NON-NLS-1$
164
					if (classification != null && classification.startsWith("symbolic link")){ //$NON-NLS-1$
161
						// only delete the link - no the actual file or folder contents
165
						// only delete the link - no the actual file or folder contents
162
						deleteObj.delete();
166
						deleteObj.delete();
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/RenameThread.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-18 Link Here
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
13
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
14
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
15
 * Martin Oberhuber (Wind River) - [199854][api] Improve error reporting for archive handlers
16
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
18
19
Lines 121-126 Link Here
121
			_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
122
			_status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED_WITH_EXIST);
122
		else {
123
		else {
123
			try {
124
			try {
125
		        String[] auditData = new String[] {"RENAME", fileoldname.getAbsolutePath(), filerename.getAbsolutePath(), null}; //$NON-NLS-1$
126
		     	UniversalServerUtilities.logAudit(auditData, _dataStore);
127
124
				boolean done = fileoldname.renameTo(filerename);
128
				boolean done = fileoldname.renameTo(filerename);
125
				if (done) {
129
				if (done) {
126
					_subject.setAttribute(DE.A_NAME, filerename.getName());
130
					_subject.setAttribute(DE.A_NAME, filerename.getName());
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalDownloadHandler.java (-2 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2012 IBM Corporation and others.
2
 * Copyright (c) 2006, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 16-21 Link Here
16
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
16
 * Noriaki Takatsu (IBM)  - [220126] [dstore][api][breaking] Single process server for multiple clients
17
 * David McKnight  (IBM)  - [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
17
 * David McKnight  (IBM)  - [dstore] cancelable threads not removed fast enough from Hashmap, resulting in OOM
18
 * David McKnight   (IBM)  - [396783] [dstore] fix issues with the spiriting mechanism and other memory improvements (phase 2)
18
 * David McKnight   (IBM)  - [396783] [dstore] fix issues with the spiriting mechanism and other memory improvements (phase 2)
19
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
19
 *******************************************************************************/
20
 *******************************************************************************/
20
21
21
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
22
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
Lines 127-133 Link Here
127
				_dataStore.trace("download:" + remotePath + "," + elementType); //$NON-NLS-1$ //$NON-NLS-2$
128
				_dataStore.trace("download:" + remotePath + "," + elementType); //$NON-NLS-1$ //$NON-NLS-2$
128
129
129
				File file = new File(remotePath);
130
				File file = new File(remotePath);
130
131
		        String[] auditData = new String[] {"READ", file.getAbsolutePath(), null, null}; //$NON-NLS-1$
132
		     	UniversalServerUtilities.logAudit(auditData, _dataStore);
131
133
132
				if (elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
134
				if (elementType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
133
				{
135
				{
(-)a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/internal/dstore/universal/miners/filesystem/UniversalSearchHandler.java (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2012 IBM Corporation and others.
2
 * Copyright (c) 2006, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 31-36 Link Here
31
 * David McKnight   (IBM) - [371401] [dstore][multithread] avoid use of static variables - causes memory leak after disconnect
31
 * David McKnight   (IBM) - [371401] [dstore][multithread] avoid use of static variables - causes memory leak after disconnect
32
 * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
32
 * Noriaki Takatsu  (IBM) - [380562] [multithread][dstore] File Search is not canceled by the client UI on disconnect
33
 * David McKnight   (IBM)        - [396783] [dstore] fix issues with the spiriting mechanism and other memory improvements (phase 2)
33
 * David McKnight   (IBM)        - [396783] [dstore] fix issues with the spiriting mechanism and other memory improvements (phase 2)
34
 * David McKnight   (IBM) - [414016] [dstore] new server audit log requirements
34
 ********************************************************************************/
35
 ********************************************************************************/
35
36
36
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
37
package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
Lines 393-398 Link Here
393
			return true;
394
			return true;
394
		}
395
		}
395
396
397
        String[] auditData = new String[] {"READ", theFile.getAbsolutePath(), null, null}; //$NON-NLS-1$
398
     	UniversalServerUtilities.logAudit(auditData, _dataStore);
396
		FileInputStream inputStream = null;
399
		FileInputStream inputStream = null;
397
400
398
		try {
401
		try {

Return to bug 414016