svnno****@sourc*****
svnno****@sourc*****
2011年 2月 28日 (月) 18:07:19 JST
Revision: 4351 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4351 Author: maya Date: 2011-02-28 18:07:19 +0900 (Mon, 28 Feb 2011) Log Message: ----------- CygTerm+ v1.07_21 Modified Paths: -------------- trunk/cygterm/README trunk/cygterm/README-j trunk/cygterm/cygterm.cc -------------- next part -------------- Modified: trunk/cygterm/README =================================================================== --- trunk/cygterm/README 2011-02-28 08:12:35 UTC (rev 4350) +++ trunk/cygterm/README 2011-02-28 09:07:19 UTC (rev 4351) @@ -3,7 +3,7 @@ Using Cygwin with a terminal emulator. - Copyright (c) 2006-2010 TeraTerm Project + Copyright (c) 2006-2011 TeraTerm Project http://ttssh2.sourceforge.jp/ Based on CygTerm by Original developer: @@ -266,6 +266,9 @@ zsh 4.3.10 // C H A N G E S // +v1.07_21 2011/02/28 (by maya) + * Add mutex object for running check by installer. + v1.07_20 2010/10/20 (by doda) * Directory change timing with '-d' option is delayed. (security fix) Modified: trunk/cygterm/README-j =================================================================== --- trunk/cygterm/README-j 2011-02-28 08:12:35 UTC (rev 4350) +++ trunk/cygterm/README-j 2011-02-28 09:07:19 UTC (rev 4351) @@ -3,7 +3,7 @@ $B%?!<%_%J%k!&%(%_%e%l!<%?$G(B Cygwin $B$r;H$&!#(B - Copyright (c) 2006-2010 TeraTerm Project + Copyright (c) 2006-2011 TeraTerm Project http://ttssh2.sourceforge.jp/ Based on CygTerm by Original developer: @@ -278,6 +278,9 @@ zsh 4.3.10 // $BJQ(B $B99(B $BMz(B $BNr(B // +v1.07_21 2011/02/28 (by maya) + * $B%$%s%9%H!<%i$+$i5/F0%A%'%C%/$r$9$k$?$a$N(B mutex $B$rDI2C$7$?!#(B + v1.07_20 2010/10/20 (by doda) * '-d' $B%*%W%7%g%s$G$N%G%#%l%/%H%jJQ99$N%?%$%_%s%0$rCY$i$;$?!#(B (security fix) Modified: trunk/cygterm/cygterm.cc =================================================================== --- trunk/cygterm/cygterm.cc 2011-02-28 08:12:35 UTC (rev 4350) +++ trunk/cygterm/cygterm.cc 2011-02-28 09:07:19 UTC (rev 4351) @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // CygTerm+ - yet another Cygwin console -// Copyright (c) 2006-2010 TeraTerm Project +// Copyright (c) 2006-2011 TeraTerm Project // Copyright (C) 2000-2006 NSym. //--------------------------------------------------------------------------- // This program is free software; you can redistribute it and/or modify it @@ -108,9 +108,13 @@ // patch level 20 - directory change timing with '-d' option is delayed // Written by IWAMOTO Kouichi. (doda) // +///////////////////////////////////////////////////////////////////////////// +// patch level 21 - add mutex +// Written by NAGATA Shinya. (maya) +// static char Program[] = "CygTerm+"; -static char Version[] = "version 1.07_20 (2010/10/20)"; +static char Version[] = "version 1.07_21 (2011/2/28)"; #include <stdio.h> #include <stdlib.h> @@ -1243,8 +1247,16 @@ int sh_pid, agent_pid = 0; // Create mutex for running check by installer (2006.8.18 maya) - HANDLE hMutex; - hMutex = CreateMutex(NULL, TRUE, "CygTermAppMutex"); + SECURITY_DESCRIPTOR sd; + SECURITY_ATTRIBUTES sa; + HANDLE hMutex, hMutex2; + InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); + SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); + sa.nLength = sizeof(sa); + sa.lpSecurityDescriptor = &sd; + sa.bInheritHandle = FALSE; + hMutex = CreateMutex(&sa, FALSE, "CygTermAppMutex"); + hMutex2 = CreateMutex(&sa, FALSE, "Global\\CygTermAppMutex"); // load configuration load_cfg();