FelipeMdeO commented on code in PR #3532:
URL: https://github.com/apache/nuttx-apps/pull/3532#discussion_r3469079638
##########
netutils/dropbear/port/nuttx_compat.c:
##########
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * apps/netutils/dropbear/port/nuttx_compat.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <errno.h>
+#include <grp.h>
+#include <unistd.h>
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static char g_dropbear_shell[] = "/bin/sh";
+static int g_shell_returned;
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+void dropbear_setusershell(void)
+{
+ g_shell_returned = 0;
+}
+
+FAR char *dropbear_getusershell(void)
+{
+ if (g_shell_returned == 0)
+ {
+ g_shell_returned = 1;
+ return g_dropbear_shell;
+ }
+
+ return NULL;
+}
+
+void dropbear_endusershell(void)
+{
+ g_shell_returned = 0;
+}
+
+int dropbear_getgroups(int size, gid_t list[])
Review Comment:
Hello. Thinking better, I solve this issue using other approach and as
result I can remove this stub.
I will use CONFIG_SCHED_USER_IDENTITY to know if we are running in single or
multi user mode, this is all that I need.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]