~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/registry/reg_eventlog.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2009-05-18 13:26:04 UTC
  • mfrom: (0.28.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090518132604-ebyuqimgymtr3h0k
Tags: 2:3.3.4-2ubuntu1
* Merge from debian unstable, remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted (LP: #312449)
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
    - Add suggests keyutils for smbfs. (LP: #300221)
  + debian/rules:
    - enable "native" PIE hardening.
    - remove --with-ctdb and --with-cluster-support=yes
  + Add ufw integration:
    - Created debian/samba.ufw profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install 
      profile
    - debian/control: have samba sugguest ufw.
* Dropped patches:
  + debian/patches/fix-upstream-bug-6186.patch: Merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        const char **elogs = lp_eventlog_list();
36
36
        char *evtlogpath = NULL;
37
37
        char *evtfilepath = NULL;
38
 
        REGSUBKEY_CTR *subkeys;
 
38
        struct regsubkey_ctr *subkeys;
39
39
        REGVAL_CTR *values;
40
40
        uint32 uiMaxSize;
41
41
        uint32 uiRetention;
42
42
        uint32 uiCategoryCount;
43
43
        UNISTR2 data;
44
44
        TALLOC_CTX *ctx = talloc_tos();
 
45
        WERROR werr;
45
46
 
46
47
        while (elogs && *elogs) {
47
 
                if (!(subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR ) ) ) {
 
48
                werr = regsubkey_ctr_init(ctx, &subkeys);
 
49
                if (!W_ERROR_IS_OK(werr)) {
48
50
                        DEBUG( 0, ( "talloc() failure!\n" ) );
49
51
                        return False;
50
52
                }
70
72
                DEBUG( 5,
71
73
                       ( "Adding key of [%s] to path of [%s]\n", *elogs,
72
74
                         evtlogpath ) );
73
 
                if (!(subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR))) {
 
75
                werr = regsubkey_ctr_init(ctx, &subkeys);
 
76
                if (!W_ERROR_IS_OK(werr)) {
74
77
                        DEBUG( 0, ( "talloc() failure!\n" ) );
75
78
                        return False;
76
79
                }
197
200
        const char **elogs = lp_eventlog_list(  );
198
201
        char **wrklist, **wp;
199
202
        char *evtlogpath = NULL;
200
 
        REGSUBKEY_CTR *subkeys;
 
203
        struct regsubkey_ctr *subkeys;
201
204
        REGVAL_CTR *values;
202
205
        REGISTRY_VALUE *rval;
203
206
        UNISTR2 data;
207
210
        int i;
208
211
        int numsources;
209
212
        TALLOC_CTX *ctx = talloc_tos();
 
213
        WERROR werr;
210
214
 
211
215
        if (!elogs) {
212
216
                return False;
315
319
        TALLOC_FREE(values);
316
320
        TALLOC_FREE(wrklist);   /*  */
317
321
 
318
 
        if ( !( subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR ) ) ) {
 
322
        werr = regsubkey_ctr_init(ctx, &subkeys);
 
323
        if (!W_ERROR_IS_OK(werr)) {
319
324
                DEBUG( 0, ( "talloc() failure!\n" ) );
320
325
                return False;
321
326
        }
342
347
 
343
348
        /* now allocate room for the source's subkeys */
344
349
 
345
 
        if ( !( subkeys = TALLOC_ZERO_P(ctx, REGSUBKEY_CTR ) ) ) {
 
350
        werr = regsubkey_ctr_init(ctx, &subkeys);
 
351
        if (!W_ERROR_IS_OK(werr)) {
346
352
                DEBUG( 0, ( "talloc() failure!\n" ) );
347
353
                return False;
348
354
        }