zsh-workers
 help / color / mirror / code / Atom feed
From: Ibraheem Umaru-Mohammed <umarumohammed@btinternet.com>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: 4.2.0-pre-2
Date: Thu, 04 Mar 2004 13:12:07 +0000	[thread overview]
Message-ID: <1078405927.18583.10.camel@sonic> (raw)
In-Reply-To: <4376.1078401692@csr.com>

[-- Attachment #1: Type: text/plain, Size: 3265 bytes --]

On Thu, 2004-03-04 at 12:01, Peter Stephenson wrote:

> HAVE_CAP_GET_PROC is defined, but the shell isn't including appropriate
> headers, or has a completely different system for capabilities.
> 
> Could you please try:
> 1. Undefining HAVE_CAP_GET_PROC in config.h.
>

> 2. Grepping the system headers for cap_t or cap_get_proc.  Presumably
> it's there somewhere.  In that case searching for the right header
> during configuration should fix it.
> 
> Unless we can satisfactorily resolve 2. the only way forward will be
> to introduce an --enable-cap flag.  I have no way of testing this
> code at all.

Ok. I have included the capabilities.h which seems to have the "opaque"
definition for cap_t. Below is the result of running grep through
/usr/include:

[ibraheem@md000002s:~] $ find /usr/include -type f \
		-exec grep -E '(cap_t|cap_get_proc)' \
		/dev/null  {} \;
/usr/include/sys/capabilities.h: * cap_t
/usr/include/sys/capabilities.h: * cap_t is an opaque data type.  The
format used within the
/usr/include/sys/capabilities.h: * library and kernel is represented by
(struct __cap_t).
/usr/include/sys/capabilities.h:struct __cap_t {
/usr/include/sys/capabilities.h:typedef void * cap_t;
/usr/include/sys/capabilities.h:int kcap_get_proc (struct __cap_t *,
int);
/usr/include/sys/capabilities.h:int kcap_set_proc (struct __cap_t *,
int);
/usr/include/sys/capabilities.h:int kcap_is_null_set (cap_flag_t, struct
__cap_t *);
/usr/include/sys/capabilities.h:int kcap_is_subset (cap_flag_t, struct
__cap_t *, struct __cap_t *);
/usr/include/sys/capabilities.h:void kcap_exec (struct __cap_t *);
/usr/include/sys/cred.h:	struct	__cap_t cr_caps;	/* capabilities sets
64-bit and LDT */
/usr/include/sys/cred.h:	struct	__cap_t crx_caps;	/* capabilities sets
*/ 
/usr/include/sys/cred.h:void kcred_getcap (struct ucred *, struct
__cap_t *);
/usr/include/sys/cred.h:void kcred_setcap (struct ucred *, struct
__cap_t *);
/usr/include/pcap.h:typedef struct pcap pcap_t;
/usr/include/pcap.h:pcap_t	*pcap_open_live(char *, int, int, int, char
*);
/usr/include/pcap.h:pcap_t	*pcap_open_offline(const char *, char *);
/usr/include/pcap.h:void	pcap_close(pcap_t *);
/usr/include/pcap.h:int	pcap_loop(pcap_t *, int, pcap_handler, u_char
*);
/usr/include/pcap.h:int	pcap_dispatch(pcap_t *, int, pcap_handler,
u_char *);
/usr/include/pcap.h:	pcap_next(pcap_t *, struct pcap_pkthdr *);
/usr/include/pcap.h:int	pcap_stats(pcap_t *, struct pcap_stat *);
/usr/include/pcap.h:int	pcap_setfilter(pcap_t *, struct bpf_program *);
/usr/include/pcap.h:void	pcap_perror(pcap_t *, char *);
/usr/include/pcap.h:char	*pcap_geterr(pcap_t *);
/usr/include/pcap.h:int	pcap_compile(pcap_t *, struct bpf_program *,
char *, int,
/usr/include/pcap.h:int	pcap_freecode(pcap_t *, struct bpf_program *);
/usr/include/pcap.h:int	pcap_datalink(pcap_t *);
/usr/include/pcap.h:int	pcap_snapshot(pcap_t *);
/usr/include/pcap.h:int	pcap_is_swapped(pcap_t *);
/usr/include/pcap.h:int	pcap_major_version(pcap_t *);
/usr/include/pcap.h:int	pcap_minor_version(pcap_t *);
/usr/include/pcap.h:FILE	*pcap_file(pcap_t *);
/usr/include/pcap.h:int	pcap_fileno(pcap_t *);
/usr/include/pcap.h:pcap_dumper_t *pcap_dump_open(pcap_t *, const char
*);
[ibraheem@md000002s:~]

Hope this helps,

Cheers,

			--ibraheem

[-- Attachment #2: capabilities.h --]
[-- Type: text/x-c-header, Size: 3114 bytes --]

/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos520 src/bos/kernel/sys/capabilities.h 1.6                           */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* Restricted Materials of IBM                                            */
/*                                                                        */
/* (C) COPYRIGHT International Business Machines Corp. 2000,2002          */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef _H_SYS_CAP
#define	_H_SYS_CAP

#include <sys/types.h>

/*
 * cap_flag_t
 *
 * Flag for selecting which capabilities set is requested.
 */

#define	CAP_EFFECTIVE	1
#define	CAP_INHERITABLE	2
#define	CAP_PERMITTED	3
typedef unsigned int cap_flag_t;

/*
 * cap_t
 *
 * cap_t is an opaque data type.  The format used within the
 * library and kernel is represented by (struct __cap_t).
 */

struct __cap_t {
	uint64_t cap_effective;
	uint64_t cap_inheritable;
	uint64_t cap_permitted;
};
typedef void * cap_t;

/*
 * cap_flag_value_t
 *
 * A flag to indicate if a capability should be or is set or cleared.
 */

#define CAP_CLEAR	0
#define	CAP_SET		1
typedef unsigned int cap_flag_value_t;

/*
 * cap_value_t
 *
 * The symbolic constants used to represent capabilities.
 */

typedef int cap_value_t;

#define	CAP_PROPAGATE	   1		/* inherit without file capabilities */
#define	CAP_PROPOGATE	   1		/* deprecated spelling */
#define	CAP_NUMA_ATTACH	   2		/* NUMA attachment capability */
#define CAP_BYPASS_RAC_VMM 3	        /* large page use capability */

#define CAP_MAXIMUM CAP_BYPASS_RAC_VMM	/* Highest valued capability */

/*
 * Kernel functions and exported services
 */

#ifdef _KERNEL

int kcap_get_proc (struct __cap_t *, int);
int kcap_set_proc (struct __cap_t *, int);
int kcap_is_set_cr (int, struct ucred *);
int kcap_is_set (int);

#if defined(__64BIT_KERNEL) || defined(__LDT__)
int kcap_is_null_set (cap_flag_t, struct __cap_t *);
int kcap_is_subset (cap_flag_t, struct __cap_t *, struct __cap_t *);
void kcap_exec (struct __cap_t *);
#else
int kcap_is_null_set (cap_flag_t, short *);
int kcap_is_subset (cap_flag_t, short *, short *);
void kcap_exec (short *);
#endif	/* defined(__64BIT_KERNEL) || defined(__LDT__) */

#endif	/* _KERNEL */

#endif	/* _H_SYS_CAP */

  reply	other threads:[~2004-03-04 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040303191540.GA20717@rabox>
2004-03-04 12:01 ` 4.2.0-pre-2 Peter Stephenson
2004-03-04 13:12   ` Ibraheem Umaru-Mohammed [this message]
2004-03-04 13:59     ` 4.2.0-pre-2 Peter Stephenson
     [not found] <20040303193902.GF9561@blorf.net>
2004-03-04 10:44 ` 4.2.0-pre-2 Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1078405927.18583.10.camel@sonic \
    --to=umarumohammed@btinternet.com \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).