lzop: add overflow check

See CVE-2014-4607
http://www.openwall.com/lists/oss-security/2014/06/26/20

function                                             old     new   delta
lzo1x_decompress_safe                               1010    1031     +21

Change-Id: I98acf36d2474a722759cad25c31bf1c486c00e61
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
busybox-full: tune some config flags

nslookup: enable VERBOSE_RESOLUTION_ERRORS

lzop: enable high compression support (7-9)

adds only 4K to busybox-full (arm)

Change-Id: I994fb45c6f7c7d07bb843429b42f25bb8192e4da
android: add a switch to handle Android L

restore support of wait3()
librpc: inet_makeaddr() is now in bionic

nslookup modified (_res is now hidden in libc dns)
tested on kitkat and built on l-preview

Note:
 With static version built on l-preview,
 nslookup doesnt work on kitkat due to a new socket flag
 named SOCK_CLOEXEC (0x80000), bacon kernel could be
 incompatible with this socket option (to check) or
 dnsproxyd could be not compatible.

 To be tested on a real Android 5.0 build later...

Change-Id: I109bcb6764e84c14c7fc890a6014326238fdf26f
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Rework busybox build process, remove compressed includes

Like the kernel, use an output folder to generate includes

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: I988675b071c7a9a959598734fdaff1fdda4e274f
android: fix makefile to build on AOSP

relative path seems could be buggy on aosp,
also some remains in include could make problems.

Change-Id: I4fcbf1bb8d7588d670e2fc5f8beb71397175c8bb
android: fix simple path for cm, add note for later

current AOSP (master) seems a bit different regarding
the variable $(TARGET_OUT_INTERMEDIATES)

Change-Id: I4a92743124950fadffcbff2b88f455db09a45d9e
darwin: fix make prepare, force prebuilt host compiler

also fix relative TARGET_OUT_INTERMEDIATES path on aosp/master

Change-Id: Ie26850726898dcd101eac88d29691a06a94648c5
selinux: remove dependency on libsepol static lib

runcon applet is including flask.h for constants

the only one required is SECCLASS_PROCESS (2)

Change-Id: Ia57abc21b291e7cbf81fdd031baaa5ac4436cbc8
route: remove useless ipv6 header

Change-Id: I4cb0f232be6b7060e9a1bd66b4946060911405de
Android: final cleanup of new build system

Rename hidden config files to busybox-<profile>.config

Set also KBUILD_OUTPUT to prevent generation of files in src dir,
if local make without O= is made (which create host code)

That do not force the rebuild of config files, except with mm -B

With the help of Chih-Wei Huang <cwhuang@linux.org.tw>

Change-Id: Ic6bc2bc7177b1f266b9c0d1ccdfb925c1aa00d46
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Makefile: remove warnings on initial version check

Android.mk is using a SUBMAKE variable which is only
used to get busybox version as a CFLAG. This one has
the -s (--silent) makeflag. So ignore the KBUILD_OUTPUT
default value if this flag is present.

Change-Id: Ifcc11d148d6707a8c301b3d2ba0370b91215647e
android: backport pty implementation from aosp/master

This is not (yet) in l-preview branch but on master
The only way to prevent duplicated includes was to
test the existence of a new constant added after
l-preview bionic source release.

Also use compatible hasmntopt() return type
(swapon/off compilation warnings)

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>

Change-Id: I4ee6e7752eab84de4566ae86a90171b8241fcaea
Fix remaining bionic warnings

Tested on arm and x86 (kitkat),
aosp/master has some other ones

Also update the readme and android.h

Change-Id: I170b16f2e091b99f971fb518bf0106c0e92adfdd
android: on prepare, clean all intermediates

This was requested to me to prevent no clobbered builds failures
on busybox config changes.

Change-Id: I1bdf2948e0669b1de567381eb809f576e8f1eef5
mktemp: include libc mktemp, safe in busybox

This commit remove the last warning in busybox,
and prevent users to try to use mkstemp which has not
the right behavior.

Change-Id: I5aaae8044769bb1893f2430287d72b3abbee796c
Android.mk: prevent warnings on make prepare

Add "+" to allow a new job

touch import_includes to prevent problems with -jN

Change-Id: Iea3cd527842a8bd770ff56fce01bcd0ff2d0db83
selinux: implement missing selinux functions

checkPasswdAccess() is deprecated
http://linux.die.net/man/3/selinux_check_passwd_access

also, ensure context is initialized in run_shell()

Note: these stubs are just compatible with busybox source code
Should be enhanced, or implemented in libselinux...

Change-Id: I22ea2679191d5c0887b6ef8c77f09a032c226876
Android: update busybox def PATH and cron folder

remove /usr/bin, add /vendor/bin, like official path

config folder was badly set to debian style cron.d
but busybox variant is a bit different :

  mkdir /etc/crontabs
  echo "* * * * * log CRON!" > /etc/crontabs/`whoami`
  crond -f

Change-Id: I0b9af08a557a952b5074da3231f32433f447f558
android: clearenv should not set environ to NULL

Remove the old internal clearenv() function which is
no more required (exported in libc)

Change-Id: I357f6a3b057c366761b481c09b471d7c53d7a419
mktemp: warning fix for x86 and l-preview

mktemp is almost not used in busybox, so rename
the function in the mktemp applet to prevent bionic
warning on include.

Change-Id: I4332d3b957aafd6174eb7fe098b099eae779d3c9