Пример #1
0
/** Add new help command. This function is
 * the basis for the help_command directive in mush.cnf. It creates
 * a new help entry for the hash table, builds a help index,
 * and adds the new command to the command table.
 * \param command_name name of help command to add.
 * \param filename name of the help file to use for this command.
 * \param admin if 1, this command reads admin topics, rather than standard.
 */
void
add_help_file(const char *command_name, const char *filename, int admin)
{
  help_file *h;

  if (help_init == 0)
    init_help_files();

  if (!command_name || !filename || !*command_name || !*filename)
    return;

  /* If there's already an entry for it, complain */
  h = hashfind(strupper(command_name), &help_files);
  if (h) {
    do_rawlog(LT_ERR, "Duplicate help_command %s ignored.", command_name);
    return;
  }

  h = mush_malloc(sizeof *h, "help_file.entry");
  h->command = mush_strdup(strupper(command_name), "help_file.command");
  h->file = mush_strdup(filename, "help_file.filename");
  h->entries = 0;
  h->indx = NULL;
  h->admin = admin;
  help_build_index(h, h->admin);
  if (!h->indx) {
    mush_free(h->command, "help_file.command");
    mush_free(h->file, "help_file.filename");
    mush_free(h, "help_file.entry");
    return;
  }
  (void) command_add(h->command, CMD_T_ANY | CMD_T_NOPARSE, NULL, 0, NULL,
                     cmd_helpcmd);
  hashadd(h->command, h, &help_files);
}
Пример #2
0
int strnicomp(const char *Str1,const char *Str2,int N)
{
  char S1[512],S2[512];
  strncpy(S1,Str1,sizeof(S1));
  strncpy(S2,Str2,sizeof(S2));
  return(strncmp(strupper(S1),strupper(S2),N));
}
Пример #3
0
static void
start_log(struct log_stream *log)
{
  static int ht_initialized = 0;
  FILE *f;

  if (!log->filename || !*log->filename) {
    log->fp = stderr;
  } else {
    if (!ht_initialized) {
      hashinit(&htab_logfiles, 8);
      ht_initialized = 1;
    }
    if ((f = hashfind(strupper(log->filename), &htab_logfiles))) {
      /* We've already opened this file for another log, so just use that pointer */
      log->fp = f;
    } else {
      log->fp = fopen(log->filename, "a+");
      if (log->fp == NULL) {
        fprintf(stderr, "WARNING: cannot open log %s: %s\n", log->filename,
                strerror(errno));
        log->fp = stderr;
      } else {
        hashadd(strupper(log->filename), log->fp, &htab_logfiles);
        fputs("START OF LOG.\n", log->fp);
        fflush(log->fp);
      }
    }
  }
  if (!log->buffer)
    log->buffer = allocate_bufferq(LOG_BUFFER_SIZE);
}
Пример #4
0
static void
end_log(struct log_stream *log, bool keep_buffer)
{
  FILE *fp;

  if (!log->filename || !*log->filename || !log->fp)
    return;
  if ((fp = hashfind(strupper(log->filename), &htab_logfiles))) {
    int n;

    lock_file(fp);
    fputs("END OF LOG.\n", fp);
    fflush(fp);
    for (n = 0; n < NLOGS; n++) {
      if (logs[n].fp == fp)
        logs[n].fp = NULL;
    }
    fclose(fp);                 /* Implicit lock removal */
    if (!keep_buffer) {
      free_bufferq(log->buffer);
      log->buffer = NULL;
    }
    hashdelete(strupper(log->filename), &htab_logfiles);
  }
}
Пример #5
0
/**
 * Add an external function to the list
 */
