~ubuntu-branches/ubuntu/gutsy/avscan/gutsy-backports

« back to all changes in this revision

Viewing changes to avscan/help.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2007-02-28 19:26:49 UTC
  • mfrom: (1.4.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070228192649-ur655x0ttlqucokc
Tags: 1.3.1-openssl-4
* Add MIME entry for application/x-msdos-program (Closes: #411760).
* Update clamav 0.90 patch, s/CL_SCAN_STDOPT/CL_DB_STDOPT/
  (Closes: #412838).

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
#define STRISEMPTY(s)   (((s) != NULL) ? (*(s) == '\0') : TRUE)
153
153
 
154
154
#define OBJEXISTS(p)            (((p) != NULL) ? (!access((p), F_OK)) : FALSE)
155
 
#define OBJEXECUTABLE(p)        (((p) != NULL) ? (!access((p), X_OK)) : FALSE)
156
155
#define OBJREADABLE(p)          (((p) != NULL) ? (!access((p), R_OK)) : FALSE)
157
156
 
158
157
 
 
158
static gboolean OBJEXECUTABLE(const gchar *p)
 
159
{
 
160
        mode_t m;
 
161
        struct stat stat_buf;
 
162
 
 
163
        if(stat((const char *)p, &stat_buf))
 
164
            return(FALSE);
 
165
 
 
166
        m = stat_buf.st_mode;
 
167
 
 
168
#if defined(S_IXUSR) && defined(S_IXGRP) && defined(S_IXOTH)
 
169
        if((m & S_IXUSR) ||
 
170
           (m & S_IXGRP) ||
 
171
           (m & S_IXOTH)
 
172
        )
 
173
            return(TRUE);
 
174
#endif
 
175
 
 
176
        return(FALSE);
 
177
}
 
178
 
 
179
 
159
180
/*
160
181
 *      Displays the help page specified by topic by calling the help
161
182
 *      browser.
188
209
 
189
210
#ifdef HAVE_EDV2
190
211
        /* Get global data directory */
191
 
        data_dir = EDVGetS(core->edv_ctx, EDV_CFG_PARM_DIR_GLOBAL);
 
212
        data_dir = EDVGetS(core->edv_ctx, EDV_CFG_PARM_DIR_GLOBAL);
192
213
#else
193
214
        data_dir = NULL;
194
215
#endif
195
216
        if(STRISEMPTY(data_dir))
196
 
            return;
 
217
            return;
197
218
 
198
219
        /* Get help file based on the specified topic */
199
220
        for(i = 0, hf_ptr = NULL;