Commit Graph

44 Commits

Author SHA1 Message Date
Carsten Haitzler 8669ab8a98 eet - add new api to verify eet file against stored cert
this api makes it far more obvious as to how to verify an eet file via
the eet identify mechanisms that use x509 certificates to sign files.
this is consistent with the api used to generate the key for sigining
thus you can use the same certificate file to compare against for
identify.

@feature
2014-11-28 17:56:27 +09:00
Jérémy Zurcher 2e5a5d6656 eet: call LOCK_CACHE before altering Eet_File
even if not necessary in this particular case,
do as in eet_mmap() and eet_open(),
lock the cache before altering Eet_File struct.

fix CID 1039366 1039367 1039368 1039369
2014-09-08 22:37:09 +02:00
Carsten Haitzler b0adec349f eet - handle fcntl error
fix CID 1039691
2014-08-27 16:35:48 +09:00
Stefan Schmidt 3fe554e0b6 build: Allow to use external liblz4 instead of embedded copy
While we are likely will keep the embedded copy for a while to avoid a really
new dependency we allow now to use the external liblz4. You need at least
revision r120 and a package that ships the pc file for it.

Personally I would like to get rid of it rather sooner than later due to the
security implications and a bunch of code we ship but have no idea about.
Reality is that it will need some time until this new lib is actually
packaged and shipped with releases for a a majority of people.

This patch was co-worked with Doug Newgard <scimmia22@outlook.com>
2014-08-22 16:27:28 +02:00
Carsten Haitzler 2bd42962e3 eet init - fix structurally dead code
CID 1039542
2014-08-14 20:17:16 +09:00
Albin Tonnerre 62efaed9dc comments: typo fix - s/dictionnary/dictionary
Reviewers: cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D533

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 10:40:12 +09:00
Carsten Haitzler 414b447f54 Revert "eet: do not load data when the file is open in read/write mode."
This reverts commit f8b0322704.

this breaks efreets icon cache. i have been noticing this since
yesterday across all my machines once i update just efl. i tracked it
down to this commit.
2014-01-21 09:18:52 +09:00
Cedric BAIL f8b0322704 eet: do not load data when the file is open in read/write mode.
I do think that it was a left over from previous file format. Removing
this memcpy should make Enlightenment startup faster and should reduce
by 500KB the memory it use.
2014-01-20 13:04:07 +09:00
Cedric BAIL 00d4f5cf1c eet: reduce memory usage of Eet internal structure by removing useless structure. 2014-01-20 13:04:06 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric Bail 440471e599 eet: shutup a warning and use the right pointer source even if they are the same. 2013-11-04 12:46:48 +09:00
Cedric Bail 07c306a272 eet: let's use const Eina_File here to. 2013-11-04 11:28:56 +09:00
Cedric Bail 1a3c9d68d0 eet: help the kernel to actually load the eet file in memory more efficiently.
When you open a theme, it is very likely that most of the data in it will be needed
at some point, that's why it is a good idea to tell it in advance to the kernel so
it could load them if it has some spare ressource.

We can't just blindly turn EINA_FILE_WILLNEED on any file or a wrong eet file would
be loaded in memory when we don't need it. So we shall keep the sequential load until
we are sure that the file is correct and then explicitely tell the kernel that the
rest of the data should be loaded in ram.
2013-10-28 18:32:40 +09:00
Chris Michael cc0bbacb89 open() can fail for various reasons, so check for valid 'fd' return
before calling fdopen.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:34:34 +01:00
Chris Michael 1054d49941 Fix missing unlock reported by Coverity
NB: Fixes Coverity CID1039384

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:20:22 +01:00
Chris Michael 3891bdcb15 Fix missing unlock (reported by Coverity).
- Instead of just returning NULL, use the existing goto on_error to
handle the unlock and return NULL.

NB: Fixes Coverity CID1039383

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:18:06 +01:00
Chris Michael b72e694573 Fix memleak reported by Coverity
NB: Fixes Coverity CID1039261

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:31:17 +01:00
Cedric Bail dba4a080d9 eet: for more safety let eet handle the reference to the file. 2013-06-04 15:04:19 +09:00
Carsten Haitzler 95b91ad9b9 eet_mmap uses reader/writers caches for lookup.. but never ADDs to
these caches! bad bad bad!
2013-05-10 09:00:02 +09:00
Carsten Haitzler 425986b4fe do not make eet files get refcounts of 2 on eet_mmap so they then never free.
we set references to 1 then on success references++... thus ALWAYS
being on 2.
2013-05-10 08:54:50 +09:00
Cedric Bail ffba364857 eet: initialize it to zero. 2013-05-09 17:22:00 +09:00
Cedric Bail a299e0723a eet: more meaningful message. 2013-05-08 18:17:00 +09:00
Cedric Bail 8fc58ae405 eet: be picky and really use the correct format without shitty cast. 2013-04-10 14:55:24 +09:00
Tom Hacohen bf8a49d9a2 Eet: Pass the correct parameter to the correct format. 2013-04-09 15:19:40 +01:00
Cedric BAIL 359d7034ba eet: enable more debug information regarding memory allocation. 2013-04-05 12:20:37 +09:00
Cedric BAIL 5465eb3acc eet: remove use of prev to reduce memory usage (30KB on 32bits system). 2013-04-05 12:14:50 +09:00
Cedric BAIL f001cfac38 eet: do the correct math for allocation. 2013-04-05 11:50:54 +09:00
Cedric BAIL 4a4ab2bb48 eet: round above. 2013-04-04 15:12:40 +09:00
Cedric BAIL fa20ab7269 eet: another big boolean removed.
By merging all boolean in their own array I avoid loosing 2.9 bytes on
32bits and 6.9 bytes on 64bits system.
2013-04-04 12:01:07 +09:00
Cedric BAIL 2063e4353d efl: integrate eina_log_timing. 2013-03-27 21:43:45 +09:00
Cedric Bail 3fe8098e9c include some header files conditionally add specific test for fcntl 2013-03-11 10:34:47 +09:00
Lucas De Marchi 06ff74834f efl: remove checks for socket.h, net/*, arpa/*
SVN revision: 82585
2013-01-10 20:26:02 +00:00
Lucas De Marchi db395ef7eb efl: Remove check for unistd.h
* unistd.h: is very useful, very old and very standard.



SVN revision: 82577
2013-01-10 20:25:26 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Cedric BAIL 59ebafcb85 efl: rename eet_map to eet_mmap.
SVN revision: 82051
2013-01-03 09:18:05 +00:00
Cedric BAIL 42b877cace efl: fix potential segv.
SVN revision: 81972
2013-01-02 06:21:43 +00:00
Cedric BAIL 663d56e498 efl: add eet_map and use it.
SVN revision: 81970
2013-01-02 02:46:05 +00:00
Gustavo Sverzut Barbieri 66ebe6a3f8 efl: remove checks for EINA_HAVE_THREADS
SVN revision: 81937
2012-12-31 17:31:17 +00:00
Christopher Michael 10567cca05 Add missing UNLOCK_CACHE in eet_open function.
Change-Id: I79db6bedf49c27499f3caa63d04dc6bb3ecfee60

SVN revision: 79290
2012-11-14 11:52:25 +00:00
Cedric BAIL cf8a61527f efl: backport r78689.
SVN revision: 78690
2012-10-31 05:58:50 +00:00
Zbigniew Kosinski 2499d34087 From: Zbigniew Kosinski <z.kosinski@samsung.com>
Subject: Re: [E-devel] Add Null checking routine

I prepared patch - check eet file pointer parameter in
eet_identity_signature, eet_identity_x509 and eet_identity_sha1 functions.
Please take a look at attached files.



SVN revision: 77977
2012-10-15 06:26:48 +00:00
Carsten Haitzler d6b7e8f740 well ok - always on then, no option, until 2.0
SVN revision: 77843
2012-10-11 03:04:57 +00:00
Gustavo Sverzut Barbieri f963219626 efl: remove option to enable old EET format.
It's disabled. If user wants to enable, give
-DEET_OLD_EET_FILE_FORMAT=1 to CFLAGS.



SVN revision: 77790
2012-10-10 19:30:17 +00:00
Vincent Torri 8abaff3bdf merge: add eet
SVN revision: 76768
2012-09-17 16:35:38 +00:00