Print this page
OS-4119 lxbrand panic when running native perl inside lx zone
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/exec/java/java.c
          +++ new/usr/src/uts/common/exec/java/java.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2015, Joyent, Inc.
  24   25   */
  25   26  
  26   27  /*
  27   28   * Launch Java executables via exec(2).
  28   29   *
  29   30   * Java executables are platform-independent executable files
  30   31   * based on the JAR file format.  Executable JAR files contain a
  31   32   * special 'extra field' header in the first file of the archive
  32   33   * that marks the file as a true executable.   The data in that field
  33   34   * is used to pass additional run-time information to the Java VM.
↓ open down ↓ 44 lines elided ↑ open up ↑
  78   79  
  79   80  #define XFHSIZ          4               /* header id, data size */
  80   81  #define XFHID(b)        (SH(b, 0))      /* extract field header id */
  81   82  #define XFDATASIZ(b)    (SH(b, 2))      /* extract field data size */
  82   83  #define XFJAVASIG       0xcafe          /* java executables */
  83   84  
  84   85  /*ARGSUSED3*/
  85   86  static int
  86   87  javaexec(vnode_t *vp, struct execa *uap, struct uarg *args,
  87   88      struct intpdata *idatap, int level, long *execsz, int setid,
  88      -    caddr_t execfile, cred_t *cred, int brand_action)
       89 +    caddr_t execfile, cred_t *cred, int *brand_action)
  89   90  {
  90   91          struct intpdata idata;
  91   92          int error;
  92   93          ssize_t resid;
  93   94          vnode_t *nvp;
  94   95          off_t xoff, xoff_end;
  95   96          char lochdr[LOCHDRSIZ];
  96   97          struct pathname lookpn;
  97   98          struct pathname resolvepn;
  98   99          char *opath;
↓ open down ↓ 113 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX