[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #13339 [Tor]: Merge GSoC project - Consensus Diffs
#13339: Merge GSoC project - Consensus Diffs
-----------------------------+-------------------------------------------
Reporter: mvdan | Owner:
Type: enhancement | Status: needs_revision
Priority: major | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version:
Resolution: | Keywords: gsoc merge tor-client prop140
Actual Points: | Parent ID:
Points: |
-----------------------------+-------------------------------------------
Comment (by nickm):
Replying to [comment:12 mvdan]:
> Some more comments, for nickm this time :)
>
> * So in tor_rmdir, you say that we should check against S_IFLINK (that
it is false) when checking for S_IFDIR. I thought that stat ran on the
symlink, not on its target? In other words, we couldn't have both be true
at the same time. If it's a symlink and it's not a folder, we delete it.
In the opposite case, we enter the dir since we're not following a
symlink.
Maybe we should lstat it then? I worry that this could be used along with
a symlink to rm_rf something we didn't intend to. Probably nothing to
worry about given this use case, but a bit alarming.
> * smartlist_slice_t in consdiff.h instead of consdiff.c - this is mainly
because back when I added it I wasn't sure whether I'd need it in other
places. But also because I was thinking that the structure and its
functions might be useful to other parts of Tor. After all, slicing a list
is a very generic tool, and it sounds simple and cheap to me. Of course it
would need polishing to be made public, so I think I'll just move it to
consdiff.c for now.
Okay, unless you think that exposing it for testing could help test
individual functions.
> Regarding what both you and dgoulet have said about the add_bytes
function - GSoC was nearing its end and I was getting a bit confused by
all the "serve bytes/files" code in dirserv.c, so what I did was take a
function that kind of did what I wanted and tweaked it for my purposes.
This has two obvious problems, the first that it duplicates code, but the
second that I'm not exactly sure whether what I did is correct or not.
>
> In other words, I would appreciate it if you could help me here. I
remember nickm mentioning that this code has barely been touched in years,
and that it's a tad confusing since it's gotten so complex. So I'd rather
not do it alone :)
Okay; I'll try to have a look.
> Oh, and I'll definitely be attending the winter dev meeting in Valencia
in March. Will any of you guys be there?
I sure will!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13339#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs