Commit Graph

80 Commits

Author SHA1 Message Date
Mike Blumenkrantz 7c7927bd4e patch from Maxime Villard fixing a bug in EFM which could cause data loss when dragging directories onto external devices
SVN revision: 79319
2012-11-15 07:31:05 +00:00
Mike Blumenkrantz 568b106bd3 some patch from Maxime Villard for secure deletion fixes again
SVN revision: 78876
2012-11-02 21:02:26 +00:00
Mike Blumenkrantz 7de1d89a0b fix process updating for secure delete operations, efm_op now requires libmath
SVN revision: 78864
2012-11-02 13:44:37 +00:00
Vincent Torri a0bf30b75c E17:
I. Simplification, andif we cannot stat(), the best
thing to do is toswitch to a copy-delete operation.

II.Just stuff...

III. There is a problem with _e_fm_op_random_char().
When wewant to randomize a string we do srand(time())
foreachcharacter, so if the file is small enough
to be deleted inless than a second, it's not randomized.
And even if it's bigger, it's not goodly randomized.Sorry.

Patch by Maxime Villard rustyBSD


SVN revision: 78469
2012-10-25 17:43:52 +00:00
Mike Blumenkrantz 57d8dd8f9b fix cross-device cut+paste
ticket #1638


SVN revision: 78154
2012-10-18 07:55:34 +00:00
Mike Blumenkrantz f5dd030696 patch from rustyBSD fixing file moving to other devices
ticket #1581


SVN revision: 77342
2012-10-03 06:27:40 +00:00
Vincent Torri 0f76b94fc8 E17:
some trivial changes.

I.   _e_fm_op_stdin_handler is unused, so -> removed.

II.  if we cannot malloc _e_fm_op_stdin_buffer, we
     are in big shit, so nullcheck.

III. Formatting.

IV.  if argc < 4 we quit, so we don't need to check
     if argc >= 4.

V.   removed 'ret' variables. They are useless and
     they were not in old revisions.

VI.  _e_fm_op_copy_atom always returns 1, so we don't
     need to always check and return 1.

Patch by Maxime Villard (rustyBSD)


SVN revision: 77221
2012-09-30 08:47:07 +00:00
rustyBSD 1093c09cab From: rustyBSD <rustyBSD@gmx.fr>
Subject: Re: [E-devel] E SVN: caro trunk/e/src/bin



SVN revision: 77216
2012-09-29 02:22:43 +00:00
Carsten Haitzler dfb8541aad allow secure remove to be able to write multiple times... in theory...
but for now it's once. :)



SVN revision: 77147
2012-09-27 10:10:20 +00:00
Carsten Haitzler 17ce568685 lets "secure rm" with buffers of 64k per write and handle dangling
tail too.



SVN revision: 77146
2012-09-27 09:59:36 +00:00
Vincent Torri a7f6c22f5d E17: Added secure delete option (experimental !). Wait for discomfitor to add it to EFM conf panel
When removing a file, we store a E_FM_OP_DESTROY task,
which overwrites file with 3 passes of (~)randomized
data, and when we store a E_FM_OP_REMOVE task, to remove
the randomized file.

If it's a dir, skip E_FM_OP_DESTROY.

Patch by Maxime Villard (rustyBSD)


SVN revision: 77020
2012-09-22 18:29:03 +00:00
Vincent Torri d5e3385fd9 E17: avoid seg fault when the string passed to strlen() is NULL
Patch by Maxime Villard (rustyBSD)


SVN revision: 77016
2012-09-22 12:07:49 +00:00
Vincent Torri 7f93d7305b E17: Patch from Maxime Villard (rustyBSD)
I.
    (strncmp(p, p2, PATH_MAX) == 0) &&
    ((p[p2_len] == '/') || (p[p2_len] == '\0')))

Here we want to know if p and p2 are the same.
It's easier to do a simple 'strcmp(p, p2)', and it's
useless to check the value of p[p2_len], because if
p = p2, p[p2_len] will always be \0.

II. Check the string as for E_FM_OP_MOVE.

III. Just a simplification.
it was something like:
    if (type == E_FM_OP_COPY)
        X;
    if (type == E_FM_OP_COPY)
        Y;
    else ...

I just replaced by
    if (type == E_FM_OP_COPY)
    {
        X;
        Y;
    }
    else ...


SVN revision: 77015
2012-09-22 12:04:42 +00:00
Vincent Torri 8d8f697a3f E17: useless header, useless 'else' and 2 times the same check
Patch by Maxime Villard (rustyBSD)


SVN revision: 76773
2012-09-17 17:25:44 +00:00
Maxime Villard 3dc989c695 From: Maxime Villard <rustyBSD@gmx.fr>
There is a problem with the realpath() call. When moving
a symlink, realpath() gets the path of the pointed file,
and the name assigned to the copied link is the name of
this file.

