Dell 6.2 Server User Manual


 
sprintf(p, "<ipaddr>%s</ipaddr>", ipaddr);
p += strlen(p);
}
if (macaddr) {
sprintf(p, "<macaddr>%s</macaddr>", macaddr);
p += strlen(p);
}
if (name) {
sprintf(p, "<name>%s</name>", name);
p += strlen(p);
}
if (password) {
sprintf(p, "<password>%s</password>", password);
p += strlen(p);
}
if (role) {
sprintf(p, "<role>%s</role>", role);
p += strlen(p);
}
if (tout) {
sprintf(p, "<session timeout>%s</session timeout>", tout);
p += strlen(p);
}
if (secret) {
if (auth == NULL) {
key = secret;
auth = "cleartext";
#ifndef OPENSSL_NO_SHA1
} else if (!strcasecmp(auth, "sha-1")) {
key = enchashbuf;
SHA1(secret, strlen(secret), hashbuf);
encode_message_digest(hashbuf, 20, enchashbuf);
#endif
} else if (!strcasecmp(auth, "md5")) {
key = enchashbuf;
md5_calc(hashbuf, secret, strlen(secret));
encode_message_digest(hashbuf, 16, enchashbuf);
}
debug("Message authentication is %s (%s)\n", auth, key);
sprintf(p, "<authentication>%s</authentication><key>%s</key>",
auth, key);
p += strlen(p);
}
debug("\n");
sprintf(p, "<version>%s</version>", version);
sprintf(p, "</authresponse>");
cgi_escape_url(encbuf, sizeof(encbuf), cmdbuf, strlen(cmdbuf), 0);
postlen = sprintf(post,
"POST /auth/command.xml HTTP/1.0\r\n"
"User-Agent: ecp\r\n"
"Host: %s\r\n"
"Pragma: no-cache\r\n"
"Content-Length: %d\r\n"
/* "Content-Type: application/x-www-form-urlencoded\r\n" */
"Content-Type: application/xml\r\n"
"\r\n"
"%s",
argv[1], strlen(encbuf), encbuf);
inet_aton(argv[1], &sa.sin_addr);
DellPowerConnectW-SeriesArubaOS6.2 | User Guide ExternalUser Management | 786