Sipe / Kerberous perlscript question.

Craig Cameron Craig.Cameron at iongeo.com
Fri Sep 21 06:46:12 EDT 2012


I'm trying to amend Jason Alavaliant's perlscript for automating account additions to work with sipe.

I can create the account  with the correct email/username without any issues but I'm failing in all attempts to set the Kerberos flag to true for the account to work properly:

Code fragment:

sub plugin_load {
            my $plugin = shift;
            my $protocol = "prpl-sipe";
            my $account_name = "username at emaildomain.com"
            $account = Purple::Account->new($account_name, $protocol);
            Purple::Accounts::add($account);
            Purple::Account::set_password($account,"fake passwd");
           Purple::Account::set_remember_password($account,1);
           Purple::Account::Option::bool_new("Use Kerberos","krb5",1);

           #needed to force the resource field to be updated to the current hostname on future loads.
            $account->set_username($account_name);
            $account->set_status("available",1);
            $account->set_enabled(Purple::Core::get_ui(),1);
            $account->connect();
        }

Unfortunately I'm not normally a programmer so I'm unsure whether I've made a mistake in understanding how to pass the parameters for that section of the Advanced Options or whether I'm reading the C API wrongly :
option  = purple_account_option_bool)_new (_ ("Use Kerberos"), "krb5", TRUE)
just gives an error "Not enough arguments."

Any help with this would be greatly appreciated. I've been struggling with variations on that one line for the last couple of days and all my web searches have so far failed to bring up anything kereberos-sipe-perlscript related.

Regards

C

________________________________


This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately notify the sender and delete the original.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20120921/58e02913/attachment-0002.html>


More information about the Devel mailing list