So we shouldn't use realpath(), but I don't know an equivalent
which doesn't take care of symlinks.

Here is an example patch.


SVN revision: 76721
2012-09-17 03:57:04 +00:00
Mike Blumenkrantz affc6d8d25 another efm_op patch from Maxime Villard, I don't even know what it does
SVN revision: 76686
2012-09-14 17:00:41 +00:00
Mike Blumenkrantz 80c6165036 with the work of Maxime Villard <rustyBSD@gmx.fr>, efm_op can now move files directly when they're on the same device instead of copying then deleting the original
SVN revision: 76674
2012-09-14 15:09:05 +00:00
Maxime Villard 0d45c19468 From: Maxime Villard <rustyBSD@gmx.fr>
$ mkdir /home/test/EMPTY
 $ mkdir /home/test/FULL
 $ cd /home/test
 $ ln -s EMPTY link

 Now move (with EFM) the 'FULL' folder to the 'link' (without
 opening it), and 'FULL' diseappear.

 As the symlink points directly to 'EMPTY', we have not the
 full path. So the 'FULL' directory is moved to ~/, instead
 of the desired dest.

 Here is a quickly-made a patch.


SVN revision: 76591
2012-09-13 08:34:24 +00:00
Mike Blumenkrantz 3e1bb5843c send initial progress from efm slave to set src and dest paths in efm
SVN revision: 76416
2012-09-10 15:46:38 +00:00
Mike Blumenkrantz f59fa03035 send progress of 0% when overwrite warning is sent to ensure that we have the src and dest accessible in efm
SVN revision: 76412
2012-09-10 14:39:07 +00:00
Mike Blumenkrantz 5e7a8a0892 SVN revision: 75698
SPANK SPANK SPANK, DO NOT COMMIT PATCHES YOU DO NOT UNDERSTAND OR HAVE NOT TESTED.


