Re: Is libefs write-only?



ERDI Gergo wrote:

> Hi,
>
> It looks like the libefs hackers have finally created a write-only data
> storage method, optimal for top-secret military applications.

This extra level of security is provided by the bonobo efs driver ;-)

Please can you test the attached patch for gnome-stream-efs.c

Regards

    Dietmar
Index: gnome-stream-efs.c
===================================================================
RCS file: /cvs/gnome/bonobo/storage-modules/gnome-stream-efs.c,v
retrieving revision 1.11
diff -r1.11 gnome-stream-efs.c
45c45
< 			    buffer->_length) == -1) {
---
> 			    buffer->_length)) {
61d60
< 	CORBA_long bytes;
73,75c72
< 	bytes = efs_file_read (stream_efs->file, data, count);
< 
< 	if (bytes < 0) {
---
> 	if (efs_file_read (stream_efs->file, data, count)) {
79c76
< 		CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
---
> 		CORBA_exception_set (ev, CORBA_USER_EXCEPTION, 
81,83c78
< 	} else {
< 		(*buffer)->_buffer = data;
< 		(*buffer)->_length = bytes;
---
> 		return;
84a80,82
> 
> 	(*buffer)->_buffer = data;
> 	(*buffer)->_length = count;
90a89,90
> 	guint32 pos;
> 
95c95
< 		fw = SEEK_CUR;
---
> 		fw = EFS_SEEK_CUR;
97c97
< 		fw = SEEK_END;
---
> 		fw = EFS_SEEK_END;
99c99
< 		fw = SEEK_SET;
---
> 		fw = EFS_SEEK_SET;
101c101,113
< 	return efs_file_seek (stream_efs->file, offset, fw);
---
> 	if (efs_file_seek (stream_efs->file, offset, fw)) {
> 		CORBA_exception_set (ev, CORBA_USER_EXCEPTION, 
> 				     ex_Bonobo_Stream_IOError, NULL);
> 		return 0;
> 	}
> 	
> 	if (efs_file_tell (stream_efs->file, &pos)) {
> 		CORBA_exception_set (ev, CORBA_USER_EXCEPTION, 
> 				     ex_Bonobo_Stream_IOError, NULL);
> 		return 0;
> 	}
> 
> 	return pos;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]