[PATCH 0/5] Retrieve CHAP account information with ietadm

View: New views
2 Messages — Rating Filter:   Alert me  

[PATCH 0/5] Retrieve CHAP account information with ietadm

by Arne Redlich-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The subject pretty much says it all: currently ietadm does not display
CHAP accounts and this patchset will introduce it.

This requires an extension of the ietadm protocol to retrieve response
data: the client (ietadm) declares an allocation length and the server
(ietd) returns data up to this size. If the allocation length is not
sufficient it will be signalled to the client by returning the
overflow. The client then might retry with the allocation length set
appropriately.

The patches in detail:
1/5: a preparatory refactoring of ietadm's user_handle() function
2/5: ietadm protocol extension:
     - add support for response data
     - introduce C_ACCT_LIST to retrieve a list of accounts
3/5: ietadm: add support to show CHAP account data (user / secret)
4/5: ietd: add support to return a list of accounts
5/5: ietadm: add support to retrieve and display a list of accounts

Usage example (discovery accounts):

# display a list of accounts:
$ ietadm --op show --user --tid=0

# add incoming and outgoing accounts:
$ ietadm --op new --user --tid=0 \
 --params=IncomingUser=red,Password=redpassword
$ ietadm --op new --user --tid=0 \
 --params=IncomingUser=blue,Password=bluepassword
$ ietadm --op new --user --tid=0 \
 --params=OutgoingUser=green,Password=greenpassword

# display a list of accounts:
$ ietadm --op show --user --tid=0
IncomingUser red
IncomingUser blue
OutgoingUser green

# display a particular account:
$ ietadm --op show --user --tid=0 --params=IncomingUser=blue
IncomingUser blue bluepassword


Testing and review very much desired - any feedback is appreciated.

Thanks,
Arne

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: [PATCH 0/5] Retrieve CHAP account information with ietadm

by Arne Redlich-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Freitag, den 27.06.2008, 14:06 +0200 schrieb Arne Redlich:

> Hi,
>
> The subject pretty much says it all: currently ietadm does not display
> CHAP accounts and this patchset will introduce it.
>
> This requires an extension of the ietadm protocol to retrieve response
> data: the client (ietadm) declares an allocation length and the server
> (ietd) returns data up to this size. If the allocation length is not
> sufficient it will be signalled to the client by returning the
> overflow. The client then might retry with the allocation length set
> appropriately.
>
> The patches in detail:
> 1/5: a preparatory refactoring of ietadm's user_handle() function
> 2/5: ietadm protocol extension:
>      - add support for response data
>      - introduce C_ACCT_LIST to retrieve a list of accounts
> 3/5: ietadm: add support to show CHAP account data (user / secret)
> 4/5: ietd: add support to return a list of accounts
> 5/5: ietadm: add support to retrieve and display a list of accounts
>
> Usage example (discovery accounts):
>
> # display a list of accounts:
> $ ietadm --op show --user --tid=0
>
> # add incoming and outgoing accounts:
> $ ietadm --op new --user --tid=0 \
>  --params=IncomingUser=red,Password=redpassword
> $ ietadm --op new --user --tid=0 \
>  --params=IncomingUser=blue,Password=bluepassword
> $ ietadm --op new --user --tid=0 \
>  --params=OutgoingUser=green,Password=greenpassword
>
> # display a list of accounts:
> $ ietadm --op show --user --tid=0
> IncomingUser red
> IncomingUser blue
> OutgoingUser green
>
> # display a particular account:
> $ ietadm --op show --user --tid=0 --params=IncomingUser=blue
> IncomingUser blue bluepassword
>
>
> Testing and review very much desired - any feedback is appreciated.

I merged this patchset + the below patch updating the ietadm manpage -
svn rev. 168.

Cheers,
Arne

>From bf3b43ab6725f9f84cd58162dddfa2c8de5bec72 Mon Sep 17 00:00:00 2001
From: Arne Redlich <agr@...>
Date: Tue, 26 Aug 2008 20:44:52 +0200
Subject: [PATCH] Update ietadm manpage

Add documentation about the newly added "ietadm --op show --user" functionality
---
 doc/manpages/ietadm.8 |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/doc/manpages/ietadm.8 b/doc/manpages/ietadm.8
index fea0ccf..0f96422 100644
--- a/doc/manpages/ietadm.8
+++ b/doc/manpages/ietadm.8
@@ -154,7 +154,7 @@ display status of target 1 (see /proc/net/iet/volumes to get the matching target
 create dynamically a new target, numbered 2. \s-1CAUTION\s0 : the target will disappear if you restart ietd, you'll have to edit /etc/ietd.conf to make it permanent!
 .SH "ERROR MESSAGES"
 .IX Header "ERROR MESSAGES"
-ietadm misses error messages. Look carefully the \s-1STDERR\s0 output : in case of error
+ietadm misses error messages. Look carefully at the \s-1STDERR\s0 output : in case of error
 it will send a 3 number error code, ending with \-1, for instance :
 .PP
 ietd_request 203 3 \-1
@@ -216,6 +216,17 @@ add a new account with [pass] for specific target.
 If you don't specify a target (omit \-\-tid option),
 you add a new account for discovery sessions.
 .PP
+\&\fB\-\-op show \-\-tid=[id] \-\-user\fR
+.PP
+show a list of CHAP accounts.
+If \-\-tid is omitted or [id] is \*(L"0\*(R" (zero), discovery accounts are displayed.
+.PP
+\&\fB\-\-op show \-\-tid=[id] \-\-user \-\-params=[user]=[name]\fR
+.PP
+show CHAP account information for the account specified by [name].
+[user] can be [IncomingUser] or [OutgoingUser].
+If \-\-tid is omitted or [id] is \*(L"0\*(R" (zero), [name] is supposed to be a discovery account name.
+.PP
 \&\fB\-\-op delete \-\-tid=[id] \-\-user \-\-params=[user]=[name]\fR
 .PP
 delete specific account having [name] of specific
--
1.5.4.3




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel
LightInTheBox - Buy quality products at wholesale price