Print this page
10109 libzonecfg needs a smatch fix

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzonecfg/common/libzonecfg.c
          +++ new/usr/src/lib/libzonecfg/common/libzonecfg.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2014 Gary Mills
  24   24   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       25 + * Copyright (c) 2018, Joyent, Inc.
  25   26   * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  26   27   */
  27   28  
  28   29  #include <libsysevent.h>
  29   30  #include <pthread.h>
  30   31  #include <stdlib.h>
  31   32  #include <errno.h>
  32   33  #include <fnmatch.h>
  33   34  #include <strings.h>
  34   35  #include <unistd.h>
↓ open down ↓ 2939 lines elided ↑ open up ↑
2974 2975  
2975 2976          if ((acl_get(path, ACL_NO_TRIVIAL, &acl) == 0) &&
2976 2977              acl != NULL) {
2977 2978                  acl_txt = acl_totext(acl, ACL_NORESOLVE);
2978 2979                  acl_free(acl);
2979 2980          }
2980 2981  
2981 2982          if (strlen(path) <= g_devwalk_skip_prefix)
2982 2983                  return (0);
2983 2984  
2984      -        g_devwalk_cb(path + g_devwalk_skip_prefix, st->st_uid, st->st_gid,
2985      -            st->st_mode & S_IAMB, acl_txt != NULL ? acl_txt : "",
     2985 +        (void) g_devwalk_cb(path + g_devwalk_skip_prefix, st->st_uid,
     2986 +            st->st_gid, st->st_mode & S_IAMB, acl_txt != NULL ? acl_txt : "",
2986 2987              g_devwalk_data);
2987 2988          free(acl_txt);
2988 2989          return (0);
2989 2990  }
2990 2991  
2991 2992  /*
2992 2993   * Walk the dev tree for the zone specified by hdl and call the
2993 2994   * get_detach_dev_entry call-back function for each entry in the tree.  The
2994 2995   * call-back will be passed the name, uid, gid, mode, acl string and the
2995 2996   * handle input parameter for each dev entry.
↓ open down ↓ 5285 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX