You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Lin Chen (JIRA)" <ji...@apache.org> on 2015/04/27 10:07:39 UTC
[jira] [Commented] (DIRKRB-238) Enhance kadmin to support remove
entry(s) from a keytab
[ https://issues.apache.org/jira/browse/DIRKRB-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14513686#comment-14513686 ]
Lin Chen commented on DIRKRB-238:
---------------------------------
Hi Yaning, thanks for your contribution! Some questions:
1. In the codes below:
{code}
if (commands.length == 1) {
System.err.println("Please input principal");
}
{code}
Is {{return}} lost here?
2. Would you please help to refine the way of parsing options by using {{KadminOption}}? Just Like DIRKRB-225. And {{KadminOption}} was added in DIRKRB-240.
3. In the codes below:
{code}
+private Keytab loadKeytab(File keytabFile) {
+ try {
+ if (!keytabFile.exists()) {
+ System.err.println("keytab file doesn't exists!");
+ return null;
+ }
+ return Keytab.loadKeytab(keytabFile);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return new Keytab();
+ }
+ }
{code}
If {{keytabFile}} doesn't exists, the codes will return {{null}}. While if a exception is thrown, the codes will return {{new Keytab()}}. Would it better to return the same thing here?
4. In the codes below:
{code}
+ for (KeytabEntry keytabEntry : entryList) {
+ System.out.println("Entry for principal " + principalName +
+ " with kvno " + keytabEntry.getKvno() + " removed from to keytab +\n" +
+ keytabFile.getAbsolutePath() + "\n");
+ }
+ keytab.removeKeytabEntries(new PrincipalName(principalName));
{code}
Would it better to remove keytab entries before printing reuslt?
> Enhance kadmin to support remove entry(s) from a keytab
> -------------------------------------------------------
>
> Key: DIRKRB-238
> URL: https://issues.apache.org/jira/browse/DIRKRB-238
> Project: Directory Kerberos
> Issue Type: New Feature
> Reporter: Jiajia Li
> Assignee: Xu Yaning
> Attachments: DIRKRB-238-v1.patch
>
>
> Enhance kadmin to support remove entry(s) from a keytab.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)