dwalluck commented on a change in pull request #49:
URL: https://github.com/apache/directory-kerby/pull/49#discussion_r467636831



##########
File path: 
kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/kadmin/AdminServerHandler.java
##########
@@ -199,6 +199,42 @@ private ByteBuffer handleGetprincsReq(LocalKadmin 
localKadmin, XdrFieldInfo[] fi
             return responseError;
         }
     }
+    
+    private ByteBuffer handleExportKeytabReq(LocalKadmin localKadmin, 
XdrFieldInfo[] fieldInfos) throws IOException {
+        String principals = ((String) fieldInfos[2].getValue());
+        
+        if (principals != null) {
+            List<String> princList = stringToList(principals);
+            if (princList.size() != 0) {
+                LOG.info("Exporting keytab file for " + principals + "...");
+                File path = new File("/tmp/" + System.currentTimeMillis());

Review comment:
       I just happened to notice this. It is not the correct temporary 
directory on Windows and it is also not secure. Consider using 
`File.createTempFile()` instead.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to