static int slib_add_external_func(const char *func_name, int lib_id) {
  char buf[256];

  sprintf(buf, "%s.%s", slib_table[lib_id].name, func_name);
  strupper(buf);

  // TODO: scan for conflicts
  if (extfunctable == NULL) {
    extfuncsize = 16;
    extfunctable =
      (ext_func_node_t *) malloc(sizeof(ext_func_node_t) * extfuncsize);
  }
  else if (extfuncsize <= (extfunccount + 1)) {
    extfuncsize += 16;
    extfunctable =
      (ext_func_node_t *) realloc(extfunctable,
                                  sizeof(ext_func_node_t) * extfuncsize);
  }

  extfunctable[extfunccount].lib_id = lib_id;
  extfunctable[extfunccount].symbol_index = 0;
  strcpy(extfunctable[extfunccount].name, buf);
  strupper(extfunctable[extfunccount].name);

  if (opt_verbose) {
    log_printf("LID: %d, Idx: %d, FUNC '%s'\n", lib_id, extfunccount,
               extfunctable[extfunccount].name);
  }
  extfunccount++;
  return extfunccount - 1;
}
Пример #6
0
int stricomp(const char *Str1,const char *Str2)
{
  char S1[NM*2],S2[NM*2];
  strncpy(S1,Str1,sizeof(S1));
  strncpy(S2,Str2,sizeof(S2));
  return(strcmp(strupper(S1),strupper(S2)));
}
Пример #7
0
int strnicomp(const char *Str1,const char *Str2,size_t N)
{
  char S1[NM*2],S2[NM*2];
  strncpyz(S1,Str1,ASIZE(S1));
  strncpyz(S2,Str2,ASIZE(S2));
  return(strncmp(strupper(S1),strupper(S2),N));
}
Пример #8
0
// ---------------------------------------------------------------------------
// 
// -----------
bool bCharDBValue::operator != (bStdDBValue& gdbv){
/*char	value[1024];
	gdbv.get(value);
	return(strcmp((char*)val,value));*/
char	avalue[1024],bvalue[1024];
	get(avalue);
	gdbv.get(bvalue);
	strupper(avalue);
	strupper(bvalue);
	return(strcmp(avalue,bvalue));
}
Пример #9
0
static char
unicsv_compare_fields(char *s, const field_t *f)
{
	char *name = (char *)f->name;
	char *test = s;
	char result;

	if (! (f->options & STR_CASE)) {
		test = strupper(xstrdup(s));
		name = strupper(xstrdup(f->name));
	}

	if (f->options & STR_EQUAL) {
		result = (strcmp(test, name) == 0);
	}
	else if (f->options & STR_ANY) {
		result = (strstr(test, name) != NULL);
	}
	else {
		if (f->options & STR_LEFT) {
			result = (strncmp(test, name, strlen(name)) == 0);
		}
		else if (f->options & STR_RIGHT) {
			result = (unicsv_strrcmp(test, name) == 0);
		}
		else {
			result = 0;	/* fallback to "FALSE" */
		}
	}

	if ((! result) && (strchr(test, ' ') != NULL)) {
		/* replace  ' ' with '_' and try again */
		char *tmp = gstrsub(test, " ", "_");
		result = unicsv_compare_fields(tmp, f);
		xfree(tmp);
	}
	if ((! result) && (strchr(test, '-') != NULL)) {
		/* replace  '-' with '_' and try again */
		char *tmp = gstrsub(test, "-", "_");
		result = unicsv_compare_fields(tmp, f);
		xfree(tmp);
	}

	if (name != f->name) {
		xfree(name);
		xfree(test);
	}

	return result;
}
Пример #10
0
BOOL secrets_fetch_domain_sid(const char *domain, DOM_SID *sid)
{
	DOM_SID *dyn_sid;
	fstring key;
	size_t size;

	slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
	strupper(key);

	dos_to_unix(key);                /* Convert key to unix-codepage */

	dyn_sid = (DOM_SID *)secrets_fetch(key, &size);

	if (dyn_sid == NULL)
		return False;

	if (size != sizeof(DOM_SID))
	{ 
		SAFE_FREE(dyn_sid);
		return False;
	}

	*sid = *dyn_sid;
	SAFE_FREE(dyn_sid);
	return True;
}
Пример #11
0
uint16 _api_DosNetServerGetInfo(PCONN_HND phnd, io_struct * ps,
				uint16 sLevel,
				RCVBUF pbBuffer,
				RCVBUFLEN cbBuffer, uint16 *pcTotalAvail)
{
	SERVER_INFO_1 sv1;

	DEBUG(10,("DosNetServerGetInfo: %d buf %d\n",
				sLevel, cbBuffer));
	StrnCpy(sv1.sv1_name, local_machine, 16);
	strupper(sv1.sv1_name);
	sv1.sv1_version_major = 4;
	sv1.sv1_version_minor = 1;
	sv1.sv1_type = SV_TYPE_NT;

	sv1.sv1_comment_or_master_browser = string_truncate(lp_serverstring(),
					MAX_SERVER_STRING_LENGTH);

	switch (sLevel)
	{
		case 1:
		{
			if (!io_SERVER_INFO_1("sv1", ps, 0, &sv1,
						PARSE_SCALARS))
				return NERR_BufTooSmall;

			if (!io_SERVER_INFO_1("sv1", ps, 0, &sv1,
						PARSE_OFFSETS))
				return NERR_BufTooSmall;
			return ERRsuccess;
		}
	}
	return ERRunknownlevel;
}
Пример #12
0
/****************************************************************************
  Send an election datagram packet.
**************************************************************************/
static void send_election_dgram(struct subnet_record *subrec, const char *workgroup_name,
                                uint32 criterion, int timeup,const char *server_name)
{
  pstring outbuf;
  char *p;

  DEBUG(2,("send_election_dgram: Sending election packet for workgroup %s on subnet %s\n",
	workgroup_name, subrec->subnet_name ));

  memset(outbuf,'\0',sizeof(outbuf));
  p = outbuf;
  SCVAL(p,0,ANN_Election); /* Election opcode. */
  p++;

  SCVAL(p,0,((criterion == 0 && timeup == 0) ? 0 : ELECTION_VERSION));
  SIVAL(p,1,criterion);
  SIVAL(p,5,timeup*1000); /* ms - Despite what the spec says. */
  p += 13;
  pstrcpy(p,server_name);
  strupper(p);
  p = skip_string(p,1);
  
  send_mailslot(False, BROWSE_MAILSLOT, outbuf, PTR_DIFF(p,outbuf),
                global_myname, 0,
                workgroup_name, 0x1e,
                subrec->bcast_ip, subrec->myip, DGRAM_PORT);
}
Пример #13
0
/** Return a list of all available locks
 * \param buff the buffer
 * \param bp a pointer to the current position in the buffer.
 * \param name if not NULL, only show locks with this prefix
 */
void
list_locks(char *buff, char **bp, const char *name)
{
  lock_list **locks, *lk;
  bool first = 1;
  int nlocks = 0, n;

  locks = mush_calloc(htab_locks.entries, sizeof(lock_list), "lock.list");

  for (lk = hash_firstentry(&htab_locks); lk; lk = hash_nextentry(&htab_locks)) {
    /* Skip those that don't match */
    if (name && !string_prefix(lk->type, name))
      continue;
    locks[nlocks++] = lk;
  }

  qsort(locks, nlocks, sizeof lk, lock_compare);

  for (n = 0; n < nlocks; n += 1) {
    if (first) {
      first = 0;
    } else {
      safe_chr(' ', buff, bp);
    }
    safe_str(strupper(locks[n]->type), buff, bp);
  }

  mush_free(locks, "lock.list");
}
Пример #14
0
void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t,
			uint32 num_doms, char *dom_name)
{
	int i = 0;

	DEBUG(5,("make_r_trust_dom\n"));

	for (i = 0; i < MAX_TRUST_DOMS; i++) {
		r_t->uni_trust_dom_name[i].uni_str_len = 0;
		r_t->uni_trust_dom_name[i].uni_max_len = 0;
	}
	if (num_doms > MAX_TRUST_DOMS)
		num_doms = MAX_TRUST_DOMS;

	for (i = 0; i < num_doms; i++) {
		fstring domain_name;
		fstrcpy(domain_name, dom_name);
		strupper(domain_name);
		init_unistr2(&r_t->uni_trust_dom_name[i], domain_name, strlen(domain_name)+1);
		/* the use of UNISTR2 here is non-standard. */
		r_t->uni_trust_dom_name[i].undoc = 0x1;
	}
	
	r_t->status = 0;
}
Пример #15
0
static int copy_one_file(const char *esp_path, const char *name, bool force) {
        _cleanup_free_ char *p = NULL;
        _cleanup_free_ char *q = NULL;
        _cleanup_free_ char *v = NULL;
        int r;

        if (asprintf(&p, BOOTLIBDIR "/%s", name) < 0) {
                fprintf(stderr, "Out of memory.\n");
                return -ENOMEM;
        }

        if (asprintf(&q, "%s/EFI/systemd/%s", esp_path, name) < 0) {
                fprintf(stderr, "Out of memory.\n");
                return -ENOMEM;
        }

        r = copy_file(p, q, force);

        if (startswith(name, "systemd-boot")) {
                int k;

                /* Create the EFI default boot loader name (specified for removable devices) */
                if (asprintf(&v, "%s/EFI/Boot/BOOT%s", esp_path, name + strlen("systemd-boot")) < 0) {
                        fprintf(stderr, "Out of memory.\n");
                        return -ENOMEM;
                }
                strupper(strrchr(v, '/') + 1);

                k = copy_file(p, v, force);
                if (k < 0 && r == 0)
                        return k;
        }

        return r;
}
Пример #16
0
static void send_lm_announcement(struct subnet_record *subrec, int announce_type,
                                 char *from_name, char *to_name, int to_type, struct in_addr to_ip,
                                 time_t announce_interval,
                                 char *server_name, int server_type, char *server_comment)
{
    pstring outbuf;
    char *p=outbuf;

    memset(outbuf,'\0',sizeof(outbuf));

    SSVAL(p,0,announce_type);
    SIVAL(p,2,server_type & ~SV_TYPE_LOCAL_LIST_ONLY);
    SCVAL(p,6,lp_major_announce_version()); /* Major version. */
    SCVAL(p,7,lp_minor_announce_version()); /* Minor version. */
    SSVAL(p,8,announce_interval);            /* In seconds - according to spec. */

    p += 10;
    StrnCpy(p,server_name,15);
    strupper(p);
    p = skip_string(p,1);
    pstrcpy(p,server_comment);
    p = skip_string(p,1);

    send_mailslot(False,LANMAN_MAILSLOT, outbuf, PTR_DIFF(p,outbuf),
                  from_name, 0x0, to_name, to_type, to_ip, subrec->myip,
                  DGRAM_PORT);
}
Пример #17
0
/** Add a player's alias list to the player list htab.
 * \param player dbref of player to add.
 * \param alias list of names ot use as hash table keys for player,
 * semicolon-separated.
 */
