Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172908
b: refs/heads/master
c: 9f5180e
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner authored and Jens Axboe committed Oct 6, 2009
1 parent c3548f0 commit 19a0b87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25d2d4edfa509b69fe4832094b8a07e634363ba3
refs/heads/master: 9f5180e5c331d7b3ccc35e1a78072235d38f9f34
7 changes: 6 additions & 1 deletion trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ static struct cn_handler_struct cnd_table[] = {
[ P_new_c_uuid ] = { &drbd_nl_new_c_uuid, 0 },
};

static void drbd_connector_callback(struct cn_msg *req)
static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms *nsp)
{
struct drbd_nl_cfg_req *nlp = (struct drbd_nl_cfg_req *)req->data;
struct cn_handler_struct *cm;
Expand All @@ -2017,6 +2017,11 @@ static void drbd_connector_callback(struct cn_msg *req)
return;
}

if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN)) {
retcode = ERR_PERM;
goto fail;
}

mdev = ensure_mdev(nlp);
if (!mdev) {
retcode = ERR_MINOR_INVALID;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/drbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ enum drbd_ret_codes {
ERR_VERIFY_RUNNING = 149, /* DRBD 8.2 only */
ERR_DATA_NOT_CURRENT = 150,
ERR_CONNECTED = 151, /* DRBD 8.3 only */
ERR_PERM = 152,

/* insert new ones above this line */
AFTER_LAST_ERR_CODE
Expand Down

0 comments on commit 19a0b87

Please sign in to comment.