Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/utils/pdbedit.c

    r414 r740  
    2222
    2323#include "includes.h"
     24#include "popt_common.h"
     25#include "../librpc/gen_ndr/samr.h"
     26#include "../libcli/security/security.h"
     27#include "passdb.h"
    2428
    2529#define BIT_BACKEND     0x00000004
     
    5660#define MASK_USER_GOOD          0x60405FE0
    5761
    58 static int get_sid_from_cli_string(DOM_SID *sid, const char *str_sid)
     62static int get_sid_from_cli_string(struct dom_sid *sid, const char *str_sid)
    5963{
    6064        uint32_t rid;
     
    6973                        return -1;
    7074                }
    71                 sid_copy(sid, get_global_sam_sid());
    72                 sid_append_rid(sid, rid);
     75                sid_compose(sid, get_global_sam_sid(), rid);
    7376        }
    7477
     
    105108                struct samu *user;
    106109                struct samu *account;
    107                 DOM_SID user_sid;
     110                struct dom_sid user_sid;
    108111
    109112                DEBUG(4, ("Processing account %s\n", userentry.account_name));
     
    203206
    204207        for (i=1; decode_account_policy_name(i) != NULL; i++) {
    205                 uint32 policy_value;
     208                uint32_t policy_value;
    206209                if (!account_policy_get_default(i, &policy_value)) {
    207210                        fprintf(stderr, "Can't get default account policy\n");
     
    227230
    228231        for ( i=1; decode_account_policy_name(i) != NULL; i++ ) {
    229                 uint32 policy_value;
     232                uint32_t policy_value;
    230233                NTSTATUS status;
    231234
     
    263266        if (verbosity) {
    264267                char temp[44];
    265                 const uint8 *hours;
     268                const uint8_t *hours;
    266269
    267270                printf ("Unix username:        %s\n", pdb_get_username(sam_pwent));
     
    330333                       nt_passwd,
    331334                       pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN),
    332                        (uint32)convert_time_t_to_uint32(pdb_get_pass_last_set_time(sam_pwent)));
     335                       (uint32)convert_time_t_to_uint32_t(pdb_get_pass_last_set_time(sam_pwent)));
    333336        } else {
    334337                uid = nametouid(pdb_get_username(sam_pwent));
     
    378381        struct samu *sam_pwent;
    379382        TALLOC_CTX *tosctx;
    380         DOM_SID user_sid;
     383        struct dom_sid user_sid;
    381384        bool bret;
    382385        int ret;
     
    436439        struct samu *sam_pwent;
    437440        TALLOC_CTX *tosctx;
    438         DOM_SID user_sid;
     441        struct dom_sid user_sid;
    439442        NTSTATUS status;
    440443        bool bret;
     
    506509        uint32_t not_settable;
    507510        uint32_t new_flags;
    508         DOM_SID u_sid;
     511        struct dom_sid u_sid;
    509512        bool ret;
    510513
     
    525528                memset(hours_array, 0xff, hours_len);
    526529
    527                 pdb_set_hours(sam_pwent, hours_array, PDB_CHANGED);
     530                pdb_set_hours(sam_pwent, hours_array, hours_len, PDB_CHANGED);
    528531        }
    529532
     
    594597                        }
    595598
    596                         value = convert_uint32_to_time_t(num);
     599                        value = convert_uint32_t_to_time_t(num);
    597600                }
    598601
     
    620623        uint32_t not_settable;
    621624        uint32_t new_flags;
    622         DOM_SID m_sid;
     625        struct dom_sid m_sid;
    623626        char *name;
    624627        int len;
     
    711714        TALLOC_CTX *tosctx;
    712715        NTSTATUS status;
    713         DOM_SID u_sid;
     716        struct dom_sid u_sid;
    714717        int flags;
    715718        int ret;
     
    808811        TALLOC_CTX *tosctx;
    809812        NTSTATUS status;
    810         DOM_SID m_sid;
     813        struct dom_sid m_sid;
    811814        char *compatpwd;
    812815        char *name;
     
    10571060        load_case_tables();
    10581061
    1059         setup_logging("pdbedit", True);
     1062        setup_logging("pdbedit", DEBUG_STDOUT);
    10601063
    10611064        pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
     
    11341137        /* account policy operations */
    11351138        if ((checkparms & BIT_ACCPOLICY) && !(checkparms & ~(BIT_ACCPOLICY + BIT_ACCPOLVAL))) {
    1136                 uint32 value;
     1139                uint32_t value;
    11371140                enum pdb_policy_type field = account_policy_name_to_typenum(account_policy);
    11381141                if (field == 0) {
Note: See TracChangeset for help on using the changeset viewer.