ISFS_CreateFile owner/groupid issue
ISFS_CreateFile owner/groupid issue
what happens is when i call a createfile the file gets created but the permissions aren't what i suspected.
requested permissions:
owner 0 group 0 attributes 0 perm:3-3-0
what i got after the create:
owner 4198 group 18498 attributes 0 perm:3-3-0
i know the wii normally has nothing to do with the owner/group id & they aren't parameters but even if they were thats what i get :-/ (i modified isfs.c to allow it to see if it would be fixed but its not)
the number seems to change depending on the ios its running at (wtf?)
@ios58 its the above
@ios36 & my custom IOS249 (patched ios36 with a finishing touch from myself ) its 15 & 15 as id :/
the following pastebin is a stripped down to the bug code
http://www.dacotaco.com/crap/pastebin/paste/30.html
if anyone can help me out here i'd appreciate it >_>
requested permissions:
owner 0 group 0 attributes 0 perm:3-3-0
what i got after the create:
owner 4198 group 18498 attributes 0 perm:3-3-0
i know the wii normally has nothing to do with the owner/group id & they aren't parameters but even if they were thats what i get :-/ (i modified isfs.c to allow it to see if it would be fixed but its not)
the number seems to change depending on the ios its running at (wtf?)
@ios58 its the above
@ios36 & my custom IOS249 (patched ios36 with a finishing touch from myself ) its 15 & 15 as id :/
the following pastebin is a stripped down to the bug code
http://www.dacotaco.com/crap/pastebin/paste/30.html
if anyone can help me out here i'd appreciate it >_>
Re: ISFS_CreateFile owner/groupid issue
Unless you've identified as a specific title after IOS is loaded (or the current IOS was loaded during an ES_LAUNCHTITLE call), the owner and group used to access/create new files will be uninitialized (random). Not sure why libogc has parameters to specify the owner and group as they will be ignored (unless you're using a patched IOS).
Re: ISFS_CreateFile owner/groupid issue
i never did any identification yet it always seem to have writen files with owner/group id 0 (like all files on the wii seem to be)
also, should the loaded app not be identified as HBC since its booted from HBC?
so what do you suggest i do then? :/
again, libogc doesn't have parameters for the owner & group id. i just added it for a minute to see what would happen >_>
also, should the loaded app not be identified as HBC since its booted from HBC?
so what do you suggest i do then? :/
again, libogc doesn't have parameters for the owner & group id. i just added it for a minute to see what would happen >_>
Re: ISFS_CreateFile owner/groupid issue
Apps loaded from HBC will only be identified as HBC if they use no_ios_reload, otherwise a new IOS is loaded and the owner/group will be uninitialized.
As for what you should do, maybe rethink whatever you're attempting? The reason owner/group permissions exist is to prevent apps accessing files that don't belong to them and homebrew apps can store their files on SD/USB instead of NAND...
As for what you should do, maybe rethink whatever you're attempting? The reason owner/group permissions exist is to prevent apps accessing files that don't belong to them and homebrew apps can store their files on SD/USB instead of NAND...
Re: ISFS_CreateFile owner/groupid issue
Yeah... that is interesting... why is ownership / identification so important in that Wii app of yours?
Re: ISFS_CreateFile owner/groupid issue
cause i dont want to know/find out what system menu will think when files are created with such owner/group id
@tueidj : dude, again ; IT USED TO WRITE WITH THE SAME CODE AS 0 OWNERID/GROUPID. both if i used ahbprot (no_ios_reload) or if i reloaded to an ios that had nand permissions. are you saying that it just happen to have 0 as random generated owner id for over a year now?
and even reverting code that is known to have the 0 id will result in that id?
EDIT: i did a test by reloading to IOS36, identifying as system menu using a (crap) ES_Identify & SetUID and guess what
still the same id's. those 2 functions are the only identification functions i know off on the wii and if those return 0 and createfile still produces the id's then i'd say it isn't a identification issue :/
@tueidj : dude, again ; IT USED TO WRITE WITH THE SAME CODE AS 0 OWNERID/GROUPID. both if i used ahbprot (no_ios_reload) or if i reloaded to an ios that had nand permissions. are you saying that it just happen to have 0 as random generated owner id for over a year now?
and even reverting code that is known to have the 0 id will result in that id?
EDIT: i did a test by reloading to IOS36, identifying as system menu using a (crap) ES_Identify & SetUID and guess what
still the same id's. those 2 functions are the only identification functions i know off on the wii and if those return 0 and createfile still produces the id's then i'd say it isn't a identification issue :/
Re: ISFS_CreateFile owner/groupid issue
I said uninitialized(random). Finding an uninitialized value set to 0 is not very rare.
Something tells me your identify/setuid tests didn't work (which isn't surprising, ES_Identify has been fixed for ages and setuid doesn't work unless you're already identified as the system menu). Why not find out which title id matches this owner id that you keep seeing get used? Convert it to hex and look it up in your uid.sys... so for example owner id 4918 would be 0x1066 and I'll bet that matches HBC's entry, perhaps because you're testing your program using wiiload which doesn't reload IOS and you inherit HBC's permissions?
(group 18498 converts to 'HB' which HBC "coincidentally" uses for its group ID. SideNote: This is how people who want to launch any HBC title (HAXX, JODI, asdfiu) should be finding it, but no-one seems to care about future-proofing their programs.)
BTW "dude" if you ask for help, at least attempt to try and understand what people tell you. It seems every time you ask a question and get an answer you don't like, you start saying it's bullshit. I think this is the last time I'll try and help you out.
Something tells me your identify/setuid tests didn't work (which isn't surprising, ES_Identify has been fixed for ages and setuid doesn't work unless you're already identified as the system menu). Why not find out which title id matches this owner id that you keep seeing get used? Convert it to hex and look it up in your uid.sys... so for example owner id 4918 would be 0x1066 and I'll bet that matches HBC's entry, perhaps because you're testing your program using wiiload which doesn't reload IOS and you inherit HBC's permissions?
(group 18498 converts to 'HB' which HBC "coincidentally" uses for its group ID. SideNote: This is how people who want to launch any HBC title (HAXX, JODI, asdfiu) should be finding it, but no-one seems to care about future-proofing their programs.)
BTW "dude" if you ask for help, at least attempt to try and understand what people tell you. It seems every time you ask a question and get an answer you don't like, you start saying it's bullshit. I think this is the last time I'll try and help you out.
Re: ISFS_CreateFile owner/groupid issue
/me facepalms
seems like this isn't getting anywhere.
the code , eventho ran using ahbprot , --used to create the files as 0-- .
i know its more logical to use the hbc id's as its run from hbc etc etc but suddenly it isn't anymore :-/
seems like this isn't getting anywhere.
the code , eventho ran using ahbprot , --used to create the files as 0-- .
i know its more logical to use the hbc id's as its run from hbc etc etc but suddenly it isn't anymore :-/
Who is online
Users browsing this forum: Bing [Bot] and 2 guests