s3-samr: let set_user_info_16 and 20 follow the same pattern as all other levels.
[ira/wip.git] / source3 / rpc_server / srv_samr_util.c
index 5dad3bdc70bb84b6d4fe488e972db0b5d5acd92d..8f136b12165d4846f6edc7cc5b37db699eda64a2 100644 (file)
@@ -232,6 +232,27 @@ void copy_id14_to_sam_passwd(struct samu *to,
        copy_id21_to_sam_passwd("INFO_14", to, &i);
 }
 
+/*************************************************************
+ Copies a struct samr_UserInfo16 to a struct samu
+**************************************************************/
+
+void copy_id16_to_sam_passwd(struct samu *to,
+                            struct samr_UserInfo16 *from)
+{
+       struct samr_UserInfo21 i;
+
+       if (from == NULL || to == NULL) {
+               return;
+       }
+
+       ZERO_STRUCT(i);
+
+       i.fields_present        = SAMR_FIELD_ACCT_FLAGS;
+       i.acct_flags            = from->acct_flags;
+
+       copy_id21_to_sam_passwd("INFO_16", to, &i);
+}
+
 /*************************************************************
  Copies a struct samr_UserInfo17 to a struct samu
 **************************************************************/