Groups > Novell > NDS Client > Re: Giving the permission to grant rights to the object




Giving the permission to grant rights to the object

Giving the permission to grant rights to the object
Fri, 13 Jan 2006 12:42:09 GMT
Hello,
I am new to Novell so I am apologise for being disabled in asking
question in a more concrete manner.
I need to give user the right to provide other users with the
permissions on the selected object.
Sample:
users1, grants user2 right to set read permissions on folder "etc"
for
user3.

I have to implement API function that will do that. I'll be using C NDS
API for that.
Can you give me a hint how can I do that?

Thanks a lot.
Andrey. 
Post Reply
Re: Giving the permission to grant rights to the object
Fri, 13 Jan 2006 20:23:45 GMT
Can you please confirm which system you are trying to grant
rights in, eDir/NDS or the file system. Its not clear as you use
the term folder.

The reason for the question is that the directory rights managment
is different from the file system rights managment and they use
different APIs.

Roger Thomas, DevNet SysOp 22

"kazakov" <andrey.kazakov@gmail.com> wrote in message
news:BeNxf.37$3c.20@prv-forum2.provo.novell.com...
> Hello,
> I am new to Novell so I am apologise for being disabled in asking
> question in a more concrete manner.
> I need to give user the right to provide other users with the
> permissions on the selected object.
> Sample:
> users1, grants user2 right to set read permissions on folder
"etc" for
> user3.
>
> I have to implement API function that will do that. I'll be using C NDS
> API for that.
> Can you give me a hint how can I do that?
>
> Thanks a lot.
> Andrey.
>

Post Reply
Re: Re: Giving the permission to grant rights to the object
Mon, 16 Jan 2006 12:50:23 GMT
Hello,
System is NDS.
Folder or user can be treated as an object.
Well sample should give a kind of view on situation.

Thanks.

Roger Thomas, DevNet SysOp 22 wrote:

> Can you please confirm which system you are trying to grant
> rights in, eDir/NDS or the file system. Its not clear as you use
> the term folder.

> The reason for the question is that the directory rights managment
> is different from the file system rights managment and they use
> different APIs.

> Roger Thomas, DevNet SysOp 22

> "kazakov" <andrey.kazakov@gmail.com> wrote in message
news:BeNxf.37$3c.20@prv-forum2.provo.novell.com...
> > Hello,
> > I am new to Novell so I am apologise for being disabled in asking
> > question in a more concrete manner.
> > I need to give user the right to provide other users with the
> > permissions on the selected object.
> > Sample:
> > users1, grants user2 right to set read permissions on folder
"etc" for
> > user3.
> >
> > I have to implement API function that will do that. I'll be using C
NDS
> > API for that.
> > Can you give me a hint how can I do that?
> >
> > Thanks a lot.
> > Andrey.
> >

Post Reply
Re: Re: Giving the permission to grant rights to the object
Mon, 16 Jan 2006 21:54:19 GMT
You may find

          
http://developer.novell.com/wiki/index.php/TID101807_%28XDSAQ%29_-_Modifying_the
_ACLs_of_User_Objects

meets your needs.

Roger Thomas, DevNet SysOp 22

"kazakov" <andrey.kazakov@gmail.com> wrote in message
news:jEMyf.8$Pa2.5@prv-forum2.provo.novell.com...
> Hello,
> System is NDS.
> Folder or user can be treated as an object.
> Well sample should give a kind of view on situation.
>
> Thanks.
>
> Roger Thomas, DevNet SysOp 22 wrote:
>
> > Can you please confirm which system you are trying to grant
> > rights in, eDir/NDS or the file system. Its not clear as you use
> > the term folder.
>
> > The reason for the question is that the directory rights managment
> > is different from the file system rights managment and they use
> > different APIs.
>
> > Roger Thomas, DevNet SysOp 22
>
> > "kazakov" <andrey.kazakov@gmail.com> wrote in message
> news:BeNxf.37$3c.20@prv-forum2.provo.novell.com...
> > > Hello,
> > > I am new to Novell so I am apologise for being disabled in
asking
> > > question in a more concrete manner.
> > > I need to give user the right to provide other users with the
> > > permissions on the selected object.
> > > Sample:
> > > users1, grants user2 right to set read permissions on folder
"etc" for
> > > user3.
> > >
> > > I have to implement API function that will do that. I'll be using
C NDS
> > > API for that.
> > > Can you give me a hint how can I do that?
> > >
> > > Thanks a lot.
> > > Andrey.
> > >
>
>

