Changeset 9353

Show
Ignore:
Timestamp:
06/19/12 13:34:02 (12 months ago)
Author:
sampson
Message:

Merged Windows changes from stable

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/install-windows/OrangeFS-Client/Script Files/Setup.Rul

    r9314 r9353  
    104104    nResult = SdWelcome(szTitle, szMsg); 
    105105    if (nResult = BACK) goto Dlg_SdWelcome; 
    106              
    107 Dlg_SdLicense:                              
    108     szQuestion = ""; 
    109     nResult = SdLicense(szTitle, szMsg, szQuestion, "license.txt"); 
    110     if (nResult = BACK) goto Dlg_SdWelcome; 
    111         
     106         
     107        szTitle   = ""; 
     108        svName    = ""; 
     109    svCompany = ""; 
    112110/* 
    113111Dlg_SdRegisterUser: 
     
    142140Dlg_SdAskDestPath:       
    143141    nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0); 
    144     if (nResult = BACK) goto Dlg_SdLicense; 
     142    if (nResult = BACK) goto Dlg_SdWelcome; 
    145143/* 
    146144Dlg_SdFeatureTree:  
     
    409407        SdFinishReboot ( szTitle , szMsg1 , SYS_BOOTMACHINE , szMsg2 , 0 ); 
    410408    else 
    411         szMsg2 = "Documentation is available in " + (INSTALLDIR ^ "Doc") + "."; 
    412409        szOpt1 = "Start the OrangeFS services"; 
    413410        bOpt1 = TRUE; 
  • trunk/src/client/windows/client-service/client-service.h

    r8941 r9353  
    4040    char ca_path[MAX_PATH]; 
    4141    int threads; 
     42    unsigned int new_file_perms, 
     43                 new_dir_perms; 
    4244    int debug; 
    4345    int debug_stderr; 
  • trunk/src/client/windows/client-service/config.c

    r8970 r9353  
    382382    } 
    383383 
     384    /* new file/dir permissions 
     385     *   0755 = rwxr-xr-x  
     386     */ 
     387    options->new_file_perms = options->new_dir_perms = 0755;  
     388 
    384389    /* default LDAP options */ 
    385390    options->ldap.search_scope = LDAP_SCOPE_ONELEVEL; 
     
    399404{ 
    400405    FILE *config_file; 
    401     char line[256], copy[256], *token, *p; 
     406    char line[256], copy[256], *token, *p, *endptr; 
    402407    int ret = 0, debug_file_flag = FALSE; 
     408    long mask; 
    403409 
    404410    config_file = open_config_file(error_msg, error_msg_len); 
     
    540546                    ret = -1; 
    541547                    goto get_config_exit; 
     548                } 
     549            } 
     550            else if (!stricmp(token, "new-file-perms") || 
     551                     !stricmp(token, "new-dir-perms")) 
     552            { 
     553                p = line + strlen(token); 
     554                EAT_WS(p); 
     555                /* get mask in octal format */ 
     556                mask = strtol(p, &endptr, 8); 
     557                if (!mask || *endptr != '\0') 
     558                { 
     559                    _snprintf(error_msg, error_msg_len, 
     560                        "Configuration file (fatal): " 
     561                        "%s option: parse error - value must be " 
     562                        "nonzero octal integer\n", token); 
     563                    ret = -1; 
     564                    goto get_config_exit; 
     565                } 
     566                if (!stricmp(token, "new-file-perms")) 
     567                { 
     568                    options->new_file_perms = (unsigned int) mask; 
     569                } 
     570                else 
     571                { 
     572                    options->new_dir_perms = (unsigned int) mask; 
    542573                } 
    543574            } 
  • trunk/src/client/windows/client-service/dokan-interface.c

    r9056 r9353  
    835835            fs_remove(fs_path, &credentials); 
    836836        } 
    837         ret = fs_create(fs_path, &credentials, &handle); 
     837        ret = fs_create(fs_path, &credentials, &handle,  
     838            goptions->new_file_perms); 
    838839        break; 
    839840    case CREATE_NEW: 
     
    846847        { 
    847848            /* create file */ 
    848             ret = fs_create(fs_path, &credentials, &handle); 
     849            ret = fs_create(fs_path, &credentials, &handle,  
     850                goptions->new_file_perms); 
    849851        } 
    850852        break; 
     
    853855        {     
    854856            /* create file */ 
    855             ret = fs_create(fs_path, &credentials, &handle); 
     857            ret = fs_create(fs_path, &credentials, &handle, 
     858                goptions->new_file_perms); 
    856859        } 
    857860        break; 
     
    932935        return -1; 
    933936 
    934     ret = fs_mkdir(fs_path, &credentials, &handle); 
     937    ret = fs_mkdir(fs_path, &credentials, &handle, goptions->new_dir_perms); 
    935938 
    936939    DbgPrint("   fs_mkdir returns: %d\n", ret); 
  • trunk/src/client/windows/client-service/fs.c

    r9034 r9353  
    239239int fs_create(char *fs_path, 
    240240              PVFS_credentials *credentials, 
    241               PVFS_handle *handle) 
     241              PVFS_handle *handle, 
     242              unsigned int perms) 
    242243{     
    243244    char *base_dir, *entry_name; 
     
    279280    attr.owner = credentials->uid; 
    280281    attr.group = credentials->gid; 
    281     /* default permissions: rwxr-xr-x */ 
    282     attr.perms = 0755; 
     282    /* configurable in options */ 
     283    attr.perms = perms; 
    283284    attr.atime = attr.mtime = attr.ctime = time(NULL); 
    284285 
     
    498499int fs_mkdir(char *fs_path, 
    499500             PVFS_credentials *credentials, 
    500              PVFS_handle *handle) 
     501             PVFS_handle *handle, 
     502             unsigned int perms) 
    501503{ 
    502504    char *base_dir, *entry_name; 
     
    535537    attr.owner = credentials->uid; 
    536538    attr.group = credentials->gid; 
    537     /* default permissions: rwxr-xr-x */ 
    538     attr.perms = 0755; 
     539    /* configurable in options */ 
     540    attr.perms = perms; 
    539541    attr.atime = attr.mtime = attr.ctime = time(NULL); 
    540542 
  • trunk/src/client/windows/client-service/fs.h

    r8941 r9353  
    3030int fs_create(char *fs_path, 
    3131              PVFS_credentials *credentials, 
    32               PVFS_handle *handle); 
     32              PVFS_handle *handle, 
     33              unsigned int perms); 
    3334 
    3435int fs_remove(char *fs_path, 
     
    5354int fs_mkdir(char *fs_path, 
    5455             PVFS_credentials *credentials, 
    55              PVFS_handle *handle); 
     56             PVFS_handle *handle, 
     57             unsigned int perms); 
    5658 
    5759int fs_io(enum PVFS_io_type io_type, 
  • trunk/src/common/gen-locks/gen-locks.h

    r9189 r9353  
    2222 
    2323#include <stdlib.h> 
     24#ifndef WIN32 
     25#include <unistd.h> 
     26#endif 
    2427 
    2528/* we will make posix locks the default unless turned off for now. */ 
  • trunk/src/common/misc/realpath.c

    r9149 r9353  
    3333#ifndef WIN32 
    3434#include <unistd.h> 
    35 #endif 
    3635#include <sys/syscall.h> 
     36#endif 
    3737#include <string.h> 
    3838#include <errno.h>