LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_smb_acl.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 206 335 61.5 %
Date: 2021-09-23 10:06:22 Functions: 13 23 56.5 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_smb_acl.h"
       5             : 
       6     8658493 : static enum ndr_err_code ndr_push_smb_acl_tag_t(struct ndr_push *ndr, int ndr_flags, enum smb_acl_tag_t r)
       7             : {
       8     8675892 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
       9     8658493 :         return NDR_ERR_SUCCESS;
      10             : }
      11             : 
      12     8575924 : static enum ndr_err_code ndr_pull_smb_acl_tag_t(struct ndr_pull *ndr, int ndr_flags, enum smb_acl_tag_t *r)
      13             : {
      14             :         uint16_t v;
      15     8593532 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
      16     8593532 :         *r = v;
      17     8575924 :         return NDR_ERR_SUCCESS;
      18             : }
      19             : 
      20           0 : _PUBLIC_ void ndr_print_smb_acl_tag_t(struct ndr_print *ndr, const char *name, enum smb_acl_tag_t r)
      21             : {
      22           0 :         const char *val = NULL;
      23             : 
      24           0 :         switch (r) {
      25           0 :                 case SMB_ACL_TAG_INVALID: val = "SMB_ACL_TAG_INVALID"; break;
      26           0 :                 case SMB_ACL_USER: val = "SMB_ACL_USER"; break;
      27           0 :                 case SMB_ACL_USER_OBJ: val = "SMB_ACL_USER_OBJ"; break;
      28           0 :                 case SMB_ACL_GROUP: val = "SMB_ACL_GROUP"; break;
      29           0 :                 case SMB_ACL_GROUP_OBJ: val = "SMB_ACL_GROUP_OBJ"; break;
      30           0 :                 case SMB_ACL_OTHER: val = "SMB_ACL_OTHER"; break;
      31           0 :                 case SMB_ACL_MASK: val = "SMB_ACL_MASK"; break;
      32             :         }
      33           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
      34           0 : }
      35             : 
      36     1190137 : static enum ndr_err_code ndr_push_smb_acl_user(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_user *r)
      37             : {
      38     1190137 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      39     1190137 :         if (ndr_flags & NDR_SCALARS) {
      40     1190137 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      41     1190137 :                 NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->uid));
      42     1190137 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      43             :         }
      44     1187606 :         if (ndr_flags & NDR_BUFFERS) {
      45             :         }
      46     1190137 :         return NDR_ERR_SUCCESS;
      47             : }
      48             : 
      49     1177374 : static enum ndr_err_code ndr_pull_smb_acl_user(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_user *r)
      50             : {
      51     1177374 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      52     1177374 :         if (ndr_flags & NDR_SCALARS) {
      53     1177374 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
      54     1177374 :                 NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->uid));
      55     1177374 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
      56             :         }
      57     1175015 :         if (ndr_flags & NDR_BUFFERS) {
      58             :         }
      59     1177374 :         return NDR_ERR_SUCCESS;
      60             : }
      61             : 
      62           0 : _PUBLIC_ void ndr_print_smb_acl_user(struct ndr_print *ndr, const char *name, const struct smb_acl_user *r)
      63             : {
      64           0 :         ndr_print_struct(ndr, name, "smb_acl_user");
      65           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      66           0 :         ndr->depth++;
      67           0 :         ndr_print_uid_t(ndr, "uid", r->uid);
      68           0 :         ndr->depth--;
      69             : }
      70             : 
      71     1916351 : static enum ndr_err_code ndr_push_smb_acl_group(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_group *r)
      72             : {
      73     1916351 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      74     1916351 :         if (ndr_flags & NDR_SCALARS) {
      75     1916351 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      76     1916351 :                 NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->gid));
      77     1916351 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      78             :         }
      79     1911203 :         if (ndr_flags & NDR_BUFFERS) {
      80             :         }
      81     1916351 :         return NDR_ERR_SUCCESS;
      82             : }
      83             : 
      84     1893502 : static enum ndr_err_code ndr_pull_smb_acl_group(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_group *r)
      85             : {
      86     1893502 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      87     1893502 :         if (ndr_flags & NDR_SCALARS) {
      88     1893502 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
      89     1893502 :                 NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->gid));
      90     1893502 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
      91             :         }
      92     1888285 :         if (ndr_flags & NDR_BUFFERS) {
      93             :         }
      94     1893502 :         return NDR_ERR_SUCCESS;
      95             : }
      96             : 
      97           0 : _PUBLIC_ void ndr_print_smb_acl_group(struct ndr_print *ndr, const char *name, const struct smb_acl_group *r)
      98             : {
      99           0 :         ndr_print_struct(ndr, name, "smb_acl_group");
     100           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     101           0 :         ndr->depth++;
     102           0 :         ndr_print_gid_t(ndr, "gid", r->gid);
     103           0 :         ndr->depth--;
     104             : }
     105             : 
     106    17351784 : static enum ndr_err_code ndr_push_smb_acl_entry_info(struct ndr_push *ndr, int ndr_flags, const union smb_acl_entry_info *r)
     107             : {
     108             :         uint32_t level;
     109    17351784 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     110    17351784 :         if (ndr_flags & NDR_SCALARS) {
     111             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     112     8675892 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     113     8675892 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     114     8675892 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
     115     8675892 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     116     8675892 :                 switch (level) {
     117     1190137 :                         case SMB_ACL_USER: {
     118     1190137 :                                 NDR_CHECK(ndr_push_smb_acl_user(ndr, NDR_SCALARS, &r->user));
     119     1187606 :                         break; }
     120             : 
     121     1389953 :                         case SMB_ACL_USER_OBJ: {
     122     1389953 :                         break; }
     123             : 
     124     1916351 :                         case SMB_ACL_GROUP: {
     125     1916351 :                                 NDR_CHECK(ndr_push_smb_acl_group(ndr, NDR_SCALARS, &r->group));
     126     1911203 :                         break; }
     127             : 
     128     1389953 :                         case SMB_ACL_GROUP_OBJ: {
     129     1389953 :                         break; }
     130             : 
     131     1389953 :                         case SMB_ACL_OTHER: {
     132     1389953 :                         break; }
     133             : 
     134     1389825 :                         case SMB_ACL_MASK: {
     135     1389825 :                         break; }
     136             : 
     137           0 :                         default:
     138           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
     139             :                 }
     140     7009742 :         }
     141    17351784 :         if (ndr_flags & NDR_BUFFERS) {
     142     8675892 :                 if (!(ndr_flags & NDR_SCALARS)) {
     143             :                         /* We didn't get it above, and the token is not needed after this. */
     144     8675892 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     145             :                 }
     146     8675892 :                 switch (level) {
     147     1187606 :                         case SMB_ACL_USER:
     148     1187606 :                         break;
     149             : 
     150     1389953 :                         case SMB_ACL_USER_OBJ:
     151     1389953 :                         break;
     152             : 
     153     1911203 :                         case SMB_ACL_GROUP:
     154     1911203 :                         break;
     155             : 
     156     1389953 :                         case SMB_ACL_GROUP_OBJ:
     157     1389953 :                         break;
     158             : 
     159     1389953 :                         case SMB_ACL_OTHER:
     160     1389953 :                         break;
     161             : 
     162     1389825 :                         case SMB_ACL_MASK:
     163     1389825 :                         break;
     164             : 
     165           0 :                         default:
     166           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
     167             :                 }
     168     7009742 :         }
     169    17316986 :         return NDR_ERR_SUCCESS;
     170             : }
     171             : 
     172    17187064 : static enum ndr_err_code ndr_pull_smb_acl_entry_info(struct ndr_pull *ndr, int ndr_flags, union smb_acl_entry_info *r)
     173             : {
     174             :         uint32_t level;
     175             :         uint16_t _level;
     176    17187064 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     177    17187064 :         if (ndr_flags & NDR_SCALARS) {
     178             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     179     8593532 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     180     8593532 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     181     8593532 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
     182     8593532 :                 if (_level != level) {
     183           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
     184             :                 }
     185     8593532 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     186     8593532 :                 switch (level) {
     187     1177374 :                         case SMB_ACL_USER: {
     188     1177374 :                                 NDR_CHECK(ndr_pull_smb_acl_user(ndr, NDR_SCALARS, &r->user));
     189     1175015 :                         break; }
     190             : 
     191     1378156 :                         case SMB_ACL_USER_OBJ: {
     192     1378156 :                         break; }
     193             : 
     194     1893502 :                         case SMB_ACL_GROUP: {
     195     1893502 :                                 NDR_CHECK(ndr_pull_smb_acl_group(ndr, NDR_SCALARS, &r->group));
     196     1888285 :                         break; }
     197             : 
     198     1378156 :                         case SMB_ACL_GROUP_OBJ: {
     199     1378156 :                         break; }
     200             : 
     201     1378156 :                         case SMB_ACL_OTHER: {
     202     1378156 :                         break; }
     203             : 
     204     1378156 :                         case SMB_ACL_MASK: {
     205     1378156 :                         break; }
     206             : 
     207           0 :                         default:
     208           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
     209             :                 }
     210     6922007 :         }
     211    17187064 :         if (ndr_flags & NDR_BUFFERS) {
     212     8593532 :                 if (!(ndr_flags & NDR_SCALARS)) {
     213             :                         /* We didn't get it above, and the token is not needed after this. */
     214     8593532 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     215             :                 }
     216     8593532 :                 switch (level) {
     217     1175015 :                         case SMB_ACL_USER:
     218     1175015 :                         break;
     219             : 
     220     1378156 :                         case SMB_ACL_USER_OBJ:
     221     1378156 :                         break;
     222             : 
     223     1888285 :                         case SMB_ACL_GROUP:
     224     1888285 :                         break;
     225             : 
     226     1378156 :                         case SMB_ACL_GROUP_OBJ:
     227     1378156 :                         break;
     228             : 
     229     1378156 :                         case SMB_ACL_OTHER:
     230     1378156 :                         break;
     231             : 
     232     1378156 :                         case SMB_ACL_MASK:
     233     1378156 :                         break;
     234             : 
     235           0 :                         default:
     236           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
     237             :                 }
     238     6922007 :         }
     239    17151848 :         return NDR_ERR_SUCCESS;
     240             : }
     241             : 
     242           0 : _PUBLIC_ void ndr_print_smb_acl_entry_info(struct ndr_print *ndr, const char *name, const union smb_acl_entry_info *r)
     243             : {
     244             :         uint32_t level;
     245           0 :         level = ndr_print_steal_switch_value(ndr, r);
     246           0 :         ndr_print_union(ndr, name, level, "smb_acl_entry_info");
     247           0 :         switch (level) {
     248           0 :                 case SMB_ACL_USER:
     249           0 :                         ndr_print_smb_acl_user(ndr, "user", &r->user);
     250           0 :                 break;
     251             : 
     252           0 :                 case SMB_ACL_USER_OBJ:
     253           0 :                 break;
     254             : 
     255           0 :                 case SMB_ACL_GROUP:
     256           0 :                         ndr_print_smb_acl_group(ndr, "group", &r->group);
     257           0 :                 break;
     258             : 
     259           0 :                 case SMB_ACL_GROUP_OBJ:
     260           0 :                 break;
     261             : 
     262           0 :                 case SMB_ACL_OTHER:
     263           0 :                 break;
     264             : 
     265           0 :                 case SMB_ACL_MASK:
     266           0 :                 break;
     267             : 
     268           0 :                 default:
     269           0 :                         ndr_print_bad_level(ndr, name, level);
     270             :         }
     271           0 : }
     272             : 
     273    17351784 : static enum ndr_err_code ndr_push_smb_acl_entry(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_entry *r)
     274             : {
     275    17351784 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     276    17351784 :         if (ndr_flags & NDR_SCALARS) {
     277     8675892 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     278     8693291 :                 NDR_CHECK(ndr_push_smb_acl_tag_t(ndr, NDR_SCALARS, r->a_type));
     279     8675892 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
     280     8675892 :                 NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
     281     8675892 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_perm));
     282     8675892 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     283             :         }
     284    17351784 :         if (ndr_flags & NDR_BUFFERS) {
     285     8675892 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->a_type));
     286     8675892 :                 NDR_CHECK(ndr_push_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
     287             :         }
     288    17316986 :         return NDR_ERR_SUCCESS;
     289             : }
     290             : 
     291    17187064 : static enum ndr_err_code ndr_pull_smb_acl_entry(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_entry *r)
     292             : {
     293    17187064 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     294    17187064 :         if (ndr_flags & NDR_SCALARS) {
     295     8593532 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     296     8611140 :                 NDR_CHECK(ndr_pull_smb_acl_tag_t(ndr, NDR_SCALARS, &r->a_type));
     297     8593532 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
     298     8593532 :                 NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_SCALARS, &r->info));
     299     8593532 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_perm));
     300     8593532 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     301             :         }
     302    17187064 :         if (ndr_flags & NDR_BUFFERS) {
     303     8593532 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->a_type));
     304     8593532 :                 NDR_CHECK(ndr_pull_smb_acl_entry_info(ndr, NDR_BUFFERS, &r->info));
     305             :         }
     306    17151848 :         return NDR_ERR_SUCCESS;
     307             : }
     308             : 
     309           0 : _PUBLIC_ void ndr_print_smb_acl_entry(struct ndr_print *ndr, const char *name, const struct smb_acl_entry *r)
     310             : {
     311           0 :         ndr_print_struct(ndr, name, "smb_acl_entry");
     312           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     313           0 :         ndr->depth++;
     314           0 :         ndr_print_smb_acl_tag_t(ndr, "a_type", r->a_type);
     315           0 :         ndr_print_set_switch_value(ndr, &r->info, r->a_type);
     316           0 :         ndr_print_smb_acl_entry_info(ndr, "info", &r->info);
     317           0 :         ndr_print_uint32(ndr, "a_perm", r->a_perm);
     318           0 :         ndr->depth--;
     319             : }
     320             : 
     321     1392423 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_t(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_t *r)
     322             : {
     323             :         uint32_t cntr_acl_0;
     324     1392423 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     325     1392423 :         if (ndr_flags & NDR_SCALARS) {
     326     1392423 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     327     1392423 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     328     1392423 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->count));
     329     1392423 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, 0));
     330    10065885 :                 for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
     331     8675892 :                         NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
     332             :                 }
     333     1392423 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     334             :         }
     335     1392423 :         if (ndr_flags & NDR_BUFFERS) {
     336    10065885 :                 for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
     337     8675892 :                         NDR_CHECK(ndr_push_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
     338             :                 }
     339             :         }
     340     1389993 :         return NDR_ERR_SUCCESS;
     341             : }
     342             : 
     343     1380688 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_t(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_t *r)
     344             : {
     345     1380688 :         uint32_t size_acl_0 = 0;
     346             :         uint32_t cntr_acl_0;
     347     1380688 :         TALLOC_CTX *_mem_save_acl_0 = NULL;
     348     1380688 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     349     1380688 :         if (ndr_flags & NDR_SCALARS) {
     350     1380688 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->acl));
     351     1380664 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     352     1380664 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->count));
     353     1380664 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->next));
     354     1380664 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
     355     1380664 :                 NDR_PULL_ALLOC_N(ndr, r->acl, size_acl_0);
     356     1380664 :                 _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
     357     1380664 :                 NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
     358     9974196 :                 for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
     359     8593532 :                         NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_SCALARS, &r->acl[cntr_acl_0]));
     360             :                 }
     361     1380664 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
     362     1380664 :                 if (r->acl) {
     363     1380664 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->acl, r->count));
     364             :                 }
     365     1380664 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     366             :         }
     367     1380664 :         if (ndr_flags & NDR_BUFFERS) {
     368     1380664 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->acl, &size_acl_0));
     369     1380664 :                 _mem_save_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
     370     1380664 :                 NDR_PULL_SET_MEM_CTX(ndr, r->acl, 0);
     371     9974196 :                 for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
     372     8593532 :                         NDR_CHECK(ndr_pull_smb_acl_entry(ndr, NDR_BUFFERS, &r->acl[cntr_acl_0]));
     373             :                 }
     374     1380664 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acl_0, 0);
     375     3052189 :                 for (cntr_acl_0 = 0; cntr_acl_0 < (size_acl_0); cntr_acl_0++) {
     376             :                 }
     377             :         }
     378     1378156 :         return NDR_ERR_SUCCESS;
     379             : }
     380             : 
     381           0 : static void ndr_print_flags_smb_acl_t(struct ndr_print *ndr, const char *name, int unused, const struct smb_acl_t *r)
     382             : {
     383           0 :         ndr_print_smb_acl_t(ndr, name, r);
     384           0 : }
     385             : 
     386           0 : _PUBLIC_ void ndr_print_smb_acl_t(struct ndr_print *ndr, const char *name, const struct smb_acl_t *r)
     387             : {
     388             :         uint32_t cntr_acl_0;
     389           0 :         ndr_print_struct(ndr, name, "smb_acl_t");
     390           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     391           0 :         ndr->depth++;
     392           0 :         ndr_print_int32(ndr, "count", r->count);
     393           0 :         ndr_print_int32(ndr, "next", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->next);
     394           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "acl", (int)r->count);
     395           0 :         ndr->depth++;
     396           0 :         for (cntr_acl_0 = 0; cntr_acl_0 < (r->count); cntr_acl_0++) {
     397           0 :                 ndr_print_smb_acl_entry(ndr, "acl", &r->acl[cntr_acl_0]);
     398             :         }
     399           0 :         ndr->depth--;
     400           0 :         ndr->depth--;
     401             : }
     402             : 
     403      779423 : _PUBLIC_ enum ndr_err_code ndr_push_smb_acl_wrapper(struct ndr_push *ndr, int ndr_flags, const struct smb_acl_wrapper *r)
     404             : {
     405      779423 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     406      779423 :         if (ndr_flags & NDR_SCALARS) {
     407      779423 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     408      779423 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->access_acl));
     409      779423 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_acl));
     410      779423 :                 NDR_CHECK(ndr_push_uid_t(ndr, NDR_SCALARS, r->owner));
     411      779423 :                 NDR_CHECK(ndr_push_gid_t(ndr, NDR_SCALARS, r->group));
     412      779423 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mode));
     413      779423 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     414             :         }
     415      779423 :         if (ndr_flags & NDR_BUFFERS) {
     416      779423 :                 if (r->access_acl) {
     417      779352 :                         NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->access_acl));
     418             :                 }
     419      779423 :                 if (r->default_acl) {
     420      451874 :                         NDR_CHECK(ndr_push_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_acl));
     421             :                 }
     422             :         }
     423      778164 :         return NDR_ERR_SUCCESS;
     424             : }
     425             : 
     426           0 : _PUBLIC_ enum ndr_err_code ndr_pull_smb_acl_wrapper(struct ndr_pull *ndr, int ndr_flags, struct smb_acl_wrapper *r)
     427             : {
     428             :         uint32_t _ptr_access_acl;
     429           0 :         TALLOC_CTX *_mem_save_access_acl_0 = NULL;
     430             :         uint32_t _ptr_default_acl;
     431           0 :         TALLOC_CTX *_mem_save_default_acl_0 = NULL;
     432           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     433           0 :         if (ndr_flags & NDR_SCALARS) {
     434           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     435           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_access_acl));
     436           0 :                 if (_ptr_access_acl) {
     437           0 :                         NDR_PULL_ALLOC(ndr, r->access_acl);
     438             :                 } else {
     439           0 :                         r->access_acl = NULL;
     440             :                 }
     441           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_acl));
     442           0 :                 if (_ptr_default_acl) {
     443           0 :                         NDR_PULL_ALLOC(ndr, r->default_acl);
     444             :                 } else {
     445           0 :                         r->default_acl = NULL;
     446             :                 }
     447           0 :                 NDR_CHECK(ndr_pull_uid_t(ndr, NDR_SCALARS, &r->owner));
     448           0 :                 NDR_CHECK(ndr_pull_gid_t(ndr, NDR_SCALARS, &r->group));
     449           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mode));
     450           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     451             :         }
     452           0 :         if (ndr_flags & NDR_BUFFERS) {
     453           0 :                 if (r->access_acl) {
     454           0 :                         _mem_save_access_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
     455           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->access_acl, 0);
     456           0 :                         NDR_CHECK(ndr_pull_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->access_acl));
     457           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_acl_0, 0);
     458             :                 }
     459           0 :                 if (r->default_acl) {
     460           0 :                         _mem_save_default_acl_0 = NDR_PULL_GET_MEM_CTX(ndr);
     461           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->default_acl, 0);
     462           0 :                         NDR_CHECK(ndr_pull_smb_acl_t(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_acl));
     463           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_acl_0, 0);
     464             :                 }
     465             :         }
     466           0 :         return NDR_ERR_SUCCESS;
     467             : }
     468             : 
     469           0 : static void ndr_print_flags_smb_acl_wrapper(struct ndr_print *ndr, const char *name, int unused, const struct smb_acl_wrapper *r)
     470             : {
     471           0 :         ndr_print_smb_acl_wrapper(ndr, name, r);
     472           0 : }
     473             : 
     474           0 : _PUBLIC_ void ndr_print_smb_acl_wrapper(struct ndr_print *ndr, const char *name, const struct smb_acl_wrapper *r)
     475             : {
     476           0 :         ndr_print_struct(ndr, name, "smb_acl_wrapper");
     477           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     478           0 :         ndr->depth++;
     479           0 :         ndr_print_ptr(ndr, "access_acl", r->access_acl);
     480           0 :         ndr->depth++;
     481           0 :         if (r->access_acl) {
     482           0 :                 ndr_print_smb_acl_t(ndr, "access_acl", r->access_acl);
     483             :         }
     484           0 :         ndr->depth--;
     485           0 :         ndr_print_ptr(ndr, "default_acl", r->default_acl);
     486           0 :         ndr->depth++;
     487           0 :         if (r->default_acl) {
     488           0 :                 ndr_print_smb_acl_t(ndr, "default_acl", r->default_acl);
     489             :         }
     490           0 :         ndr->depth--;
     491           0 :         ndr_print_uid_t(ndr, "owner", r->owner);
     492           0 :         ndr_print_gid_t(ndr, "group", r->group);
     493           0 :         ndr_print_uint32(ndr, "mode", r->mode);
     494           0 :         ndr->depth--;
     495             : }
     496             : 
     497             : #ifndef SKIP_NDR_TABLE_smb_acl
     498             : static const struct ndr_interface_public_struct smb_acl_public_structs[] = {
     499             :         {
     500             :                 .name = "smb_acl_t",
     501             :                 .struct_size = sizeof(struct smb_acl_t ),
     502             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb_acl_t,
     503             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb_acl_t,
     504             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb_acl_t,
     505             :         },
     506             :         {
     507             :                 .name = "smb_acl_wrapper",
     508             :                 .struct_size = sizeof(struct smb_acl_wrapper ),
     509             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb_acl_wrapper,
     510             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb_acl_wrapper,
     511             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb_acl_wrapper,
     512             :         },
     513             :         { .name = NULL }
     514             : };
     515             : 
     516             : static const struct ndr_interface_call smb_acl_calls[] = {
     517             :         { .name = NULL }
     518             : };
     519             : 
     520             : static const char * const smb_acl_endpoint_strings[] = {
     521             :         "ncacn_np:[\\pipe\\smb_acl]", 
     522             : };
     523             : 
     524             : static const struct ndr_interface_string_array smb_acl_endpoints = {
     525             :         .count  = 1,
     526             :         .names  = smb_acl_endpoint_strings
     527             : };
     528             : 
     529             : static const char * const smb_acl_authservice_strings[] = {
     530             :         "host", 
     531             : };
     532             : 
     533             : static const struct ndr_interface_string_array smb_acl_authservices = {
     534             :         .count  = 1,
     535             :         .names  = smb_acl_authservice_strings
     536             : };
     537             : 
     538             : 
     539             : const struct ndr_interface_table ndr_table_smb_acl = {
     540             :         .name           = "smb_acl",
     541             :         .num_calls      = 0,
     542             :         .calls          = smb_acl_calls,
     543             :         .num_public_structs     = 2,
     544             :         .public_structs         = smb_acl_public_structs,
     545             :         .endpoints      = &smb_acl_endpoints,
     546             :         .authservices   = &smb_acl_authservices
     547             : };
     548             : 
     549             : #endif /* SKIP_NDR_TABLE_smb_acl */

Generated by: LCOV version 1.13