I have been developing a Win32 application for about a year now. It consists of a server portion (waiting for incoming connections), as well as a client portion. Since both client and server share routines, I decided to make a module to house the routines that would be used by both. The server code is pretty straight forward. It can be found at http://people.we.mediaone.net/tessai/projects/rpc/rpc.pl.txt. The client code is also available http://people.we.mediaone.net/tessai/projects/rpc/rpc8.pl.txt. Lastly, the module is called Student.pm and is at http://people.we.mediaone.net/tessai/projects/rpc/Student.pm.

I have not written any documentation for this module yet, since I'm the only one using it. This application is for use with my servers (WinNT) here at the office, but may be useful for anyone that is working in an educational environment that utilizes SIS (Student Information System).

The server sits on a port and waits for connections. When a client connects, it sends the server a small amount of information (Room number, Track, Birthdate). The server then searches a text file of SIS data (acquired from the school SIS computer system), and returns a list of likely candidates (students that match the information provided by the client). The client is supplied with a window containing the possible students. The student is then allowed to click which student he/she is. The client then contacts the server again with the student information. The server checks to see if the student has already created an account, searching a second log file of previously made student accounts (if the student has an account, the client will be sent a warning... this is not implemented yet). If the student does not have an account, a username (usr_create sub), password (Birthday), and home directory are created (usr_home_dir sub). Next, the user will be created with all of the information given. The home directory will have permissions given by $staff_perms, $admin_perms, and $student_perms.

From what I can see, the only things left to implement in my application are the adding of the user to the domain and the warning/logging mechanism. Is there anything else I should think about implementing? I don't think that any of the data (with maybe the one editbox in the client portion of the app) is tainted, but I could be wrong. I have not tested it with "format c:" or anything like that, but I tried to make sure that I untainted (if tainted at all) the data as best as I could (of course, I'm always open to suggestions).

The Win32::NetAdmin::UserAdd() will take care of adding the user. However, I'm somewhat stuck on how to implement the logging mechanism. I've been thinking (as is shown in the module) of just flushing a CSV line of data to a text file. Another solution, I suppose, would be to come up with some sort of database and use Win32::ODBC (I'm still learning how to use databases and the like) to do the logging.

NOTE: The RPC.pm module is from Advanced Perl Programming (the Panther book), which uses MSG.pm (same book) and FreezeThaw.pm (from CPAN).<br
Thanks for any help,

Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com

In reply to Suggestions? (style, module use, etc.) by Necos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.