Post Reply
Re: Giving the permission to grant rights to the object
Tue, 17 Jan 2006 09:48:09 GMT
Hello,
Thanks for the example, I've already used that kind of approach.
I have a problem.

Code:
int GrantACLRight(const char* user, const char* pszContext, const char*
pszTree,const char* target)
{
	Object_ACL_T ACL;
	pBuf_T dsBuf = NULL;
	
	rcode = ::NWDSAllocBuf((size_t)DEFAULT_MESSAGE_LEN, &dsBuf);
    if (rcode)
    {
        TRACE1("GrantACLRight: NWDSAllocBuf failed %d", rcode);
        return rcode;
    }

	rcode = NWDSInitBuf(g_ContextHandle, DSV_MODIFY_ENTRY, dsBuf);

	if (rcode)
    {
        TRACE1("GrantACLRight: NWDSAddObject failed %d", rcode);
        return rcode;
    }

	ACL.protectedAttrName = "Full Name";
	ACL.subjectName = (char*)user;
	ACL.privileges = DS_ATTR_SUPERVISOR;
	rcode = NWDSPutChange (g_ContextHandle,dsBuf,DS_ADD_VALUE,"ACL");
	rcode = NWDSPutAttrVal(g_ContextHandle,dsBuf,SYN_OBJECT_ACL,&ACL);
		
	rcode = NWDSModifyObject(g_ContextHandle,(char*)target, NULL, 0, dsBuf);
		
	return rcode;
}

NWDSModifyObject always returns -634 for the target "SYSETC", but it
works
ok for user object.
And can you explain me setting the protectedAttrName to "Full Name".
I guess protectedAttrName is the case.

Thanks a lot.
Andrey.

Roger Thomas, DevNet SysOp 22 wrote:

> You may find

>           
http://developer.novell.com/wiki/index.php/TID101807_%28XDSAQ%29_-_Modifying_the
_ACLs_of_User_Objects

> meets your needs.

> Roger Thomas, DevNet SysOp 22

> "kazakov" <andrey.kazakov@gmail.com> wrote in message
news:jEMyf.8$Pa2.5@prv-forum2.provo.novell.com...
> > Hello,
> > System is NDS.
> > Folder or user can be treated as an object.
> > Well sample should give a kind of view on situation.
> >
> > Thanks.
> >
> > Roger Thomas, DevNet SysOp 22 wrote:
> >
> > > Can you please confirm which system you are trying to grant
> > > rights in, eDir/NDS or the file system. Its not clear as you use
> > > the term folder.
> >
> > > The reason for the question is that the directory rights
managment
> > > is different from the file system rights managment and they use
> > > different APIs.
> >
> > > Roger Thomas, DevNet SysOp 22
> >
> > > "kazakov" <andrey.kazakov@gmail.com> wrote in
message
> > news:BeNxf.37$3c.20@prv-forum2.provo.novell.com...
> > > > Hello,
> > > > I am new to Novell so I am apologise for being disabled in
asking
> > > > question in a more concrete manner.
> > > > I need to give user the right to provide other users with
the
> > > > permissions on the selected object.
> > > > Sample:
> > > > users1, grants user2 right to set read permissions on folder
"etc" for
> > > > user3.
> > > >
> > > > I have to implement API function that will do that. I'll be
using C NDS
> > > > API for that.
> > > > Can you give me a hint how can I do that?
> > > >
> > > > Thanks a lot.
> > > > Andrey.
> > > >
> >
> >

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact