[LIBS] libfdt: Fix libfdt_get_property() API

It can happen that "property_value" pointer passed to
libfdt_get_property() API points to memory of length
less than actual length of property in FDT. In this
situation the libfdt_get_property() API will corrupt
the memory pointed by "property_value" pointer.

This patch fixes libfdt_get_property() API by introducing
"property_len" argument which denotes the length of
memory pointed by "property_value" pointer.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TOP] Update version to v0.2.5 in Makefile

As part of Xvisor v0.2.5 release preparations we update Xvisor
version in top-level Makefile.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DOCS] Update release date in v0.2.5 release notes

We are preponing v0.2.5 release by 10 days hence
update release notes accordingly.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge pull request #96 from avpatel/master

Sync mainline tree with xvisor-next tree for v0.2.5 release
[DOCS] Update last commit tag in v0.2.5 release notes

We have tagged the v0.2.5 release hence update the release
notes with last commit tag info.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge pull request #97 from avpatel/master

[DOCS] Update last commit tag in v0.2.5 release notes
[LIBS] Add support MD5 digest

Added support for MD5 digest calculation functions.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[COMMANDS] Added command to calculate MD5 digest

Two commands vfs md5 and memory md5 added to calculate
the MD5 digest of a file and a memory location respectively.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Enable CRYPTO and MD5 Support for x86

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[CORE] Stdio: have a flag if local echo should be done

Not in all cases the local echo is desirable for example
while reading the passwords. So have a flag when local
echo should be done and when not.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[DAEMONS] Change daemons to provide local echo info

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Changes in x86 setup script

The script now takes options and arguments. It is made
more flexible in building different subcomponents. The
script also installs all the dependencies that are required.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[LIBS] User authentication library

Add a user authentication library based on crypto hashes.
This provides one server right: authenticate_user

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[DAEMONS] Adding login/logout funcionality

It might be a good idea not to expose xvisor prompt
without an authentication, especially when its not
being used in embedded domain.

This patch addes a basic authentication feature based
on MD5 hashes (will be moved to SHA256/512 when we
add them).

The authentication works like this: The basic user tokens
are located in file /system/passwd. Its like Linux.
<username>:<password md5 hash>

When user gives username/password, password's MD5 hash is
calculated and compared against the one stored in the file.
If it matches the prompt is given. There are 5 bad tries after
which there is a gap of 15 seconds.

TODO: During first boot, username/password should be asked
and saved. Same things can be done for hostname, ipaddress etc.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[LIBS] Enable Hashes and MD5 by default

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Enable libauth and user authentication for x86

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[LIBS] Add SHA-256 hash support

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[COMMANDS] Add vfs and memory commands to calculate SHA256 digest

Added vfs sha256 <filepath> and memory sha256 <region> <len>
commands to calculate the SHA-256 digest.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Enable SHA-256 for x86

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[LIBS] Add support for SHA-256 password hashes

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>