Closed jobol closed 10 years ago
My apologies for submitting a code that will probably hurt you @jsakkine, but there is a plan:
@JanCybulski has a patch for this program and a shell wrapper, that we use to produce quite valuable input tests. We'd like to push them, but the original program has been created by @jobol, so it's right to get initial version as a commit from him. Honestly I believe that it's a better base for generating random rule files than the script pulled in #66. That script needs 2h45m to complete on my computer...
@jobol I don't really care about my test script. I did it in 10 minutes or something because there was nothing. I was expecting some improvement..
My comments are mostly about coding style:
r
, cb
, check
(check what?) and c2s
even if they are inside a test program. @rafal-krypa I'm thinking that to achieve what is planned, you could work on my branch addgen: https://github.com/jobol/smack/tree/addgen fork, update the gen.c file, make a pull request. Then we will use this issue to merge a more stylished version. Do you agree?
@jobol: I will work on that.
Hi all, Hi Jarko, the current state of this pull request is nearly good now. Could you check?
Looks good to me! I'll try to find time slot to merge this and the new rule/label handling code today. Thanks for the good effort!
OK, I'm fine with having a separate make file for this for now. I think it would make sense to add it to autotools builds perhaps with command-line option but I will merge this now.
The program that generate this gen.c produces a set of rules to be loaded to load/load2 file system interace of smacke. Or to be used as input file for smackload.
The count of differents labels (option l=N) and of different access rights (option r=N) can be specified. The count of rules produced to the ouput can also be specified (option o=N). By default, l=5, r=100 and o=500.
The generated labels are made of 4 to 7 random letters. The standard C function 'rand' is used without seeding it; what means that same options produces same results.
Signed-off-by: José Bollo jose.bollo@open.eurogiciel.org