• Nick Kralevich's avatar
    android.c: don't run restorecon on subdirs of /data/data · d601f82e
    Nick Kralevich authored
    /data/data and /data/user are treated differently when doing relabeling.
    Specifically:
    
    1) /data/data should be labeled by init.
    2) files / directories within /data/data should NOT be labeled by init,
       only by installd at system_server's request.
    3) /data/user should be labeled by init.
    4) subdirectories one level deep under /data/user should be labeled
       by init.
    5) subdirectories more than one level deep under /data/user
       should NOT be labeled by init, only by installd at system_server's
       request.
    
    Commit 4766bfa9 inadvertantly applied
    the same rules to /data/data that we use for /data/user, resulting
    in init attempting to label directories one level deep in /data/data.
    Restore the line to the version before 4766bfa9.
    
    While we're here, fix the following compiler warning:
    
      external/libselinux/src/android.c:1059:45: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
      #define EXPAND_USER_PATH "/mnt/expand/????????-????-????-????-????????????/user"
      ^
    
    Bug: 20190506
    Change-Id: I5dc6ada37c2bfd0904e341aabc3b7a123105a212
    d601f82e
android.c 38.9 KB