mountd: Dynamically allocate exportent that represents junctions
authorChuck Lever <chuck.lever@oracle.com>
Fri, 19 Oct 2012 14:41:54 +0000 (10:41 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 22 Oct 2012 13:44:02 +0000 (09:44 -0400)
commit9fae1474f1f79c2c7f222a40dff6d3d4681a9115
treeebbca3e53642daf3445bba152d41478a2bf80b41
parent62ee38804c60c5875ce3c78674419ee137deb8db
mountd: Dynamically allocate exportent that represents junctions

We're now duplicating a real exportent with arbitrary export options
to create a junction exportent.  After a dupexportent() call,
several of the structure's fields can point to dynamically allocated
memory.  We have to be careful about not orphaning that memory.

What's more, returning a pointer to a static structure is as 90's as
a bad mullet.  It's more straightforward to allocate the exportent
dynamically and release it when we are through with it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mountd/cache.c