On Fri, 2004-05-28 at 17:27, Tim Oberf=F6ll wrote:
> > If you can program C and you understand ACL's as you seem to, adding =
> > support isn't too complicated, and I see the Michael, and Max have
> > already filled in a good number of things that you need to know.
> Ok, I'll give my best, although I'm no experinced programmer, yet. The =
> from Michael and Max helped me to find out, where to begin.
> > The one point that I would like to clarify if it wasn't already is th=
> > Bacula streams are simply different data streams written out out back=
> > time that "identify" the data. This allows any arbitrary data to be
> > written out with a file with a stream ID and then read back in at
> > restore time (e.g. file data, file attributes, resource fork data, AC=
> > data, ...).
> The ACL depended code is implemented although it's a dirty hack, but I'=
> on it. I've added a new stream (15, but only for testing issues). The c=
> for the stream header also seems to be ok, because if some files were b=
> up and restored, the filed mentioned a data stream 15. But till now the=
> stream itself is empty (it only contains the filenumber etc.), because =
> not able to find out how to serialize and send the stream (and of cours=
> to restore the ACLs).
> > The one aspect of writing streams is that they should be byte order
> > independent if there is any chance they will be used on multiple
> > architecture machines -- which is the case with any Linux/Unix data.
> > Thus writing structures out in binary is not good form, and it must b=
> > written out one item at a time using Bacula "serialization" routines,
> > which deal with machine byte order.
> I've tried the function ser_string(*char), but maybe that's not the rig=
> Excuse me, if i ask silly questions.
As a first cut I would recommend that you not worry about serialization.
Simply write the data you want into the stream record -- even if it is
structures. ASCII data doesn't need to be serialized only int, long,
double, ... since they are byte order dependent. Once you are able to
write data out and see it coming back, I can help you serialize it --
the routines are not too hard to use. If you want you can look at
src/stored/block.c, which does serialization/deserialization, but as I
noted above, I recommend you do it only after getting the basic
Adding a stream 15 is fine for the moment -- to get things going. We
will need to discuss what kinds of ACLs you are writing out, ... Please
think hard about what you are writing out and try to make it so that it
is flexible but simple and so that it can be read back 50 years from now
on any machine (not so easy, but worth thinking about).
> > Since this topic is becoming more and more important, I'll try to wri=
> > a section of the manual on it in the next week or two that explains t=
> > implementation details.
> That would be nice or maybe an additional example.=20
> Thanks for your answer and I hope you will find the time to help me wit=
Let me know if you have any questions or problems.
Thanks for tackling this!
Best regards, Kern