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

« back to all changes in this revision

Viewing changes to source/services/services_db.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:
332
332
/********************************************************************
333
333
********************************************************************/
334
334
 
335
 
static void add_new_svc_name( REGISTRY_KEY *key_parent, REGSUBKEY_CTR *subkeys,
 
335
static void add_new_svc_name( REGISTRY_KEY *key_parent, struct regsubkey_ctr *subkeys,
336
336
                              const char *name )
337
337
{
338
338
        REGISTRY_KEY *key_service = NULL, *key_secdesc = NULL;
339
339
        WERROR wresult;
340
340
        char *path = NULL;
341
341
        REGVAL_CTR *values = NULL;
342
 
        REGSUBKEY_CTR *svc_subkeys = NULL;
 
342
        struct regsubkey_ctr *svc_subkeys = NULL;
343
343
        SEC_DESC *sd = NULL;
344
344
        DATA_BLOB sd_blob;
345
345
        NTSTATUS status;
366
366
 
367
367
        /* add the 'Security' key */
368
368
 
369
 
        if ( !(svc_subkeys = TALLOC_ZERO_P( key_service, REGSUBKEY_CTR )) ) {
 
369
        wresult = regsubkey_ctr_init(key_service, &svc_subkeys);
 
370
        if (!W_ERROR_IS_OK(wresult)) {
370
371
                DEBUG(0,("add_new_svc_name: talloc() failed!\n"));
371
372
                TALLOC_FREE( key_service );
372
373
                return;
444
445
{
445
446
        const char **service_list = lp_svcctl_list();
446
447
        int i;
447
 
        REGSUBKEY_CTR *subkeys = NULL;
 
448
        struct regsubkey_ctr *subkeys = NULL;
448
449
        REGISTRY_KEY *key = NULL;
449
450
        WERROR wresult;
450
451
 
461
462
 
462
463
        /* lookup the available subkeys */
463
464
 
464
 
        if ( !(subkeys = TALLOC_ZERO_P( key, REGSUBKEY_CTR )) ) {
 
465
        wresult = regsubkey_ctr_init(key, &subkeys);
 
466
        if (!W_ERROR_IS_OK(wresult)) {
465
467
                DEBUG(0,("svcctl_init_keys: talloc() failed!\n"));
466
468
                TALLOC_FREE( key );
467
469
                return;