winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
451 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Don' t apply file patches in the cabinet extraction callback.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 006801366e1b9e9f647ae46ccf3e899e8872a796 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=006801366e1b9e9f647ae46cc…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:32:18 2015 +0200 msi: Don't apply file patches in the cabinet extraction callback. --- dlls/msi/action.c | 1 - dlls/msi/files.c | 92 +++++++++++++++++++++++++++++------------------------- dlls/msi/msipriv.h | 3 +- dlls/msi/package.c | 9 ++++++ 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index edd08f7..a9a157b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1377,7 +1377,6 @@ static UINT load_patch(MSIRECORD *row, LPVOID param) patch->Sequence = MSI_RecordGetInteger( row, 2 ); patch->PatchSize = MSI_RecordGetInteger( row, 3 ); patch->Attributes = MSI_RecordGetInteger( row, 4 ); - patch->IsApplied = FALSE; /* FIXME: * Header field - for patch validation. diff --git a/dlls/msi/files.c b/dlls/msi/files.c index dff00df..96fb48a 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -436,13 +436,14 @@ done: return rc; } -static MSIFILEPATCH *get_next_filepatch( MSIPACKAGE *package, const WCHAR *key ) +static MSIFILEPATCH *find_filepatch( MSIPACKAGE *package, UINT disk_id, const WCHAR *key ) { MSIFILEPATCH *patch; LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry ) { - if (!patch->IsApplied && !strcmpW( key, patch->File->File )) return patch; + if (!patch->extracted && patch->disk_id == disk_id && !strcmpW( key, patch->File->File )) + return patch; } return NULL; } @@ -450,45 +451,25 @@ static MSIFILEPATCH *get_next_filepatch( MSIPACKAGE *package, const WCHAR *key ) static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user) { - static MSIFILEPATCH *p = NULL; - static WCHAR patch_path[MAX_PATH] = {0}; - static WCHAR temp_folder[MAX_PATH] = {0}; + static MSIFILEPATCH *patch; + static WCHAR tmpfile[MAX_PATH], tmpdir[MAX_PATH]; + UINT_PTR disk_id = (UINT_PTR)user; + + if (!tmpdir[0]) GetTempPathW( MAX_PATH, tmpdir ); if (action == MSICABEXTRACT_BEGINEXTRACT) { - if (temp_folder[0] == '\0') - GetTempPathW(MAX_PATH, temp_folder); - - if (!(p = get_next_filepatch(package, file)) || !p->File->Component->Enabled) - return FALSE; + if (!(patch = find_filepatch( package, disk_id, file ))) return FALSE; - GetTempFileNameW(temp_folder, NULL, 0, patch_path); - - *path = strdupW(patch_path); - *attrs = p->File->Attributes; + GetTempFileNameW( tmpdir, NULL, 0, tmpfile ); + *path = strdupW( tmpfile ); + *attrs = patch->File->Attributes; } else if (action == MSICABEXTRACT_FILEEXTRACTED) { - WCHAR patched_file[MAX_PATH]; - BOOL br; - - GetTempFileNameW(temp_folder, NULL, 0, patched_file); - - br = ApplyPatchToFileW(patch_path, p->File->TargetPath, patched_file, 0); - if (br) - { - /* FIXME: baseline cache */ - - DeleteFileW( p->File->TargetPath ); - MoveFileW( patched_file, p->File->TargetPath ); - - p->IsApplied = TRUE; - } - else - ERR("Failed patch %s: %d.\n", debugstr_w(p->File->TargetPath), GetLastError()); - - DeleteFileW(patch_path); - p = NULL; + patch->path = strdupW( tmpfile ); + patch->extracted = TRUE; + patch = NULL; } return TRUE; @@ -504,6 +485,8 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) ); + TRACE("extracting files\n"); + LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry ) { MSIFILE *file = patch->File; @@ -519,7 +502,7 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) comp->Action = msi_get_component_action( package, comp ); if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL) continue; - if (!patch->IsApplied) + if (!patch->extracted) { MSICABDATA data; @@ -529,23 +512,48 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) ERR("Failed to ready media for %s\n", debugstr_w(file->File)); goto done; } - - data.mi = mi; + data.mi = mi; data.package = package; - data.cb = patchfiles_cb; - data.user = (PVOID)(UINT_PTR)mi->disk_id; + data.cb = patchfiles_cb; + data.user = (PVOID)(UINT_PTR)mi->disk_id; - if (!msi_cabextract(package, mi, &data)) + if (!msi_cabextract( package, mi, &data )) { ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet)); rc = ERROR_INSTALL_FAILURE; goto done; } } + } + + TRACE("applying patches\n"); + + LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry ) + { + WCHAR tmpdir[MAX_PATH], tmpfile[MAX_PATH]; + BOOL ret; + + if (!patch->path) continue; + + GetTempPathW( MAX_PATH, tmpdir ); + GetTempFileNameW( tmpdir, NULL, 0, tmpfile ); + + ret = ApplyPatchToFileW( patch->path, patch->File->TargetPath, tmpfile, 0 ); + if (ret) + { + DeleteFileW( patch->File->TargetPath ); + MoveFileW( tmpfile, patch->File->TargetPath ); + } + else + WARN("failed to patch %s: %08x\n", debugstr_w(patch->File->TargetPath), GetLastError()); + + DeleteFileW( patch->path ); + DeleteFileW( tmpfile ); + RemoveDirectoryW( tmpdir ); - if (!patch->IsApplied && !(patch->Attributes & msidbPatchAttributesNonVital)) + if (!ret && !(patch->Attributes & msidbPatchAttributesNonVital)) { - ERR("Failed to apply patch to file: %s\n", debugstr_w(file->File)); + ERR("Failed to apply patch to file: %s\n", debugstr_w(patch->File->File)); rc = ERROR_INSTALL_FAILURE; goto done; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index b58dc32..fe4f6d6 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -593,8 +593,9 @@ typedef struct tagMSIFILEPATCH INT Sequence; INT PatchSize; INT Attributes; - BOOL IsApplied; + BOOL extracted; UINT disk_id; + WCHAR *path; } MSIFILEPATCH; typedef struct tagMSIAPPID diff --git a/dlls/msi/package.c b/dlls/msi/package.c index fcbf663..1053053 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -200,6 +200,15 @@ static void free_package_structures( MSIPACKAGE *package ) msi_free( file ); } + LIST_FOR_EACH_SAFE( item, cursor, &package->filepatches ) + { + MSIFILEPATCH *patch = LIST_ENTRY( item, MSIFILEPATCH, entry ); + + list_remove( &patch->entry ); + msi_free( patch->path ); + msi_free( patch ); + } + /* clean up extension, progid, class and verb structures */ LIST_FOR_EACH_SAFE( item, cursor, &package->classes ) {
1
0
0
0
Hans Leidekker : msi: Store the disk id for file patches.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 0762dd68f8feeaa7698aa4d47cee02507a2c0190 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0762dd68f8feeaa7698aa4d47…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:25:27 2015 +0200 msi: Store the disk id for file patches. --- dlls/msi/action.c | 23 ++++++++++++++++++++++- dlls/msi/msipriv.h | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d1c46b8..edd08f7 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1278,7 +1278,7 @@ static UINT load_file(MSIRECORD *row, LPVOID param) load_file_hash(package, file); load_file_disk_id(package, file); - TRACE("File Loaded (%s)\n",debugstr_w(file->File)); + TRACE("File loaded (file %s sequence %u)\n", debugstr_w(file->File), file->Sequence); list_add_tail( &package->files, &file->entry ); @@ -1336,6 +1336,25 @@ static UINT load_all_media( MSIPACKAGE *package ) return r; } +static UINT load_patch_disk_id( MSIPACKAGE *package, MSIFILEPATCH *patch ) +{ + static const WCHAR query[] = + {'S','E','L','E','C','T',' ','`','D','i','s','k','I','d','`',' ', 'F','R','O','M',' ', + '`','M','e','d','i','a','`',' ','W','H','E','R','E',' ', + '`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ','>','=',' ','%','u',0}; + MSIRECORD *rec; + + if (!(rec = MSI_QueryGetRecord( package->db, query, patch->Sequence ))) + { + WARN("query failed\n"); + return ERROR_FUNCTION_FAILED; + } + + patch->disk_id = MSI_RecordGetInteger( rec, 1 ); + msiobj_release( &rec->hdr ); + return ERROR_SUCCESS; +} + static UINT load_patch(MSIRECORD *row, LPVOID param) { MSIPACKAGE *package = param; @@ -1365,6 +1384,8 @@ static UINT load_patch(MSIRECORD *row, LPVOID param) * _StreamRef - External key into MsiPatchHeaders (instead of the header field) */ + load_patch_disk_id( package, patch ); + TRACE("Patch loaded (file %s sequence %u)\n", debugstr_w(patch->File->File), patch->Sequence); list_add_tail( &package->filepatches, &patch->entry ); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index ac7ba32..b58dc32 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -594,6 +594,7 @@ typedef struct tagMSIFILEPATCH INT PatchSize; INT Attributes; BOOL IsApplied; + UINT disk_id; } MSIFILEPATCH; typedef struct tagMSIAPPID
1
0
0
0
Hans Leidekker : msi: Import mspatcha instead of loading it dynamically.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 2acc11c215c822fac348459aca74a0439ee8a60d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2acc11c215c822fac348459ac…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Apr 1 12:24:57 2015 +0200 msi: Import mspatcha instead of loading it dynamically. --- configure | 2 +- configure.ac | 2 +- dlls/msi/Makefile.in | 2 +- dlls/msi/files.c | 38 +------------------------------------- dlls/mspatcha/Makefile.in | 3 ++- 5 files changed, 6 insertions(+), 41 deletions(-) diff --git a/configure b/configure index 4596844..3b8dfb1 100755 --- a/configure +++ b/configure @@ -17372,7 +17372,7 @@ wine_fn_config_dll msisip enable_msisip wine_fn_config_dll msisys.ocx enable_msisys_ocx wine_fn_config_dll msls31 enable_msls31 wine_fn_config_dll msnet32 enable_msnet32 -wine_fn_config_dll mspatcha enable_mspatcha +wine_fn_config_dll mspatcha enable_mspatcha implib wine_fn_config_dll msrle32 enable_msrle32 po wine_fn_config_test dlls/msrle32/tests msrle32_test wine_fn_config_dll mssign32 enable_mssign32 diff --git a/configure.ac b/configure.ac index 1fc7873..688ab26 100644 --- a/configure.ac +++ b/configure.ac @@ -3074,7 +3074,7 @@ WINE_CONFIG_DLL(msisip) WINE_CONFIG_DLL(msisys.ocx) WINE_CONFIG_DLL(msls31) WINE_CONFIG_DLL(msnet32) -WINE_CONFIG_DLL(mspatcha) +WINE_CONFIG_DLL(mspatcha,,[implib]) WINE_CONFIG_DLL(msrle32,,[po]) WINE_CONFIG_TEST(dlls/msrle32/tests) WINE_CONFIG_DLL(mssign32) diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index f355e33..79704ad 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -1,7 +1,7 @@ MODULE = msi.dll IMPORTLIB = msi IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 -DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp +DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp mspatcha C_SRCS = \ action.c \ diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 40cc3f6..dff00df 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -43,13 +43,11 @@ #include "winuser.h" #include "winreg.h" #include "shlwapi.h" +#include "patchapi.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); -static HMODULE hmspatcha; -static BOOL (WINAPI *ApplyPatchToFileW)(LPCWSTR, LPCWSTR, LPCWSTR, ULONG); - static void msi_file_update_ui( MSIPACKAGE *package, MSIFILE *f, const WCHAR *action ) { MSIRECORD *uirow; @@ -438,30 +436,6 @@ done: return rc; } -static BOOL load_mspatcha(void) -{ - hmspatcha = LoadLibraryA("mspatcha.dll"); - if (!hmspatcha) - { - ERR("Failed to load mspatcha.dll: %d\n", GetLastError()); - return FALSE; - } - - ApplyPatchToFileW = (void*)GetProcAddress(hmspatcha, "ApplyPatchToFileW"); - if(!ApplyPatchToFileW) - { - ERR("GetProcAddress(ApplyPatchToFileW) failed: %d.\n", GetLastError()); - return FALSE; - } - - return TRUE; -} - -static void unload_mspatch(void) -{ - FreeLibrary(hmspatcha); -} - static MSIFILEPATCH *get_next_filepatch( MSIPACKAGE *package, const WCHAR *key ) { MSIFILEPATCH *patch; @@ -525,7 +499,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) MSIFILEPATCH *patch; MSIMEDIAINFO *mi; UINT rc = ERROR_SUCCESS; - BOOL mspatcha_loaded = FALSE; TRACE("%p\n", package); @@ -557,13 +530,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) goto done; } - if (!mspatcha_loaded && !load_mspatcha()) - { - rc = ERROR_FUNCTION_FAILED; - goto done; - } - mspatcha_loaded = TRUE; - data.mi = mi; data.package = package; data.cb = patchfiles_cb; @@ -587,8 +553,6 @@ UINT ACTION_PatchFiles( MSIPACKAGE *package ) done: msi_free_media_info(mi); - if (mspatcha_loaded) - unload_mspatch(); return rc; } diff --git a/dlls/mspatcha/Makefile.in b/dlls/mspatcha/Makefile.in index b1ddb50..bd0da7d 100644 --- a/dlls/mspatcha/Makefile.in +++ b/dlls/mspatcha/Makefile.in @@ -1,4 +1,5 @@ -MODULE = mspatcha.dll +MODULE = mspatcha.dll +IMPORTLIB = mspatcha C_SRCS = \ mspatcha_main.c
1
0
0
0
Sebastian Lackner : advapi32/tests: Add tests for CreateFile with set security descriptor.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 9e0045e1674350af9ddaf8e21c0ca3eecd5bf1f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e0045e1674350af9ddaf8e21…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Apr 1 09:06:10 2015 +0200 advapi32/tests: Add tests for CreateFile with set security descriptor. --- dlls/advapi32/tests/security.c | 55 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 0ff773c..3789d72 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3267,7 +3267,7 @@ static void test_CreateDirectoryA(void) 0x1f01ff, FALSE, TRUE, FALSE, __LINE__); LocalFree(pSD); - /* Test inheritance of ACLs */ + /* Test inheritance of ACLs in CreateFile without security descriptor */ strcpy(tmpfile, tmpdir); lstrcatA(tmpfile, "/tmpfile"); @@ -3284,7 +3284,55 @@ static void test_CreateDirectoryA(void) LocalFree(pSD); CloseHandle(hTemp); - /* Repeat the same test with ntdll functions */ + /* Test inheritance of ACLs in CreateFile with security descriptor - + * When a security descriptor is set, then inheritance doesn't take effect */ + pSD = &sd; + InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION); + pDacl = HeapAlloc(GetProcessHeap(), 0, sizeof(ACL)); + bret = InitializeAcl(pDacl, sizeof(ACL), ACL_REVISION); + ok(bret, "Failed to initialize ACL\n"); + bret = SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE); + ok(bret, "Failed to add ACL to security desciptor\n"); + + strcpy(tmpfile, tmpdir); + lstrcatA(tmpfile, "/tmpfile"); + + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = pSD; + sa.bInheritHandle = TRUE; + hTemp = CreateFileA(tmpfile, GENERIC_WRITE, FILE_SHARE_READ, &sa, + CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, NULL); + ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, pDacl); + + error = pGetSecurityInfo(hTemp, SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + (PSID *)&owner, NULL, &pDacl, NULL, &pSD); + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); + ok(bret, "GetAclInformation failed\n"); + todo_wine + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + acl_size.AceCount); + LocalFree(pSD); + + error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + (PSID *)&owner, NULL, &pDacl, NULL, &pSD); + todo_wine + ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); + if (error == ERROR_SUCCESS) + { + bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); + ok(bret, "GetAclInformation failed\n"); + todo_wine + ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", + acl_size.AceCount); + LocalFree(pSD); + } + CloseHandle(hTemp); + + /* Test inheritance of ACLs in NtCreateFile without security descriptor */ strcpy(tmpfile, tmpdir); lstrcatA(tmpfile, "/tmpfile"); get_nt_pathW(tmpfile, &tmpfileW); @@ -3310,7 +3358,8 @@ static void test_CreateDirectoryA(void) LocalFree(pSD); CloseHandle(hTemp); - /* When a security descriptor is set, then inheritance doesn't take effect */ + /* Test inheritance of ACLs in NtCreateFile with security descriptor - + * When a security descriptor is set, then inheritance doesn't take effect */ pSD = &sd; InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION); pDacl = HeapAlloc(GetProcessHeap(), 0, sizeof(ACL));
1
0
0
0
Sebastian Lackner : advapi32/tests: Merge common code to test DACL descriptors in a helper function.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: bfcfceec3939340c5d2d676194c6e2d4efcf1208 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfcfceec3939340c5d2d67619…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Apr 1 08:58:56 2015 +0200 advapi32/tests: Merge common code to test DACL descriptors in a helper function. --- dlls/advapi32/tests/security.c | 174 +++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 94 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 4bee951..0ff773c 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3110,6 +3110,80 @@ static void get_nt_pathW(const char *name, UNICODE_STRING *nameW) RtlFreeUnicodeString(&strW); } +static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD flags, DWORD mask, + BOOL todo_count, BOOL todo_sid, BOOL todo_flags, int line) +{ + ACL_SIZE_INFORMATION acl_size; + ACCESS_ALLOWED_ACE *ace; + BOOL bret; + + bret = pGetAclInformation(dacl, &acl_size, sizeof(acl_size), AclSizeInformation); + ok_(__FILE__, line)(bret, "GetAclInformation failed\n"); + + if (todo_count) + todo_wine + ok_(__FILE__, line)(acl_size.AceCount == 2, + "GetAclInformation returned unexpected entry count (%d != 2)\n", + acl_size.AceCount); + else + ok_(__FILE__, line)(acl_size.AceCount == 2, + "GetAclInformation returned unexpected entry count (%d != 2)\n", + acl_size.AceCount); + + if (acl_size.AceCount > 0) + { + bret = pGetAce(dacl, 0, (VOID **)&ace); + ok_(__FILE__, line)(bret, "Failed to get Current User ACE\n"); + + bret = EqualSid(&ace->SidStart, user_sid); + if (todo_sid) + todo_wine + ok_(__FILE__, line)(bret, "Current User ACE != Current User SID\n"); + else + ok_(__FILE__, line)(bret, "Current User ACE != Current User SID\n"); + + if (todo_flags) + todo_wine + ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, + "Current User ACE has unexpected flags (0x%x != 0x%x)\n", + ((ACE_HEADER *)ace)->AceFlags, flags); + else + ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, + "Current User ACE has unexpected flags (0x%x != 0x%x)\n", + ((ACE_HEADER *)ace)->AceFlags, flags); + + ok_(__FILE__, line)(ace->Mask == mask, + "Current User ACE has unexpected mask (0x%x != 0x%x)\n", + ace->Mask, mask); + } + if (acl_size.AceCount > 1) + { + bret = pGetAce(dacl, 1, (VOID **)&ace); + ok_(__FILE__, line)(bret, "Failed to get Administators Group ACE\n"); + + bret = EqualSid(&ace->SidStart, admin_sid); + if (todo_sid) + todo_wine + ok_(__FILE__, line)(bret, "Administators Group ACE != Administators Group SID\n"); + else + ok_(__FILE__, line)(bret, "Administators Group ACE != Administators Group SID\n"); + + if (todo_flags) + todo_wine + ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, + "Administators Group ACE has unexpected flags (0x%x != 0x%x)\n", + ((ACE_HEADER *)ace)->AceFlags, flags); + else + ok_(__FILE__, line)(((ACE_HEADER *)ace)->AceFlags == flags, + "Administators Group ACE has unexpected flags (0x%x != 0x%x)\n", + ((ACE_HEADER *)ace)->AceFlags, flags); + + ok_(__FILE__, line)(ace->Mask == mask, + "Administators Group ACE has unexpected mask (0x%x != 0x%x)\n", + ace->Mask, mask); + } +} + static void test_CreateDirectoryA(void) { char admin_ptr[sizeof(SID)+sizeof(ULONG)*SID_MAX_SUB_AUTHORITIES], *user; @@ -3119,7 +3193,6 @@ static void test_CreateDirectoryA(void) PSECURITY_DESCRIPTOR pSD = &sd; ACL_SIZE_INFORMATION acl_size; UNICODE_STRING tmpfileW; - ACCESS_ALLOWED_ACE *ace; SECURITY_ATTRIBUTES sa; OBJECT_ATTRIBUTES attr; char tmpfile[MAX_PATH]; @@ -3190,35 +3263,8 @@ static void test_CreateDirectoryA(void) goto done; } ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); - - bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); - ok(bret, "GetAclInformation failed\n"); - ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", - acl_size.AceCount); - if (acl_size.AceCount > 0) - { - bret = pGetAce(pDacl, 0, (VOID **)&ace); - ok(bret, "Failed to get Current User ACE.\n"); - bret = EqualSid(&ace->SidStart, user_sid); - todo_wine ok(bret, "Current User ACE != Current User SID.\n"); - ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE), - "Current User ACE has unexpected flags (0x%x != 0x03)\n", - ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", - ace->Mask); - } - if (acl_size.AceCount > 1) - { - bret = pGetAce(pDacl, 1, (VOID **)&ace); - ok(bret, "Failed to get Administators Group ACE.\n"); - bret = EqualSid(&ace->SidStart, admin_sid); - todo_wine ok(bret, "Administators Group ACE != Administators Group SID.\n"); - ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE), - "Administators Group ACE has unexpected flags (0x%x != 0x03)\n", - ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", - ace->Mask); - } + test_inherited_dacl(pDacl, admin_sid, user_sid, OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE, + 0x1f01ff, FALSE, TRUE, FALSE, __LINE__); LocalFree(pSD); /* Test inheritance of ACLs */ @@ -3233,38 +3279,8 @@ static void test_CreateDirectoryA(void) OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n"); - - bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); - ok(bret, "GetAclInformation failed\n"); - todo_wine - ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", - acl_size.AceCount); - if (acl_size.AceCount > 0) - { - bret = pGetAce(pDacl, 0, (VOID **)&ace); - ok(bret, "Inherited Failed to get Current User ACE.\n"); - bret = EqualSid(&ace->SidStart, user_sid); - todo_wine - ok(bret, "Inherited Current User ACE != Current User SID.\n"); - todo_wine - ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, - "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, - "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); - } - if (acl_size.AceCount > 1) - { - bret = pGetAce(pDacl, 1, (VOID **)&ace); - ok(bret, "Inherited Failed to get Administators Group ACE.\n"); - bret = EqualSid(&ace->SidStart, admin_sid); - todo_wine - ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n"); - todo_wine - ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, - "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, - "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); - } + test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE, + 0x1f01ff, TRUE, TRUE, TRUE, __LINE__); LocalFree(pSD); CloseHandle(hTemp); @@ -3289,38 +3305,8 @@ static void test_CreateDirectoryA(void) OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, (PSID *)&owner, NULL, &pDacl, NULL, &pSD); ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n"); - - bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); - ok(bret, "GetAclInformation failed\n"); - todo_wine - ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", - acl_size.AceCount); - if (acl_size.AceCount > 0) - { - bret = pGetAce(pDacl, 0, (VOID **)&ace); - ok(bret, "Inherited Failed to get Current User ACE.\n"); - bret = EqualSid(&ace->SidStart, user_sid); - todo_wine - ok(bret, "Inherited Current User ACE != Current User SID.\n"); - todo_wine - ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, - "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, - "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); - } - if (acl_size.AceCount > 1) - { - bret = pGetAce(pDacl, 1, (VOID **)&ace); - ok(bret, "Inherited Failed to get Administators Group ACE.\n"); - bret = EqualSid(&ace->SidStart, admin_sid); - todo_wine - ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n"); - todo_wine - ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, - "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); - ok(ace->Mask == 0x1f01ff, - "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask); - } + test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE, + 0x1f01ff, TRUE, TRUE, TRUE, __LINE__); LocalFree(pSD); CloseHandle(hTemp);
1
0
0
0
Andrew Cook : server: Implement IsProcessInJob.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 3affd63b34b042ec8f3538a51b7cd1cb76db7fe4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3affd63b34b042ec8f3538a51…
Author: Andrew Cook <ariscop(a)gmail.com> Date: Wed Apr 1 09:27:34 2015 +1100 server: Implement IsProcessInJob. --- dlls/kernel32/tests/process.c | 3 --- dlls/ntdll/sync.c | 15 +++++++++++++-- include/wine/server_protocol.h | 19 ++++++++++++++++++- server/process.c | 22 ++++++++++++++++++++++ server/protocol.def | 7 +++++++ server/request.h | 5 +++++ server/trace.c | 10 ++++++++++ 7 files changed, 75 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 55cd42f..fd47951 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -2208,7 +2208,6 @@ static void test_IsProcessInJob(void) out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); ok(ret, "IsProcessInJob error %u\n", GetLastError()); - todo_wine ok(out, "IsProcessInJob returned out=%u\n", out); out = TRUE; @@ -2219,7 +2218,6 @@ static void test_IsProcessInJob(void) out = FALSE; ret = pIsProcessInJob(pi.hProcess, NULL, &out); ok(ret, "IsProcessInJob error %u\n", GetLastError()); - todo_wine ok(out, "IsProcessInJob returned out=%u\n", out); TerminateProcess(pi.hProcess, 0); @@ -2230,7 +2228,6 @@ static void test_IsProcessInJob(void) out = FALSE; ret = pIsProcessInJob(pi.hProcess, job, &out); ok(ret, "IsProcessInJob error %u\n", GetLastError()); - todo_wine ok(out, "IsProcessInJob returned out=%u\n", out); CloseHandle(pi.hProcess); diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index de5e36f..ce1a635 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -644,8 +644,19 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla */ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job ) { - FIXME( "stub: %p %p\n", process, job ); - return STATUS_PROCESS_NOT_IN_JOB; + NTSTATUS status; + + TRACE( "(%p %p)\n", job, process ); + + SERVER_START_REQ( process_in_job ) + { + req->job = wine_server_obj_handle( job ); + req->process = wine_server_obj_handle( process ); + status = wine_server_call( req ); + } + SERVER_END_REQ; + + return status; } /****************************************************************************** diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 300ad37..5a9f3ab 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -5113,6 +5113,20 @@ struct assign_job_reply }; + +struct process_in_job_request +{ + struct request_header __header; + obj_handle_t job; + obj_handle_t process; + char __pad_20[4]; +}; +struct process_in_job_reply +{ + struct reply_header __header; +}; + + enum request { REQ_new_process, @@ -5373,6 +5387,7 @@ enum request REQ_set_suspend_context, REQ_create_job, REQ_assign_job, + REQ_process_in_job, REQ_NB_REQUESTS }; @@ -5638,6 +5653,7 @@ union generic_request struct set_suspend_context_request set_suspend_context_request; struct create_job_request create_job_request; struct assign_job_request assign_job_request; + struct process_in_job_request process_in_job_request; }; union generic_reply { @@ -5901,8 +5917,9 @@ union generic_reply struct set_suspend_context_reply set_suspend_context_reply; struct create_job_reply create_job_reply; struct assign_job_reply assign_job_reply; + struct process_in_job_reply process_in_job_reply; }; -#define SERVER_PROTOCOL_VERSION 462 +#define SERVER_PROTOCOL_VERSION 463 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/process.c b/server/process.c index fd08178..9534f90 100644 --- a/server/process.c +++ b/server/process.c @@ -1484,3 +1484,25 @@ DECL_HANDLER(assign_job) } release_object( job ); } + + +/* check if a process is associated with a job */ +DECL_HANDLER(process_in_job) +{ + struct process *process; + struct job *job; + + if (!(process = get_process_from_handle( req->process, PROCESS_QUERY_INFORMATION ))) + return; + + if (!req->job) + { + set_error( process->job ? STATUS_PROCESS_IN_JOB : STATUS_PROCESS_NOT_IN_JOB ); + } + else if ((job = get_job_obj( current->process, req->job, JOB_OBJECT_QUERY ))) + { + set_error( process->job == job ? STATUS_PROCESS_IN_JOB : STATUS_PROCESS_NOT_IN_JOB ); + release_object( job ); + } + release_object( process ); +} diff --git a/server/protocol.def b/server/protocol.def index fa5577f..b85adca 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3521,3 +3521,10 @@ enum coords_relative obj_handle_t job; /* handle to the job */ obj_handle_t process; /* handle to the process */ @END + + +/* Check if a process is associated with a job */ +@REQ(process_in_job) + obj_handle_t job; /* handle to the job */ + obj_handle_t process; /* handle to the process */ +@END diff --git a/server/request.h b/server/request.h index 87f55c6..aef316a 100644 --- a/server/request.h +++ b/server/request.h @@ -364,6 +364,7 @@ DECL_HANDLER(get_suspend_context); DECL_HANDLER(set_suspend_context); DECL_HANDLER(create_job); DECL_HANDLER(assign_job); +DECL_HANDLER(process_in_job); #ifdef WANT_REQUEST_HANDLERS @@ -628,6 +629,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = (req_handler)req_set_suspend_context, (req_handler)req_create_job, (req_handler)req_assign_job, + (req_handler)req_process_in_job, }; C_ASSERT( sizeof(affinity_t) == 8 ); @@ -2216,6 +2218,9 @@ C_ASSERT( sizeof(struct create_job_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct assign_job_request, job) == 12 ); C_ASSERT( FIELD_OFFSET(struct assign_job_request, process) == 16 ); C_ASSERT( sizeof(struct assign_job_request) == 24 ); +C_ASSERT( FIELD_OFFSET(struct process_in_job_request, job) == 12 ); +C_ASSERT( FIELD_OFFSET(struct process_in_job_request, process) == 16 ); +C_ASSERT( sizeof(struct process_in_job_request) == 24 ); #endif /* WANT_REQUEST_HANDLERS */ diff --git a/server/trace.c b/server/trace.c index aa5327c..cba15a3 100644 --- a/server/trace.c +++ b/server/trace.c @@ -4113,6 +4113,12 @@ static void dump_assign_job_request( const struct assign_job_request *req ) fprintf( stderr, ", process=%04x", req->process ); } +static void dump_process_in_job_request( const struct process_in_job_request *req ) +{ + fprintf( stderr, " job=%04x", req->job ); + fprintf( stderr, ", process=%04x", req->process ); +} + static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_new_process_request, (dump_func)dump_get_new_process_info_request, @@ -4372,6 +4378,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_set_suspend_context_request, (dump_func)dump_create_job_request, (dump_func)dump_assign_job_request, + (dump_func)dump_process_in_job_request, }; static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { @@ -4633,6 +4640,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { NULL, (dump_func)dump_create_job_reply, NULL, + NULL, }; static const char * const req_names[REQ_NB_REQUESTS] = { @@ -4894,6 +4902,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = { "set_suspend_context", "create_job", "assign_job", + "process_in_job", }; static const struct @@ -4996,6 +5005,7 @@ static const struct { "PIPE_LISTENING", STATUS_PIPE_LISTENING }, { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE }, { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD }, + { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB }, { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING }, { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG }, { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
1
0
0
0
Andrew Cook : server: Implement AssignProcessToJobObject.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 98132f03644669e4df5202592d4aaa87e5fae9fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98132f03644669e4df5202592…
Author: Andrew Cook <ariscop(a)gmail.com> Date: Wed Apr 1 09:10:16 2015 +1100 server: Implement AssignProcessToJobObject. --- dlls/kernel32/tests/process.c | 2 -- dlls/ntdll/sync.c | 15 ++++++++-- include/wine/server_protocol.h | 19 +++++++++++- server/process.c | 68 +++++++++++++++++++++++++++++++++++++++++- server/process.h | 2 ++ server/protocol.def | 7 +++++ server/request.h | 5 ++++ server/trace.c | 9 ++++++ 8 files changed, 121 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=98132f03644669e4df520…
1
0
0
0
Andrew Cook : server: Implement CreateJobObject.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 0e78b0248d4812c2f4379f59bb4545453e85484f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e78b0248d4812c2f4379f59b…
Author: Andrew Cook <ariscop(a)gmail.com> Date: Thu Feb 26 12:25:23 2015 +1100 server: Implement CreateJobObject. --- dlls/ntdll/sync.c | 33 +++++++++++-- include/wine/server_protocol.h | 22 ++++++++- server/process.c | 110 +++++++++++++++++++++++++++++++++++++++++ server/protocol.def | 10 ++++ server/request.h | 7 +++ server/trace.c | 15 ++++++ 6 files changed, 193 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0e78b0248d4812c2f4379…
1
0
0
0
Andrew Cook : kernel32/tests: Extend IsProcessInJob tests.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: e30a6bbcbd41d2eac9ad4529dda70c5e0c20060f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e30a6bbcbd41d2eac9ad4529d…
Author: Andrew Cook <ariscop(a)gmail.com> Date: Wed Apr 1 12:48:34 2015 +1100 kernel32/tests: Extend IsProcessInJob tests. --- dlls/kernel32/tests/process.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index fd3ce7f..9318b89 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -2168,7 +2168,7 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION static void test_IsProcessInJob(void) { - HANDLE job; + HANDLE job, job2; PROCESS_INFORMATION pi; BOOL ret, out; DWORD dwret; @@ -2182,6 +2182,9 @@ static void test_IsProcessInJob(void) job = pCreateJobObjectW(NULL, NULL); ok(job != NULL, "CreateJobObject error %u\n", GetLastError()); + job2 = pCreateJobObjectW(NULL, NULL); + ok(job2 != NULL, "CreateJobObject error %u\n", GetLastError()); + create_process("wait", &pi); out = TRUE; @@ -2189,6 +2192,16 @@ static void test_IsProcessInJob(void) ok(ret, "IsProcessInJob error %u\n", GetLastError()); ok(!out, "IsProcessInJob returned out=%u\n", out); + out = TRUE; + ret = pIsProcessInJob(pi.hProcess, job2, &out); + ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(!out, "IsProcessInJob returned out=%u\n", out); + + out = TRUE; + ret = pIsProcessInJob(pi.hProcess, NULL, &out); + ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(!out, "IsProcessInJob returned out=%u\n", out); + ret = pAssignProcessToJobObject(job, pi.hProcess); ok(ret, "AssignProcessToJobObject error %u\n", GetLastError()); @@ -2198,6 +2211,17 @@ static void test_IsProcessInJob(void) todo_wine ok(out, "IsProcessInJob returned out=%u\n", out); + out = TRUE; + ret = pIsProcessInJob(pi.hProcess, job2, &out); + ok(ret, "IsProcessInJob error %u\n", GetLastError()); + ok(!out, "IsProcessInJob returned out=%u\n", out); + + out = FALSE; + ret = pIsProcessInJob(pi.hProcess, NULL, &out); + ok(ret, "IsProcessInJob error %u\n", GetLastError()); + todo_wine + ok(out, "IsProcessInJob returned out=%u\n", out); + TerminateProcess(pi.hProcess, 0); dwret = WaitForSingleObject(pi.hProcess, 1000); @@ -2212,6 +2236,7 @@ static void test_IsProcessInJob(void) CloseHandle(pi.hProcess); CloseHandle(pi.hThread); CloseHandle(job); + CloseHandle(job2); } static void test_TerminateJobObject(void)
1
0
0
0
Michael Stefaniuc : winealsa.drv: The result of a comparison is already a BOOL.
by Alexandre Julliard
01 Apr '15
01 Apr '15
Module: wine Branch: master Commit: 8fcfa67a56291691d4b5d7c65b0b98c17c1ff7cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fcfa67a56291691d4b5d7c65…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Apr 1 09:52:54 2015 +0200 winealsa.drv: The result of a comparison is already a BOOL. --- dlls/winealsa.drv/mmdevdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index e32cb54..f0ce3a9 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -1306,7 +1306,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, dump_fmt(fmt); - This->need_remapping = map_channels(This, fmt, &This->alsa_channels, This->alsa_channel_map) == S_OK ? TRUE : FALSE; + This->need_remapping = map_channels(This, fmt, &This->alsa_channels, This->alsa_channel_map) == S_OK; if((err = snd_pcm_hw_params_any(This->pcm_handle, This->hw_params)) < 0){ WARN("Unable to get hw_params: %d (%s)\n", err, snd_strerror(err));
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Results per page:
10
25
50
100
200