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

« back to all changes in this revision

Viewing changes to source3/libsmb/libsmb_dir.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-29 06:16:15 UTC
  • mfrom: (0.27.9 upstream) (0.34.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100129061615-37hs6xqpsdhjq3ld
Tags: 2:3.4.5~dfsg-1ubuntu1
* Merge from debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set 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 additon to authenticated ones.
    - add map to guest = Bad user, maps bad username to gues access.
  + debian/samba-common.conf:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control: 
    - Make libswbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb, since its not in main yet.
  + debian/rules:
    - Enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install
  + Add apoort hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + debian/rules, debian/samba.if-up: allow "NetworkManager" as a recognized address
    family... it's obviously /not/ an address family, but it's what gets
    sent when using NM, so we'll cope for now.  (LP: #462169). Taken from karmic-proposed.
  + debian/control: Recommend keyutils for smbfs (LP: #493565)
  + Dropped patches:
    - debian/patches/security-CVE-2009-3297.patch: No longer needed
    - debian/patches/fix-too-many-open-files.patch: No longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
        }
304
304
 
305
305
        /* For each returned entry... */
306
 
        for (i = 0; i < total_entries; i++) {
 
306
        for (i = 0; i < info_ctr.ctr.ctr1->count; i++) {
307
307
 
308
308
                /* pull out the share name */
309
309
                fstrcpy(name, info_ctr.ctr.ctr1->array[i].name);
617
617
                            !is_ipaddress(server) &&
618
618
                            (resolve_name(server, &rem_ss, 0x1d) ||   /* LMB */
619
619
                             resolve_name(server, &rem_ss, 0x1b) )) { /* DMB */
620
 
 
 
620
                                /*
 
621
                                 * "server" is actually a workgroup name,
 
622
                                 * not a server. Make this clear.
 
623
                                 */
 
624
                                char *wgroup = server;
621
625
                                fstring buserver;
622
626
 
623
627
                                dir->dir_type = SMBC_SERVER;
625
629
                                /*
626
630
                                 * Get the backup list ...
627
631
                                 */
628
 
                                if (!name_status_find(server, 0x20, 0x20,
 
632
                                if (!name_status_find(wgroup, 0, 0,
629
633
                                                      &rem_ss, buserver)) {
 
634
                                        char addr[INET6_ADDRSTRLEN];
630
635
 
 
636
                                        print_sockaddr(addr, sizeof(addr), &rem_ss);
631
637
                                        DEBUG(0,("Could not get name of "
632
 
                                                 "local/domain master browser "
633
 
                                                 "for server %s\n", server));
 
638
                                                "local/domain master browser "
 
639
                                                "for workgroup %s fro m"
 
640
                                                "address %s\n",
 
641
                                                wgroup,
 
642
                                                addr));
634
643
                                        if (dir) {
635
644
                                                SAFE_FREE(dir->fname);
636
645
                                                SAFE_FREE(dir);
663
672
                                dir->srv = srv;
664
673
 
665
674
                                /* Now, list the servers ... */
666
 
                                if (!cli_NetServerEnum(srv->cli, server,
 
675
                                if (!cli_NetServerEnum(srv->cli, wgroup,
667
676
                                                       0x0000FFFE, list_fn,
668
677
                                                       (void *)dir)) {
669
678