void
add_player_alias(dbref player, const char *alias)
{
  char tbuf1[BUFFER_LEN], *s, *sp;
  if (!hft_initialized)
    init_hft();
  if (!alias) {
    add_player(player);
    return;
  }
  mush_strncpy(tbuf1, alias, BUFFER_LEN);
  s = trim_space_sep(tbuf1, ALIAS_DELIMITER);
  while (s) {
    sp = split_token(&s, ALIAS_DELIMITER);
    while (sp && *sp && *sp == ' ')
      sp++;
    if (sp && *sp) {
      dbref *p;
      p = slab_malloc(player_dbref_slab, NULL);
      if (!p)
        mush_panic("Unable to allocate memory in plyrlist!");
      *p = player;
      hashadd(strupper(sp), p, &htab_player_list);
    }
  }
}
Пример #18
0
/* Does both the NT and LM owfs of a user's password */
void
nt_lm_owf_gen (char *pwd, uchar nt_p16[16], uchar p16[16])
{
    char passwd[130];

    memset (passwd, '\0', 130);
    safe_strcpy (passwd, pwd, sizeof (passwd) - 1);

    /* Calculate the MD4 hash (NT compatible) of the password */
    memset (nt_p16, '\0', 16);
    E_md4hash ((uchar *) passwd, nt_p16);

#ifdef DEBUG_PASSWORD
    DEBUG (100, ("nt_lm_owf_gen: pwd, nt#\n"));
    dump_data (120, passwd, strlen (passwd));
    dump_data (100, (char *) nt_p16, 16);
#endif

    /* Mangle the passwords into Lanman format */
    passwd[14] = '\0';
    strupper (passwd);

    /* Calculate the SMB (lanman) hash functions of the password */

    memset (p16, '\0', 16);
    E_P16 ((uchar *) passwd, (uchar *) p16);

#ifdef DEBUG_PASSWORD
    DEBUG (100, ("nt_lm_owf_gen: pwd, lm#\n"));
    dump_data (120, passwd, strlen (passwd));
    dump_data (100, (char *) p16, 16);
#endif
    /* clear out local copy of user's password (just being paranoid). */
    memset (passwd, '\0', sizeof (passwd));
}
Пример #19
0
void broadcast_announce_request(struct subnet_record *subrec, struct work_record *work)
{
    pstring outbuf;
    char *p;

    work->needannounce = True;

    DEBUG(3,("broadcast_announce_request: sending announce request for workgroup %s \
to subnet %s\n", work->work_group, subrec->subnet_name));

    memset(outbuf,'\0',sizeof(outbuf));
    p = outbuf;
    SCVAL(p,0,ANN_AnnouncementRequest);
    p++;

    SCVAL(p,0,work->token); /* (local) Unique workgroup token id. */
    p++;
    StrnCpy(p,global_myname,15);
    strupper(p);
    p = skip_string(p,1);

    send_mailslot(False, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf),
                  global_myname, 0x0, work->work_group,0x1e, subrec->bcast_ip,
                  subrec->myip, DGRAM_PORT);
}
Пример #20
0
static int run_exec_periph(shell_t *shell, shell_argv_t *cmd_argv, char *tag)
{
  int argc = cmd_argv->argc;
  char **argv = cmd_argv->argv;
  periph_item_t *item;
  char *info;

  /* User asked to show the whole peripheral list */
  if ( argc < 2 ) {
    periph_info(run_periph, result_header_engine(tag), (periph_info_method_t *) result_puts);
    return 0;
  }

  /* User asked to add or show a peripheral */
  item = periph_retrieve(run_periph, strupper(argv[1]));
  if ( argc < 3 ) {
    if ( item != NULL )
      result_dump_engine(tag, periph_item_info(item));
    return 0;
  }

  /* Check arguments */
  if ( argc > 5 ) {
    shell_error(shell, "%s: Too many arguments\n", argv[0]);
    shell_std_help(shell, argv[0]);
    return -1;
  }

  /* User asked to add a new peripheral: check it is not already declared */
  if ( item != NULL ) {
    debug("Redeclaring peripheral: %s\n", argv[1]);

    /* Peripheral already declared: close it and remove it */
    run_exec_close_item(item, TAG_CLOSE);
    if ( (item = periph_item_init(argv+1, item)) == NULL )
      return -1;
  }
  else {
    debug("New peripheral: %s\n", argv[1]);

    /* Create new peripheral in list */
    if ( (item = periph_item_init(argv+1, NULL)) == NULL )
      return -1;
    periph_item_closed_set(item, (periph_item_closed_t *) run_wait_event_disconnect, (void *) shell);
    periph_new(run_periph, item);
  }

  /* Display new peripheral */
  info = periph_item_info(item);
  result_dump_engine(tag, info);

  /* Also dump wait synchronization output */
  if ( run_wait_output != NULL ) {
    fputs(info, run_wait_output);
    fputs(_LF, run_wait_output);
  }

  return 0;
}
Пример #21
0
BOOL secrets_store_domain_sid(const char *domain, DOM_SID *sid)
{
	fstring key;

	slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_SID, domain);
	strupper(key);
	return secrets_store(key, sid, sizeof(DOM_SID));
}
Пример #22
0
/*******************************************************************
  convert a string to "normal" form
********************************************************************/
void strnorm(char *s)
{
  extern int case_default;
  if (case_default == CASE_UPPER)
    strupper(s);
  else
    strlower(s);
}
Пример #23
0
static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, 
                                          TALLOC_CTX *mem_ctx,
                                          int argc, char **argv) 
{
	POLICY_HND 		connect_pol, 
				domain_pol, 
				user_pol;
	NTSTATUS		result = NT_STATUS_UNSUCCESSFUL;
	uint32 			num_groups, 
				user_rid;
	DOM_GID 		*user_gids;
	int 			i;
	fstring			server;
	
	if (argc != 2) {
		printf("Usage: %s rid\n", argv[0]);
		return NT_STATUS_OK;
	}

	sscanf(argv[1], "%i", &user_rid);

	slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost);
	strupper (server);
		
	result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
				  &connect_pol);
	if (!NT_STATUS_IS_OK(result)) {
		goto done;
	}

	result = cli_samr_open_domain(cli, mem_ctx, &connect_pol,
				      MAXIMUM_ALLOWED_ACCESS,
				      &domain_sid, &domain_pol);
	if (!NT_STATUS_IS_OK(result)) {
		goto done;
	}

	result = cli_samr_open_user(cli, mem_ctx, &domain_pol,
				    MAXIMUM_ALLOWED_ACCESS,
				    user_rid, &user_pol);
	if (!NT_STATUS_IS_OK(result)) {
		goto done;
	}

	result = cli_samr_query_usergroups(cli, mem_ctx, &user_pol,
					   &num_groups, &user_gids);
	if (!NT_STATUS_IS_OK(result)) {
		goto done;
	}

	for (i = 0; i < num_groups; i++) {
		printf("\tgroup rid:[0x%x] attr:[0x%x]\n", 
		       user_gids[i].g_rid, user_gids[i].attr);
	}

 done:
	return result;
}
Пример #24
0
void do_unlink(char *fname)
{
	strupper(fname);

	if (unlink(fname) != 0) {
		printf("(%d) unlink %s failed (%s)\n", 
		       line_count, fname, strerror(errno));
	}
}
Пример #25
0
void err_file(dword code) {
  if (!gsb_last_error) {
    char *err = malloc(SB_TEXTLINE_SIZE + 1);
    sprintf(err, FSERR_FMT, code, strerror(code));
    strupper(err);
    err_throw_str(err);
    free(err);
  }
}
Пример #26
0
struct passwd *Get_Pwnam(char *user,BOOL allow_change)
{
  fstring user2;
  int last_char;
  int usernamelevel = lp_usernamelevel();

