⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_auth_data_fn.h

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 H
字号:
static voidget_auth_data_fn(const char * pServer,                 const char * pShare,                 char * pWorkgroup,                 int maxLenWorkgroup,                 char * pUsername,                 int maxLenUsername,                 char * pPassword,                 int maxLenPassword)    {    char temp[128];        fprintf(stdout, "Workgroup: [%s] ", pWorkgroup);    fgets(temp, sizeof(temp), stdin);        if (temp[strlen(temp) - 1] == '\n') /* A new line? */    {        temp[strlen(temp) - 1] = '\0';    }        if (temp[0] != '\0')    {        strncpy(pWorkgroup, temp, maxLenWorkgroup - 1);    }        fprintf(stdout, "Username: [%s] ", pUsername);    fgets(temp, sizeof(temp), stdin);        if (temp[strlen(temp) - 1] == '\n') /* A new line? */    {        temp[strlen(temp) - 1] = '\0';    }        if (temp[0] != '\0')    {        strncpy(pUsername, temp, maxLenUsername - 1);    }        fprintf(stdout, "Password: ");    fgets(temp, sizeof(temp), stdin);        if (temp[strlen(temp) - 1] == '\n') /* A new line? */    {        temp[strlen(temp) - 1] = '\0';    }        if (temp[0] != '\0')    {        strncpy(pPassword, temp, maxLenPassword - 1);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -