RE: custom slush
"Bernhard Boser" <boser-aFE07iDfcCIb0cFwG/[email protected]> Mon, 14 Jun 2004 13:09:18 -0700
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Organization | UC Berkeley |
| Message-ID | <05fb01c4524b$79b0ef00$0200a8c0@MOLINERA> |
Lorne, Thank you for the quick reply. Can you clarify the following for me: What are the permissions (uid) of in the constructor of a class derived from Slush? Presently, I am "stealing" that thread for my application. Perhaps this is not so fine and it's easy to start a separate thread, but since that one apparently would inherit (after calling registerThread) the permissions from the thread that executed the Slush constructor, those permissions are relevant in any case. Bernhard -----Original Message----- From: Lorne Smith [mailto:Lorne.Smith-6tN4nzCoH/[email protected]] Sent: Monday, June 14, 2004 8:41 AM To: 'boser-aFE07iDfcCIb0cFwG/[email protected]'; tini-6tN4nzCoH/[email protected] Subject: RE: [TINI]custom slush Bernhard, For every thread you create from within the Slush process, you need to call the registerThread(Thread thisThread) method that is part of the com.dalsemi.slush.Slush class. Call this method immediately after instantiating the new thread, but before you start it. This allows the OS to give the new thread the same permissions as its parent. Not calling this method leaves the permissions for the thread set to the default value of 0 (the guest id). --Lorne > -----Original Message----- > From: tini-admin-6tN4nzCoH/[email protected] > [mailto:tini-admin-6tN4nzCoH/[email protected]]On Behalf Of > Bernhard Boser > Sent: Sunday, June 13, 2004 9:26 PM > To: tini-6tN4nzCoH/[email protected] > Cc: Bernhard Boser > Subject: [TINI]custom slush > > > I've extended slush to run my own code. Problem: my code has > no file write > privileges. Apparently, these can be enabled in Slush with > the following > command: > > userIDByThreadID.put( > Thread.currentThread(), > new Byte((byte)adminUID)); > > Unfortunately, userIDByThreadID is declared private in Slush and hence > inaccessible in my derived class. I could of course modify > Slush directly, > but prefer not do so if possible. > > What is the "correct" way to set file write permissions in > custom Slush > extensions? > > Thanks, > Bernhard > > _______________________________________________ > TINI mailing list > TINI-6tN4nzCoH/[email protected] > To UNSUBSCRIBE, edit your profile, or see list archives: > http://lists.dalsemi.com/mailman/listinfo/tini > _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini