Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/modules/vfs_recycle.c

    r414 r745  
    2424
    2525#include "includes.h"
     26#include "smbd/smbd.h"
     27#include "system/filesys.h"
     28#include "../librpc/gen_ndr/ndr_netlogon.h"
     29#include "auth.h"
    2630
    2731#define ALLOC_CHECK(ptr, label) do { if ((ptr) == NULL) { DEBUG(0, ("recycle.bin: out of memory!\n")); errno = ENOMEM; goto label; } } while(0)
     
    6266{
    6367        const char *tmp_str = NULL;
    64        
    6568
    6669        tmp_str = lp_parm_const_string(SNUM(handle->conn), "recycle", "repository",".recycle");
    6770
    6871        DEBUG(10, ("recycle: repository = %s\n", tmp_str));
    69        
     72
    7073        return tmp_str;
    7174}
     
    7477{
    7578        bool ret;
    76        
     79
    7780        ret = lp_parm_bool(SNUM(handle->conn), "recycle", "keeptree", False);
    7881
    7982        DEBUG(10, ("recycle_bin: keeptree = %s\n", ret?"True":"False"));
    80        
     83
    8184        return ret;
    8285}
     
    8992
    9093        DEBUG(10, ("recycle: versions = %s\n", ret?"True":"False"));
    91        
     94
    9295        return ret;
    9396}
     
    100103
    101104        DEBUG(10, ("recycle: touch = %s\n", ret?"True":"False"));
    102        
     105
    103106        return ret;
    104107}
     
    111114
    112115        DEBUG(10, ("recycle: touch_mtime = %s\n", ret?"True":"False"));
    113        
     116
    114117        return ret;
    115118}
     
    118121{
    119122        const char **tmp_lp;
    120        
     123
    121124        tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "exclude", NULL);
    122125
    123126        DEBUG(10, ("recycle: exclude = %s ...\n", tmp_lp?*tmp_lp:""));
    124        
     127
    125128        return tmp_lp;
    126129}
     
    129132{
    130133        const char **tmp_lp;
    131        
     134
    132135        tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "exclude_dir", NULL);
    133136
    134137        DEBUG(10, ("recycle: exclude_dir = %s ...\n", tmp_lp?*tmp_lp:""));
    135        
     138
    136139        return tmp_lp;
    137140}
     
    140143{
    141144        const char **tmp_lp;
    142        
     145
    143146        tmp_lp = lp_parm_string_list(SNUM(handle->conn), "recycle", "noversions", NULL);
    144147
    145148        DEBUG(10, ("recycle: noversions = %s\n", tmp_lp?*tmp_lp:""));
    146        
     149
    147150        return tmp_lp;
    148151}
     
    151154{
    152155        SMB_OFF_T maxsize;
    153        
     156
    154157        maxsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn),
    155158                                            "recycle", "maxsize", NULL));
    156159
    157160        DEBUG(10, ("recycle: maxsize = %lu\n", (long unsigned int)maxsize));
    158        
     161
    159162        return maxsize;
    160163}
     
    163166{
    164167        SMB_OFF_T minsize;
    165        
     168
    166169        minsize = conv_str_size(lp_parm_const_string(SNUM(handle->conn),
    167170                                            "recycle", "minsize", NULL));
    168171
    169172        DEBUG(10, ("recycle: minsize = %lu\n", (long unsigned int)minsize));
    170        
     173
    171174        return minsize;
    172175}
     
    465468
    466469        repository = talloc_sub_advanced(NULL, lp_servicename(SNUM(conn)),
    467                                         conn->server_info->unix_name,
     470                                        conn->session_info->unix_name,
    468471                                        conn->connectpath,
    469                                         conn->server_info->utok.gid,
    470                                         conn->server_info->sanitized_username,
    471                                         pdb_get_domain(conn->server_info->sam_account),
     472                                        conn->session_info->utok.gid,
     473                                        conn->session_info->sanitized_username,
     474                                        conn->session_info->info3->base.domain.string,
    472475                                        recycle_repository(handle));
    473476        ALLOC_CHECK(repository, done);
     
    475478        /* Yes :-). JRA. */
    476479        trim_char(repository, '\0', '/');
    477        
     480
    478481        if(!repository || *(repository) == '\0') {
    479482                DEBUG(3, ("recycle: repository path not set, purging %s...\n",
     
    674677        if (!NT_STATUS_IS_OK(ret))
    675678                return ret;
    676        
     679
    677680        vfs_recycle_debug_level = debug_add_class("recycle");
    678681        if (vfs_recycle_debug_level == -1) {
     
    682685                DEBUG(10, ("vfs_recycle: Debug class number of 'recycle': %d\n", vfs_recycle_debug_level));
    683686        }
    684        
     687
    685688        return ret;
    686689}
Note: See TracChangeset for help on using the changeset viewer.