From djberg96 at gmail.com Sun Mar 19 23:45:51 2006 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 19 Mar 2006 21:45:51 -0700 Subject: [Win32utils-devel] Need some ACL help for win32-file Message-ID: <441E337F.5010504@gmail.com> Hi folks, I've got most everything done for the pure Ruby version of win32-file. The last thing left (since I'll be moving the IO methods to a different package eventually) is the file security stuff. Here's what I've got so far for the get_permissions method. However, I'm stuck at GetAce(). If someone could help me finish up this method, I would be most appreciative. Also, should we consider dumping this approach in favor of a OLE + WMI solution, using Win32_LogicalFileSecuritySetting ? Dan def self.get_permissions(file) current_length = 0 length_needed = [1].pack('L') sec_buf = '' loop do bool = @@GetFileSecurity.call( file, DACL_SECURITY_INFORMATION, sec_buf, sec_buf.length, length_needed ) if bool == 0 && @@GetLastError.call != ERROR_INSUFFICIENT_BUFFER raise ArgumentError, get_last_error end break if sec_buf.length >= length_needed.unpack('L').first sec_buf += ' ' * length_needed.unpack("L").first end control = [0].pack('L') revision = [0].pack('L') if @@GetSecurityDescriptorControl.call(sec_buf, control, revision) == 0 raise ArgumentError, get_last_error end # No DACL exists if (control.unpack('L').first & SE_DACL_PRESENT) == 0 raise ArgumentError, 'No DACL present: explicit deny all' end dacl_present = [0].pack('L') dacl_defaulted = [0].pack('L') acl_ptr = [0].pack('L') val = @@GetSecurityDescriptorDacl.call( sec_buf, dacl_present, acl_ptr, dacl_defaulted ) if val == 0 raise ArgumentError, get_last_error end acl_buf = 0.chr * 8 @@memcpy.call(acl_buf, acl_ptr.unpack('L').first, 8) if acl_buf.unpack('CCSSS').first == 0 raise ArgumentError, 'DACL is NULL: implicit access grant' end ace_count = acl_buf.unpack('CCSSS')[3] ace_ptr = [0].pack('L') # stuck here 0.upto(ace_count - 1){ |i| if @@GetAce.call(acl_buf, i, ace_ptr) == 0 next end ace_buf = 0.chr * 4 @@memcpy.call(ace_buf, ace_ptr.unpack('L').first, 4) p ace_buf.unpack('CCS') # Not what I expect } end From phasis at nownuri.net Mon Mar 20 21:36:31 2006 From: phasis at nownuri.net (Park Heesob) Date: Tue, 21 Mar 2006 11:36:31 +0900 Subject: [Win32utils-devel] Need some ACL help for win32-file Message-ID: <20060321022937.M62186@nownuri.net> Hi, > >Hi folks, > >I've got most everything done for the pure Ruby version of >win32-file. >The last thing left (since I'll be moving the IO methods to a >different >package eventually) is the file security stuff. Here's what I've >got so >far for the get_permissions method. However, I'm stuck at GetAce(). > If >someone could help me finish up this method, I would be most >appreciative. > >Also, should we consider dumping this approach in favor of a OLE + >WMI >solution, using Win32_LogicalFileSecuritySetting ? > Yes. I think we can do more things with this than WMI. >Dan > >def self.get_permissions(file) > current_length = 0 > length_needed = [1].pack('L') > sec_buf = '' > > loop do > bool = @@GetFileSecurity.call( > file, > DACL_SECURITY_INFORMATION, > sec_buf, > sec_buf.length, > length_needed > ) > > if bool == 0 && @@GetLastError.call != >ERROR_INSUFFICIENT_BUFFER > raise ArgumentError, get_last_error > end > > break if sec_buf.length >= length_needed.unpack('L').first > sec_buf += ' ' * length_needed.unpack("L").first > end > > control = [0].pack('L') > revision = [0].pack('L') > > if @@GetSecurityDescriptorControl.call(sec_buf, control, >revision) >== 0 > raise ArgumentError, get_last_error > end > > # No DACL exists > if (control.unpack('L').first & SE_DACL_PRESENT) == 0 > raise ArgumentError, 'No DACL present: explicit deny all' > end > > dacl_present = [0].pack('L') > dacl_defaulted = [0].pack('L') > acl_ptr = [0].pack('L') > > val = @@GetSecurityDescriptorDacl.call( > sec_buf, > dacl_present, > acl_ptr, > dacl_defaulted > ) > > if val == 0 > raise ArgumentError, get_last_error > end > > acl_buf = 0.chr * 8 > @@memcpy.call(acl_buf, acl_ptr.unpack('L').first, 8) > > if acl_buf.unpack('CCSSS').first == 0 > raise ArgumentError, 'DACL is NULL: implicit access grant' > end > > ace_count = acl_buf.unpack('CCSSS')[3] > ace_ptr = [0].pack('L') > > # stuck here > 0.upto(ace_count - 1){ |i| > if @@GetAce.call(acl_buf, i, ace_ptr) == 0 > next > end > > ace_buf = 0.chr * 4 > @@memcpy.call(ace_buf, ace_ptr.unpack('L').first, 4) > > p ace_buf.unpack('CCS') # Not what I expect > } > > end > > Refer to ruby-talk:184780 define GetAce like this: GetAce = Win32API.new('advapi32', 'GetAce', 'LLP', 'I') and call like this: GetAce.call(acl_ptr.unpack('L')[0], i, ace_ptr) Regards, Park Heesob From Daniel.Berger at qwest.com Tue Mar 21 10:56:39 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 21 Mar 2006 09:56:39 -0600 Subject: [Win32utils-devel] Need some ACL help for win32-file Message-ID: <39AA6550E5AA554AB1456707D6E5563DBCFF01@QTOMAE2K3M01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Park Heesob > Sent: Monday, March 20, 2006 7:37 PM > To: win32utils-devel at rubyforge.org > Subject: Re: [Win32utils-devel] Need some ACL help for win32-file > > > >Also, should we consider dumping this approach in favor of a OLE + > >WMI > >solution, using Win32_LogicalFileSecuritySetting ? > > > Yes. I think we can do more things with this than WMI. Wait - you think we should use WMI or we shouldn't? > Refer to ruby-talk:184780 > > define GetAce like this: > GetAce = Win32API.new('advapi32', 'GetAce', 'LLP', 'I') > > and call like this: > GetAce.call(acl_ptr.unpack('L')[0], i, ace_ptr) Ah, thanks. Feel like taking on LookupAccountSid? :) Regards, Dan From djberg96 at gmail.com Wed Mar 22 00:37:33 2006 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 21 Mar 2006 22:37:33 -0700 Subject: [Win32utils-devel] Need some ACL help for win32-file In-Reply-To: <20060321022937.M62186@nownuri.net> References: <20060321022937.M62186@nownuri.net> Message-ID: <4420E29D.5050006@gmail.com> Well, I've given up trying to figure out the rest of the file permissions stuff (LookupAccountSid, etc). I'm just not getting it. I've committed what I've done so far (now in the toplevel win32-file project in the CVS repo) in file.rb. Any help appreciated. Regards, Dan From phasis at nownuri.net Wed Mar 22 07:58:19 2006 From: phasis at nownuri.net (Park Heesob) Date: Wed, 22 Mar 2006 21:58:19 +0900 Subject: [Win32utils-devel] Need some ACL help for win32-file In-Reply-To: References: Message-ID: <20060322124632.M65859@nownuri.net> Hi, > Well, I've given up trying to figure out the rest of the file > permissions stuff (LookupAccountSid, etc). I'm just not getting it. > Well, Don't give up :) Here is the LookupAccountSid stuff: 0.upto(ace_count - 1){ |i| if @@GetAce.call(dacl_ptr.unpack('L').first, i, ace_ptr) == 0 next end ace_buf = 0.chr * 12 # Header:4,Mask:4,SidStart:4 (struct ACCESS_ALLOWD_ACE) @@memcpy.call(ace_buf, ace_ptr.unpack('L').first, ace_buf.size) if ace_buf.unpack('CCS').first == ACCESS_ALLOWED_ACE_TYPE name = 0.chr * 256 name_len_ptr = [name.size].pack('L') domain = 0.chr * 256 domain_len_ptr = [domain.size].pack('L') snu_ptr = 0.chr * 4 val = @@LookupAccountSid.call( nil, # local computer ace_ptr.unpack('L').first + 8, # address of ace_ptr->SidStart name, name_len_ptr, domain, domain_len_ptr, snu_ptr ) if val == 0 raise ArgumentError, get_last_error end name = name[0...name_len_ptr.unpack('L').first] domain = domain[0...domain_len_ptr.unpack('L').first] mask = ace_buf.unpack('LLL')[1] puts "\n\nUser:#{name},Domain:#{domain}" puts "FILE_APPEND_DATA" if (mask & FILE_APPEND_DATA).nonzero? puts "FILE_EXECUTE" if (mask & FILE_EXECUTE).nonzero? puts "FILE_READ_ATTRIBUTES" if (mask & FILE_READ_ATTRIBUTES).nonzero? puts "FILE_READ_DATA" if (mask & FILE_READ_DATA).nonzero? puts "FILE_READ_EA" if (mask & FILE_READ_EA).nonzero? puts "FILE_WRITE_ATTRIBUTES" if (mask & FILE_WRITE_ATTRIBUTES).nonzero? puts "FILE_WRITE_DATA" if (mask & FILE_WRITE_DATA).nonzero? puts "FILE_WRITE_EA" if (mask & FILE_WRITE_EA).nonzero? puts "DELETE" if (mask & DELETE).nonzero? puts "READ_CONTROL" if (mask & READ_CONTROL).nonzero? puts "WRITE_DAC" if (mask & WRITE_DAC).nonzero? puts "WRITE_OWNER" if (mask & WRITE_OWNER).nonzero? puts "SYNCHRONIZE" if (mask & SYNCHRONIZE).nonzero? puts "ACCESS_SYSTEM_SECURITY" if (mask & ACCESS_SYSTEM_SECURITY).nonzero? puts "MAXIMUM_ALLOWED" if (mask & MAXIMUM_ALLOWED).nonzero? end And define LookupAccountSid like this: @@LookupAccountSid = Win32API.new('advapi32', 'LookupAccountSid', 'PLPPPPP', 'I') > I've committed what I've done so far (now in the toplevel win32-file > project in the CVS repo) in file.rb. Any help appreciated. > > Regards, > > Dan Regards, Park Heesob From Daniel.Berger at qwest.com Wed Mar 22 14:46:42 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 22 Mar 2006 13:46:42 -0600 Subject: [Win32utils-devel] Need some ACL help for win32-file Message-ID: <39AA6550E5AA554AB1456707D6E5563DBCFF07@QTOMAE2K3M01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Park Heesob > Sent: Wednesday, March 22, 2006 5:58 AM > To: win32utils-devel at rubyforge.org > Subject: Re: [Win32utils-devel] Need some ACL help for win32-file > > > Hi, > > Well, I've given up trying to figure out the rest of the file > > permissions stuff (LookupAccountSid, etc). I'm just not > getting it. > > > Well, Don't give up :) > > Here is the LookupAccountSid stuff: Excellent, thanks! I was pretty close. Mainly I was stuck on the second argument (SidStart) and how to handle that. Dan From Daniel.Berger at qwest.com Thu Mar 23 14:23:27 2006 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 23 Mar 2006 13:23:27 -0600 Subject: [Win32utils-devel] Win32API patch? Message-ID: <39AA6550E5AA554AB1456707D6E5563DBCFF10@QTOMAE2K3M01.AD.QINTRA.COM> Hi all, Passing a Fixnum when you should have passed a String (pointer) causes a segfault in Win32API. I've already reported this on RubyForge (Bug #3904): require 'Win32API' RegFormat = Win32API.new('user32', 'RegisterClipboardFormat', 'P', 'I') RegFormat.call(1) # Boom! I've traced the error to line 194 in Win32API.c: ret = ApiFunction(param); Where ApiFunction is defined as: FARPROC ApiFunction = (FARPROC)NUM2ULONG(obj_proc); Any idea what the patch should be? I'd rather get a TypeError than see a segfault. Dan From djberg96 at gmail.com Sat Mar 25 12:13:47 2006 From: djberg96 at gmail.com (Daniel Berger) Date: Sat, 25 Mar 2006 10:13:47 -0700 Subject: [Win32utils-devel] Help with File.set_permissions port Message-ID: <44257A4B.1070707@gmail.com> I've got a (broken) version of File.set_permissions in CVS, and I need some help finishing it off please. Heesob, can you take a look? Thanks, Dan From phasis at nownuri.net Sun Mar 26 08:35:51 2006 From: phasis at nownuri.net (Park Heesob) Date: Sun, 26 Mar 2006 22:35:51 +0900 Subject: [Win32utils-devel] Help with File.set_permissions port In-Reply-To: References: Message-ID: <20060326132550.M29165@nownuri.net> Hi, > I've got a (broken) version of File.set_permissions in CVS, and I need > some help finishing it off please. > > Heesob, can you take a look? > > Thanks, > > Dan Here is set_permissions: def self.set_permissions(file, perms) raise TypeError unless perms.kind_of?(Hash) account_rights = 0 pSD = 0.chr * SECURITY_DESCRIPTOR_MIN_LENGTH if @@InitializeSecurityDescriptor.call(pSD, 1) == 0 raise ArgumentError, get_last_error end cb_acl = 1024 cb_sid = 1024 acl_new = 0.chr * cb_acl if @@InitializeAcl.call(acl_new, cb_acl, ACL_REVISION2) == 0 raise ArgumentError, get_last_error end pSID = 0.chr * cb_sid psnuType = 0.chr * cb_sid allAce = 0.chr * ALLOW_ACE_LENGTH pAllAce = @@memset.call(allAce,0,0) # address of allAce # pAllAce->Header.AceType = ACCESS_ALLOWED_ACE_TYPE allAce[0] = 0 perms.each{ |account, mask| next if mask.nil? cchDomain = [80].pack('L') cbSID = [1024].pack('L') domain_buf = 0.chr * 80 server, account = account.split("\\") if ['BUILTIN', 'NT AUTHORITY'].include?(server.upcase) server = nil end val = @@LookupAccountName.call( server, account, pSID, cbSID, domain_buf, cchDomain, psnuType ) if val == 0 raise ArgumentError, get_last_error end size = [0,0,0,0,0].pack('CCSLL').length # sizeof(ACCESS_ALLOWED_ACE) val = @@CopySid.call( ALLOW_ACE_LENGTH - size, pAllAce + 8, # address of pAllAce->SidStart pSID ) if val == 0 raise ArgumentError, get_last_error end if (GENERIC_ALL & mask).nonzero? account_rights = GENERIC_ALL & mask elsif (GENERIC_RIGHTS_CHK & mask).nonzero? account_rights = GENERIC_RIGHTS_MASK & mask end # pAllAce->Header.AceFlags = INHERIT_ONLY_ACE | OBJECT_INHERIT_ACE ; allAce[1] = INHERIT_ONLY_ACE | OBJECT_INHERIT_ACE 2.times{ if account_rights != 0 allAce[2,2] = [12 - 4 + @@GetLengthSid.call(pSID)].pack('S') allAce[4,4] = [account_rights].pack('L') val = @@AddAce.call( acl_new, ACL_REVISION2, MAXDWORD, pAllAce, allAce[2,2].unpack('S').first ) if val == 0 raise ArgumentError, get_last_error end # pAllAce->Header.AceFlags = CONTAINER_INHERIT_ACE allAce[1] = CONTAINER_INHERIT_ACE else # pAllAce->Header.AceFlags = 0 allAce[1] = 0 end account_rights = REST_RIGHTS_MASK & mask } } if @@SetSecurityDescriptorDacl.call(pSD, 1, acl_new, 0) == 0 raise ArgumentError, get_last_error end if @@SetFileSecurity.call(file, DACL_SECURITY_INFORMATION, pSD) == 0 raise ArgumentError, get_last_error end self end And update or define functions like this: @@CopySid = Win32API.new('advapi32', 'CopySid', 'LLP', 'I') @@AddAce = Win32API.new('advapi32', 'AddAce', 'PLLLL', 'I') @@memset = Win32API.new('msvcrt', 'memset', 'PLL', 'L') Today's point: memset is introduced for acquiring address of ruby string. str = "1234" pstr = memset.call(a,0,0) # address of str Regards, Park Heesob From noreply at rubyforge.org Sun Mar 26 17:12:52 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 26 Mar 2006 22:12:52 GMT Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation fault under Windows Message-ID: <200603262212.k2QMCqoJ020708@rubyforge.org> Bugs item #3924, was opened at 26/03/2006 22:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 Category: win32-taskscheduler Group: Code Status: Open Resolution: None Priority: 3 Submitted By: David FAROI (dfaroi) Assigned to: Nobody (None) Summary: Segmentation fault under Windows Initial Comment: I'm trying to make something like this: require 'win32/taskscheduler' include Win32 puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` I get the following error : ------ [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ------ If I remove the two firts line, it works. Note that I have the same error under ruby 1.8.4 Any idea ? -- Windows XP SP2 taskscheduler version 0.0.3 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 From noreply at rubyforge.org Mon Mar 27 05:53:43 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 27 Mar 2006 10:53:43 GMT Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation fault under Windows Message-ID: <200603271053.k2RArhCx019066@rubyforge.org> Bugs item #3924, was opened at 26/03/2006 22:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 Category: win32-taskscheduler Group: Code Status: Open Resolution: None Priority: 3 Submitted By: David FAROI (dfaroi) >Assigned to: Daniel Berger (djberg96) Summary: Segmentation fault under Windows Initial Comment: I'm trying to make something like this: require 'win32/taskscheduler' include Win32 puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` I get the following error : ------ [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ------ If I remove the two firts line, it works. Note that I have the same error under ruby 1.8.4 Any idea ? -- Windows XP SP2 taskscheduler version 0.0.3 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 From noreply at rubyforge.org Mon Mar 27 09:21:39 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 27 Mar 2006 23:21:39 +0900 Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation fault under Windows Message-ID: <200603271421.k2RELd47009337@rubyforge.org> Bugs item #3924, was opened at 2006-03-27 07:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 Category: win32-taskscheduler Group: Code Status: Open Resolution: None Priority: 3 Submitted By: David FAROI (dfaroi) Assigned to: Daniel Berger (djberg96) Summary: Segmentation fault under Windows Initial Comment: I'm trying to make something like this: require 'win32/taskscheduler' include Win32 puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` I get the following error : ------ [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ------ If I remove the two firts line, it works. Note that I have the same error under ruby 1.8.4 Any idea ? -- Windows XP SP2 taskscheduler version 0.0.3 ---------------------------------------------------------------------- >Comment By: Park Heesob (phasis68) Date: 2006-03-27 23:21 Message: Hi, I found what is the bug. Please modify taskscheduler.h Line #173 TASK_FLAG_RUN_ONLY_IF_LOGGED_ON); to INT2NUM(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)); Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 From noreply at rubyforge.org Mon Mar 27 12:34:49 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 27 Mar 2006 17:34:49 GMT Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation fault under Windows Message-ID: <200603271734.k2RHYnWg024405@rubyforge.org> Bugs item #3924, was opened at 26/03/2006 22:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 Category: win32-taskscheduler Group: Code Status: Open Resolution: None Priority: 3 Submitted By: David FAROI (dfaroi) Assigned to: Daniel Berger (djberg96) Summary: Segmentation fault under Windows Initial Comment: I'm trying to make something like this: require 'win32/taskscheduler' include Win32 puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` I get the following error : ------ [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ------ If I remove the two firts line, it works. Note that I have the same error under ruby 1.8.4 Any idea ? -- Windows XP SP2 taskscheduler version 0.0.3 ---------------------------------------------------------------------- >Comment By: David FAROI (dfaroi) Date: 27/03/2006 17:34 Message: Thanks Park Heesob to reply. Will keep you inform if I success compile a taskscheduler.so file. Regards. David ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 27/03/2006 14:21 Message: Hi, I found what is the bug. Please modify taskscheduler.h Line #173 TASK_FLAG_RUN_ONLY_IF_LOGGED_ON); to INT2NUM(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)); Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 From Daniel.Berger at qwest.com Mon Mar 27 15:08:23 2006 From: Daniel.Berger at qwest.com (Daniel Berger) Date: Mon, 27 Mar 2006 13:08:23 -0700 Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation faultunder Windows In-Reply-To: <200603271421.k2RELd47009337@rubyforge.org> References: <200603271421.k2RELd47009337@rubyforge.org> Message-ID: <44284637.2090503@qwest.com> noreply at rubyforge.org wrote: > Bugs item #3924, was opened at 2006-03-27 07:12 > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 > > Category: win32-taskscheduler > Group: Code > Status: Open > Resolution: None > Priority: 3 > Submitted By: David FAROI (dfaroi) > Assigned to: Daniel Berger (djberg96) > Summary: Segmentation fault under Windows > > Initial Comment: > I'm trying to make something like this: > > require 'win32/taskscheduler' > include Win32 > > puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` > > I get the following error : > ------ > [BUG] Segmentation fault > ruby 1.8.2 (2004-12-25) [i386-mswin32] > > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > ------ > > If I remove the two firts line, it works. > Note that I have the same error under ruby 1.8.4 > > Any idea ? > > -- > Windows XP SP2 > taskscheduler version 0.0.3 > > ---------------------------------------------------------------------- > > >>Comment By: Park Heesob (phasis68) > > Date: 2006-03-27 23:21 > > Message: > Hi, > I found what is the bug. > > Please modify taskscheduler.h Line #173 > TASK_FLAG_RUN_ONLY_IF_LOGGED_ON); > to > INT2NUM(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)); > > > Regards, > > Park Heesob Excellent. Go ahead and close out the ticket. Thanks, Dan From noreply at rubyforge.org Thu Mar 30 05:01:51 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 30 Mar 2006 05:01:51 -0500 Subject: [Win32utils-devel] [ win32utils-Feature Requests-3978 ] Compile files for Ruby One-Click installer Message-ID: <200603301001.k2UA1pvl014589@rubyforge.org> Feature Requests item #3978, was opened at 2006-03-30 05:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=3978&group_id=85 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Compile files for Ruby One-Click installer Initial Comment: Compile the files so they work with the Ruby One-Click installer. Most people developing on Windows are using the Ruby One-Click installer. But now when you drop one of the .so files in a folder you get a segmentation fault. Thanks. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=3978&group_id=85 From noreply at rubyforge.org Thu Mar 30 15:29:34 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 30 Mar 2006 13:29:34 -0700 Subject: [Win32utils-devel] [ win32utils-Bugs-3924 ] Segmentation fault under Windows Message-ID: <200603302029.k2UKTYmR031285@rubyforge.org> Bugs item #3924, was opened at 2006-03-26 15:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 Category: win32-taskscheduler Group: Code >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David FAROI (dfaroi) Assigned to: Daniel Berger (djberg96) Summary: Segmentation fault under Windows Initial Comment: I'm trying to make something like this: require 'win32/taskscheduler' include Win32 puts `xcopy "D:\ATest A" "D:\ATest B" /c /d /e /i /h /l /r /y` I get the following error : ------ [BUG] Segmentation fault ruby 1.8.2 (2004-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ------ If I remove the two firts line, it works. Note that I have the same error under ruby 1.8.4 Any idea ? -- Windows XP SP2 taskscheduler version 0.0.3 ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2006-03-30 13:29 Message: Fixed in CVS. ---------------------------------------------------------------------- Comment By: David FAROI (dfaroi) Date: 2006-03-27 10:34 Message: Thanks Park Heesob to reply. Will keep you inform if I success compile a taskscheduler.so file. Regards. David ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2006-03-27 07:21 Message: Hi, I found what is the bug. Please modify taskscheduler.h Line #173 TASK_FLAG_RUN_ONLY_IF_LOGGED_ON); to INT2NUM(TASK_FLAG_RUN_ONLY_IF_LOGGED_ON)); Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85 From noreply at rubyforge.org Thu Mar 30 15:31:44 2006 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 30 Mar 2006 13:31:44 -0700 Subject: [Win32utils-devel] [ win32utils-Feature Requests-3978 ] Compile files for Ruby One-Click installer Message-ID: <200603302031.k2UKVil9032217@rubyforge.org> Feature Requests item #3978, was opened at 2006-03-30 03:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=3978&group_id=85 Category: None >Group: Code >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Nobody (None) >Assigned to: Daniel Berger (djberg96) Summary: Compile files for Ruby One-Click installer Initial Comment: Compile the files so they work with the Ruby One-Click installer. Most people developing on Windows are using the Ruby One-Click installer. But now when you drop one of the .so files in a folder you get a segmentation fault. Thanks. ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2006-03-30 13:31 Message: There is nothing I can do about it. Curt, for various reasons, decided to compile the latest version of the one-click installer with VC++ 6.0. The best we can do is to replace the C code with pure Ruby versions. We're already in the process of doing that now. - Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=3978&group_id=85 From phasis at gmail.com Fri Mar 31 01:12:11 2006 From: phasis at gmail.com (Heesob Park) Date: Fri, 31 Mar 2006 15:12:11 +0900 Subject: [Win32utils-devel] [ win32utils-Feature Requests-3978 ] Compile files for Ruby One-Click installer In-Reply-To: <200603302031.k2UKVil9032217@rubyforge.org> References: <200603302031.k2UKVil9032217@rubyforge.org> Message-ID: Hi, On 3/31/06, noreply at rubyforge.org wrote: > Feature Requests item #3978, was opened at 2006-03-30 03:01 > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=414&aid=3978&group_id=85 > > Category: None > >Group: Code > >Status: Closed > >Resolution: Rejected > Priority: 3 > Submitted By: Nobody (None) > >Assigned to: Daniel Berger (djberg96) > Summary: Compile files for Ruby One-Click installer > > Initial Comment: > Compile the files so they work with the Ruby One-Click installer. Most people developing on Windows are using the Ruby One-Click installer. But now when you drop one of the .so files in a folder you get a segmentation fault. Thanks. > > ---------------------------------------------------------------------- > > >Comment By: Daniel Berger (djberg96) > Date: 2006-03-30 13:31 > > Message: > There is nothing I can do about it. Curt, for various reasons, decided to compile the latest version of the one-click installer with VC++ 6.0. > > The best we can do is to replace the C code with pure Ruby versions. We're already in the process of doing that now. > > - Dan > I compiled and uploaded so files for 1.8.4 One-Click installer with VC++ 6.0. For the time being, you can download it at http://home.nownuri.net/~phasis/win32-utils.zip Regards, Park Heesob