[rabbitmq-discuss] Creating an auth plugin (Kerberos)

Simon Lundström simlu at su.se
Thu Nov 22 16:14:35 GMT 2012


I'm starting to get somewhere now, still hitting walls = )

Is there a reason why the module is named, e.g.,
rabbit_auth_backend_kerberos and that the folder/plugin is named, e.g.,
rabbitmq_auth_backend_kerberos?

I just did this:
<https://github.com/simmel/rabbitmq-auth-backend-kerberos/commit/a3bab882988771b6d07f1a436844c47426d0c7b6/src/rabbitmq_auth_backend_kerberos.erl#L2L1>
and it seems to work. I mainly do it because I want to be able to use
?MODULE in code:priv_dir.
Is there another way do do it and to use alot of code?
I saw that you guys did:

{file, Path} = code:is_loaded(?MODULE),
Dir = filename:join(filename:dirname(Path), "../priv"),

in toke, but seems like a hack = )

Then again, it doesn't feel good to be the only black sheep and be the
only one who has their module prefixed with rabbitmq...


Another issue (and the reason why
<https://github.com/simmel/rabbitmq-auth-backend-kerberos/commit/a3bab882988771b6d07f1a436844c47426d0c7b6/src/rabbitmq_auth_backend_kerberos.erl#L2R41>
exists), is that it seems that when rabbitmq-server unzips the plugins
(here:
<https://github.com/rabbitmq/rabbitmq-server/blob/rabbitmq_v2_8_x/src/rabbit_prelaunch.erl#L176>)
the erlang zip lib doesn't preserve the file modes? If I run unzip on my
.ez-file I do get the correct permissions. Is this a known issue? Can I
expect this to be fixed? How can I work around it other than I have done
now?

Thanks!
- Simon


More information about the rabbitmq-discuss mailing list