SVN revision: 75988
2012-09-03 09:39:30 +00:00
Vincent Torri f84af67928 E17: remove useless symlink (as we don't rename anymore) and remove useless function _e_fm_op_update_progress_report_simple()
Patch by Maxime Villard

SVN revision: 75698
2012-08-25 09:22:09 +00:00
Vincent Torri 4812a5f372 E: minor changes
* useless define
 * formatting and useless comment
 * fread() returns a number >= 0
 * symlink returns -1 on error

SVN revision: 75687
2012-08-24 22:18:43 +00:00
Vincent Torri 053476d676 E: managing overwrite when moving files
The rename() function deletes dest file if it exists,
so there is no overwrite handling. Instead of
testing a rename() and if it fails creating a task
to copy-delete the file, we directly create this
task, which handles overwrite.

Patch by Maxime Villard (rustyBSD)


SVN revision: 75489
2012-08-21 07:40:31 +00:00
Vincent Torri 25aa4e5a89 E: add overwrite handling.
Patch by Maxime Villard (rustyBSD)

SVN revision: 75436
2012-08-19 18:35:10 +00:00
Vincent Torri d9f3d89a07 E: remove useless op
we chmod the created symlink. It's useless, because
we use stat() which gives st_mode of pointed file/folder,
and then we use chmod(), which follows symlink; so we
are chmoding a file to the same permissions it had
before.

Patch by Maxile Villard

SVN revision: 75435
2012-08-19 18:27:18 +00:00
Mike Blumenkrantz e7c7be6b1a replace FREE with E_FREE for consistency, use E_FREE instead of free
SVN revision: 74626
2012-07-31 09:06:26 +00:00
Vincent Torri 72c6b4e4a3 E17: fix race condition when copying a file
during the copy, the file can be accessed by users.
See http://cwe.mitre.org/data/definitions/689.html
So we apply the access rights after the creation of
the dest file.

Patch by Maxime Villard


SVN revision: 74284
2012-07-21 18:20:19 +00:00
Vincent Torri 6b430e4489 E17: fix typo
Patch by Maxime Villard


SVN revision: 74281
2012-07-21 18:02:07 +00:00
Vincent Torri 435a620992 check if the name has a 'file' part
SVN revision: 74266
2012-07-21 13:53:54 +00:00
Vincent Torri 4d0cfed7b9 whitespaces--
SVN revision: 74265
2012-07-21 13:51:04 +00:00
Vincent Torri 7e40b5f15a E17: symlink fixes
when copying symlinks, it creates a symlink to the
destination but with the name of the pointed file/folder.

It causes problems, ex: we can't copy two symlinks
pointing to the same file, because they will have the
same name.

Also when copying, if it's a link, we fill the destination
in the struct task, then, after we check overwrite with
_e_fm_op_handle_overwrite()

Here is a patch which corrects this.

Patch by Maxime Villard (rustyBSD), modified a bit by me (add 2 free() + formatting)


SVN revision: 74264
2012-07-21 13:48:35 +00:00
Carsten Haitzler 7ac8b4fd31 that is bad code as rusty says - though fix it a different way.
SVN revision: 74252
2012-07-20 14:40:19 +00:00
Vincent Torri c3b0637802 e17: whitespaces--
SVN revision: 72561
2012-06-21 06:19:43 +00:00
Mike Blumenkrantz 1807ea8dae on second thought, don't remove the delete task if we're still waiting for an overwrite confirmation
SVN revision: 72396
2012-06-18 13:21:52 +00:00
Mike Blumenkrantz 251a9b479a delete the rm task from the efm slave if there is a failure during the copy task
this should fix the problem described by the very angry message in ticket #729


SVN revision: 72395
2012-06-18 13:17:48 +00:00
Mike Blumenkrantz bd73abaffa formatting
SVN revision: 72392
2012-06-18 12:49:07 +00:00
Cedric BAIL 70d21a1f44 e: move everyone to use eina_file_direct_ls and friend.
NOTE: I think, but I am not sure yet, that only EFM should
do this kind of operation or it could hard lock E17.


SVN revision: 70546
2012-04-30 07:07:33 +00:00
Vincent Torri c30aaf8dde e17: remove some shadow variables
SVN revision: 70190
2012-04-15 08:09:56 +00:00
Carsten Haitzler 66decc410d fix del of directories and copy too.
SVN revision: 66010
2011-12-08 03:34:44 +00:00
Carsten Haitzler 7e0ff05ad1 lets' delete files again shall we efm?
SVN revision: 65591
2011-11-25 07:13:41 +00:00
Carsten Haitzler de643868c5 all in comments.
SVN revision: 63805
2011-10-04 11:38:52 +00:00
Rafael Antognolli 65d7934e30 e_fm: move should compare both paths totally.
Comparing just until the strlen(p2) won't allow to move an inner directory to
a parent directory.



SVN revision: 59948
2011-06-04 05:19:01 +00:00
Christopher Michael 3239c1875c E: e_fm_op: Cleanup lots of compiler warnings.
SVN revision: 59599
2011-05-22 17:06:25 +00:00
Lucas De Marchi 25113159a5 Fix common misspellings
Some misspellings were manually reverted since in E there are tons of .po with
phrases in other languages. Other than that all the changes in the following
files were reverted:

 * src/modules/illume/dicts/English_(US).dic
 * src/modules/illume-keyboard/dicts/English_(US).dic


Following misspellings were fixed:

acquited->acquitted
adres->address
adress->address
alreayd->already
aquire->acquire
arbitarily->arbitrarily
cant->can't
Capetown->Cape
carefull->careful
causalities->casualties
Celcius->Celsius
certian->certain
commandoes->commandos
considerd->considered
conveyer->conveyor
dependant->dependent
didnt->didn't
discontentment->discontent
doesnt->doesn't
everytime->every
exemple->example
existance->existence
existant->existent
existince->existence
Farenheit->Fahrenheit
forbad->forbade
funguses->fungi
guage->gauge
guerilla->guerrilla
guerillas->guerrillas
happend->happened
hasnt->hasn't
heros->heroes
inbetween->between
independant->independent
inital->initial
intrusted->entrusted
irregardless->regardless
isnt->isn't
knifes->knives
layed->laid
loosing->losing
marrage->marriage
midwifes->midwives
miniscule->minuscule
monickers->monikers
mroe->more
noone->no one
occured->occurred
omre->more
paralell->parallel
payed->paid
planed->planned
quitted->quit
quizes->quizzes
seperated->separated
seperate->separate
shoudl->should
similiar->similar
simplier->simpler
specifiying->specifying
teh->the
toke->took
torpedos->torpedoes
Tuscon->Tucson
unecessary->unnecessary
useage->usage
usefull->useful
useing->using
waht->what
wanna->want
whith->with
wich->which
withing->within




SVN revision: 52006
2010-09-08 23:59:07 +00:00
Lucas De Marchi 63f07459a0 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Christopher Michael f5282a1018 Add unused.
SVN revision: 51370
2010-08-18 22:20:52 +00:00
Lucas De Marchi 6638a10e20 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Cedric BAIL c6a118d738 * e: remove warning due to Ecore API change.
SVN revision: 49833
2010-06-24 16:19:12 +00:00
Vincent Torri 7e7e0a8a55 fix last void * arith
SVN revision: 44562
2009-12-19 08:39:11 +00:00