Ignore:
Timestamp:
Mar 9, 2010, 7:58:12 AM (15 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3.x to 3.3.12

Location:
branches/samba-3.3.x/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/VERSION

    r411 r423  
    2626SAMBA_VERSION_MAJOR=3
    2727SAMBA_VERSION_MINOR=3
    28 SAMBA_VERSION_RELEASE=11
     28SAMBA_VERSION_RELEASE=12
    2929
    3030########################################################
  • branches/samba-3.3.x/source/include/smb.h

    r411 r423  
    16851685    KERNEL_OPLOCK_CAPABILITY,
    16861686    DMAPI_ACCESS_CAPABILITY,
    1687     LEASE_CAPABILITY,
    1688     KILL_CAPABILITY
     1687    LEASE_CAPABILITY
    16891688};
    16901689
  • branches/samba-3.3.x/source/lib/system.c

    r411 r423  
    708708#if defined(HAVE_POSIX_CAPABILITIES)
    709709
    710 /* This define hasn't made it into the glibc capabilities header yet. */
    711 #ifndef SECURE_NO_SETUID_FIXUP
    712 #define SECURE_NO_SETUID_FIXUP          2
    713 #endif
    714 
    715710/**************************************************************************
    716711 Try and abstract process capabilities (for systems that have them).
     
    743738#endif
    744739
    745 #if defined(HAVE_PRCTL) && defined(PR_SET_SECUREBITS) && defined(SECURE_NO_SETUID_FIXUP)
    746         /* New way of setting capabilities as "sticky". */
    747 
    748         /*
    749          * Use PR_SET_SECUREBITS to prevent setresuid()
    750          * atomically dropping effective capabilities on
    751          * uid change. Only available in Linux kernels
    752          * 2.6.26 and above.
    753          *
    754          * See here:
    755          * http://www.kernel.org/doc/man-pages/online/pages/man7/capabilities.7.html
    756          * for details.
    757          *
    758          * Specifically the CAP_KILL capability we need
    759          * to allow Linux threads under different euids
    760          * to send signals to each other.
    761          */
    762 
    763         if (prctl(PR_SET_SECUREBITS, 1 << SECURE_NO_SETUID_FIXUP)) {
    764                 DEBUG(0,("set_process_capability: "
    765                         "prctl PR_SET_SECUREBITS failed with error %s\n",
    766                         strerror(errno) ));
    767                 return false;
    768         }
    769 #endif
    770 
    771740        cap = cap_get_proc();
    772741        if (cap == NULL) {
     
    797766#endif
    798767                        break;
    799                 case KILL_CAPABILITY:
    800 #ifdef CAP_KILL
    801                         cap_vals[num_cap_vals++] = CAP_KILL;
    802 #endif
    803                         break;
    804768        }
    805769
     
    811775        }
    812776
    813         /*
    814          * Ensure the capability is effective. We assume that as a root
    815          * process it's always permitted.
    816          */
    817 
    818         if (cap_set_flag(cap, CAP_EFFECTIVE, num_cap_vals, cap_vals,
    819                         enable ? CAP_SET : CAP_CLEAR) == -1) {
    820                 DEBUG(0, ("set_process_capability: cap_set_flag effective "
    821                         "failed (%d): %s\n",
    822                         (int)capability,
    823                         strerror(errno)));
    824                 cap_free(cap);
    825                 return false;
    826         }
     777        cap_set_flag(cap, CAP_EFFECTIVE, num_cap_vals, cap_vals,
     778                enable ? CAP_SET : CAP_CLEAR);
    827779
    828780        /* We never want to pass capabilities down to our children, so make
    829781         * sure they are not inherited.
    830782         */
    831         if (cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals,
    832                         cap_vals, CAP_CLEAR) == -1) {
    833                 DEBUG(0, ("set_process_capability: cap_set_flag inheritable "
    834                         "failed (%d): %s\n",
    835                         (int)capability,
    836                         strerror(errno)));
    837                 cap_free(cap);
    838                 return false;
    839         }
     783        cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals, cap_vals, CAP_CLEAR);
    840784
    841785        if (cap_set_proc(cap) == -1) {
    842                 DEBUG(0, ("set_process_capability: cap_set_flag (%d) failed: %s\n",
    843                         (int)capability,
     786                DEBUG(0, ("set_process_capability: cap_set_proc failed: %s\n",
    844787                        strerror(errno)));
    845788                cap_free(cap);
  • branches/samba-3.3.x/source/smbd/server.c

    r411 r423  
    12481248        gain_root_group_privilege();
    12491249
    1250         /*
    1251          * Ensure we have CAP_KILL capability set on Linux,
    1252          * where we need this to communicate with threads.
    1253          * This is inherited by new threads, but not by new
    1254          * processes across exec().
    1255          */
    1256         set_effective_capability(KILL_CAPABILITY);
    1257 
    12581250        fault_setup((void (*)(void *))exit_server_fault);
    12591251        dump_core_setup("smbd");
Note: See TracChangeset for help on using the changeset viewer.