  struct passwd *ret;  

  if (!user || !(*user))
    return(NULL);

  StrnCpy(user2,user,sizeof(user2)-1);

  if (!allow_change) {
    user = &user2[0];
  }

  ret = _Get_Pwnam(user);
  if (ret)
    return(ret);

  strlower(user);
  ret = _Get_Pwnam(user);
  if (ret)
    return(ret);

  strupper(user);
  ret = _Get_Pwnam(user);
  if (ret)
    return(ret);

  /* Try with first letter capitalised. */
  if (strlen(user) > 1)
    strlower(user+1);  
  ret = _Get_Pwnam(user);
  if (ret)
    return(ret);

  /* try with last letter capitalised */
  strlower(user);
  last_char = strlen(user)-1;
  user[last_char] = toupper(user[last_char]);
  ret = _Get_Pwnam(user);
  if (ret)
    return(ret);

  /* Try all combinations up to usernamelevel. */
  strlower(user);
  ret = uname_string_combinations(user, _Get_Pwnam, usernamelevel);
  if (ret)
    return(ret);

  if (allow_change)
    fstrcpy(user,user2);

  return(NULL);
}
Пример #27
0
void do_rmdir(char *fname)
{
	strupper(fname);

	if (rmdir(fname) != 0) {
		printf("rmdir %s failed (%s)\n", 
		       fname, strerror(errno));
	}
}
Пример #28
0
/*!
 \param str the original string
 \param x the substring to be found
 \return true if found, false otherwise
 */
bool searchStr(string str, string x) {
	str = strupper(str);
	x = strupper(x);
	if (str == x)
		return true;
	else {
		int cm_str = str.size();
		int cm_x = x.size();
		int i = 0;
		if (cm_x > cm_str)
			return false;
		for (i = 0; i < cm_str - cm_x + 1; i++) {
			if (str.substr(i, cm_x) == x)
				return true;
		}
		return false;
	}
}
Пример #29
0
/** Determine if a lock type is one of the standard types or not.
 * \param type type of lock to check.
 * \return canonical lock type or NULL
 */
lock_type
match_lock(lock_type type)
{
  lock_list *ll;
  ll = hashfind(strupper(type), &htab_locks);
  if (ll)
    return ll->type;
  else
    return NULL;
}
Пример #30
0
void nb_unlink(char *fname)
{
	strupper(fname);

	if (!cli_unlink(c, fname)) {
#if NBDEBUG
		printf("(%d) unlink %s failed (%s)\n", 
		       line_count, fname, cli_errstr(c));
#endif
	}
}