files for more detailed copyright statements.
-Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-2011, 2012 The FreeRADIUS Server Project
+Copyright (C) 1999-2015 The FreeRADIUS Server Project
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Alan DeKok
<aland@deployingradius.com>
saremote.sun_family = AF_UNIX;
memcpy(saremote.sun_path, path, len + 1); /* SUN_LEN does strlen */
-
+
socklen = SUN_LEN(&saremote);
if (connect(sockfd, (struct sockaddr *)&saremote, socklen) < 0) {
#ifdef O_NONBLOCK
{
int flags;
-
+
if ((flags = fcntl(sockfd, F_GETFL, NULL)) < 0) {
fprintf(stderr, "%s: Failure getting socket flags: %s",
progname, strerror(errno));
close(sockfd);
return -1;
}
-
+
flags |= O_NONBLOCK;
if( fcntl(sockfd, F_SETFL, flags) < 0) {
fprintf(stderr, "%s: Failure setting socket flags: %s",
*/
p = strstr(buffer, "radmin> ");
if (p &&
- ((p == buffer) ||
+ ((p == buffer) ||
(p[-1] == '\n') ||
(p[-1] == '\r'))) {
*p = '\0';
const char *input_file = NULL;
FILE *inputfp = stdin;
const char *output_file = NULL;
-
+
char *commands[MAX_COMMANDS];
int num_commands = -1;
while ((subcs = cf_subsection_find_next(cs, subcs, "listen")) != NULL) {
const char *value;
CONF_PAIR *cp = cf_pair_find(subcs, "type");
-
+
if (!cp) continue;
value = cf_pair_value(cp);
fprintf(stderr, "%s: Socket %s is not FreeRADIUS administration socket\n", progname, file);
exit(1);
}
-
+
memcpy(&magic, buffer + 4, 4);
magic = ntohl(magic);
if (magic != 1) {
fprintf(stderr, "%s: Socket version mismatch: Need 1, got %d\n",
progname, magic);
exit(1);
- }
+ }
/*
* Run one command.
size = run_command(sockfd, commands[i],
buffer, sizeof(buffer));
if (size < 0) exit(1);
-
+
if (buffer[0]) {
fputs(buffer, outputfp);
fprintf(outputfp, "\n");
if (!done_license && !quiet) {
printf("%s - FreeRADIUS Server administration tool.\n", radmin_version);
- printf("Copyright (C) 2008-2012 The FreeRADIUS server project and contributors.\n");
+ printf("Copyright (C) 2008-2015 The FreeRADIUS server project and contributors.\n");
printf("There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n");
printf("PARTICULAR PURPOSE.\n");
printf("You may redistribute copies of FreeRADIUS under the terms of the\n");
#else
if (!quiet) {
line = readline("radmin> ");
-
+
if (!line) break;
-
+
if (!*line) {
free(line);
continue;
}
-
+
#ifdef USE_READLINE_HISTORY
add_history(line);
#endif
progname);
exit(1);
}
-
+
*p = '\0';
/*
DEBUG3("Server core libs:");
DEBUG3(" ssl: %s", ssl_version());
- radlog(L_INFO, "Copyright (C) 1999-2013 The FreeRADIUS server project and contributors.");
+ radlog(L_INFO, "Copyright (C) 1999-2015 The FreeRADIUS server project and contributors.");
radlog(L_INFO, "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A");
radlog(L_INFO, "PARTICULAR PURPOSE.");
radlog(L_INFO, "You may redistribute copies of FreeRADIUS under the terms of the");