[ANN] sys-win32etc 0.0.4

B

Berger, Daniel

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3732A.2AE0B118
Content-Type: text/plain

Hi all,

I'm happy to announce the release of sys-win32etc 0.0.4. This module
provides Etc module functionality for Win32.

What's significant about this release? The last of the memory leaks have
been cleaned up! In addition, server names (if provided) are now
automatically prepended with a '\\'. So now you only need provide
"\\some_server <\\some_server> " instead of "\\\\some_server
<\\\\some_server> ".

However, there is still one issue to work out. See the "Help Wanted"
section below.

Synopsis
=======
require "win32etc"

p Win32Etc.login
p Win32Etc.getpwnam("Guest")
p Win32Etc.getpwuid(500)
p Win32Etc.getgrnam("Guests")
p Win32Etc.getgrgid(512)

Win32Etc.group{ |g|
p g
}

Win32Etc.passwd{ |pw|
p pw
}

HELP WANTED
============
Testing is much appreciated, especially for the optional server name.

Contrary to what I said in the docs, there is still one remaining issue.
For reasons I cannot determine, the current code results in a segfault when
run in conjunction with TestUnit (at least, it does on my WinXP Pro box).
However, the vanilla test script (test.rb) works fine. Help on this
peculiarity is definitely wanted.

Meanwhile, enjoy!

Regards,

Dan

------_=_NextPart_001_01C3732A.2AE0B118
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>[ANN] sys-win32etc 0.0.4</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm happy to announce the release of =
sys-win32etc 0.0.4.&nbsp; This module provides Etc module functionality =
for Win32.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">What's significant about this =
release?&nbsp; The last of the memory leaks have been cleaned up!&nbsp; =
In addition, server names (if provided) are now automatically prepended =
with a '\\'.&nbsp; So now you only need provide &quot;</FONT><A =
HREF=3D"\\some_server"><U><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">\\some_server</FONT></U></A><FONT SIZE=3D2 =
FACE=3D"Arial">&quot; instead of &quot;</FONT><A =
HREF=3D"\\\\some_server"><U><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">\\\\some_server</FONT></U></A><FONT SIZE=3D2 =
FACE=3D"Arial">&quot;.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">However, there is still one issue to =
work out.&nbsp; See the &quot;Help Wanted&quot; section below.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Synopsis</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">require &quot;win32etc&quot;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">p Win32Etc.login</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">p =
Win32Etc.getpwnam(&quot;Guest&quot;)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">p Win32Etc.getpwuid(500)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">p =
Win32Etc.getgrnam(&quot;Guests&quot;)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">p Win32Etc.getgrgid(512)</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Win32Etc.group{ |g|</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp; p g</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">}</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Win32Etc.passwd{ |pw|</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp; p pw</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">}</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">HELP WANTED</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Testing is much appreciated, =
especially for the optional server name.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Contrary to what I said in the docs, =
there is still one remaining issue.&nbsp; For reasons I cannot =
determine, the current code results in a segfault when run in =
conjunction with TestUnit (at least, it does on my WinXP Pro =
box).&nbsp; However, the vanilla test script (test.rb) works =
fine.&nbsp; Help on this peculiarity is definitely wanted.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Meanwhile, enjoy!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Regards,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Dan</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C3732A.2AE0B118--
 
P

Park Heesob

Hi,
----- Original Message -----
From: "Berger, Daniel" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Friday, September 05, 2003 6:19 AM
Subject: [ANN] sys-win32etc 0.0.4


...
HELP WANTED
============
Testing is much appreciated, especially for the optional server name.

Contrary to what I said in the docs, there is still one remaining issue.
For reasons I cannot determine, the current code results in a segfault when
run in conjunction with TestUnit (at least, it does on my WinXP Pro box).
However, the vanilla test script (test.rb) works fine. Help on this
peculiarity is definitely wanted.
I think It's due to invalid struct allocation method.
Try following patch.

===============================================================
@@ -103,8 +103,10 @@
// This portion of code taken partially from a post by Shashank Date.
// Also, the server name is automatically prepended to the server name
// strictly for convenience.
+ wchar_t wszTemp[MAX_PATH];
+ gstruct = rb_struct_new(GroupStruct);
if(tserver != Qnil){
- wchar_t wszTemp[MAX_PATH];
+
VALUE server = rb_str_new2("\\\\");
rb_str_concat(server,tserver);
mbstowcs(wszTemp, STR2CSTR(server), MAX_PATH);
@@ -309,9 +311,11 @@

VALUE r_auth_flags = rb_ary_new();
VALUE uid = Qnil;
+ wchar_t wszTemp[MAX_PATH];

+ pstruct = rb_struct_new(PasswdStruct);
if(tserver != Qnil){
- wchar_t wszTemp[MAX_PATH];
+
VALUE server = rb_str_new2("\\\\");
rb_str_concat(server,tserver);
================================================================

Regards,

Park Heesob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top